[PATCH] D12390: Also enable the avx/avx512 ABIs for i386, not just x86_64.

John McCall via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 27 13:46:42 PDT 2015


rjmccall added a comment.

In http://reviews.llvm.org/D12390#234458, @ab wrote:

> Unless I'm misunderstanding, I believe this has much less impact than you're thinking; there are three cases:
>
> - x86_64: no change (-mno-mmx is guarded by x86)
> - x86, with -mno-mmx: no change (because previously, we'd only set avx/avx512 for x86_64)
> - x86, without -mno-mmx: this will use an avx/avx512 ABI string where we'd have used "", letting us use the better alignment (only for OpenMP and vectors, I think).


Ok, I see.

The outcome we want is that things like the max vector alignment should be properly honoring whatever target features are actually enabled.  Specifically, if AVX is enabled, we should be setting the max vector alignment to the maximum enabled AVX alignment, regardless of whether MMX is enabled.

This ABI string is an artifact of the interface between the AST and IRGen TargetInfos.  We should probably just remove it in favor of some kind of openly-extensible query interface so that IRGen can just directly ask things like whether AVX is enabled instead of parsing some random string.  But for this patch, let's just leave it as it is, and instead just set the max vector alignment directly from the target features.


http://reviews.llvm.org/D12390





More information about the cfe-commits mailing list