> Or I am missing someting? I often see the x86 vectorizer with -mtune=generic generate a lot of complicated code just to adjust for potential misalignment.
My thought was just if the alias oracle knows what the original declaration is, and it's available for changes (e.g. LTO), it would be likely be better to just add an __attribute__((aligned())) there. In the general case it's probably harder, you would need some cost model to decide when it's worth it. Your approach of course would still be needed for cases where this isn't possible. But it sounded like the infrastructure you're building could in principle do both. -Andi