diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-08-27 22:42:12 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-08-27 22:42:12 +0000 |
commit | 02b7b56af82e265874914d9efe379914844510d6 (patch) | |
tree | 163472b498091b9b831e3f7dd7e88f0f99625140 /clang/lib/Basic/Targets.cpp | |
parent | 82b619ea680d46bf64f077dfe2041907a5dfc2be (diff) | |
download | bcm5719-llvm-02b7b56af82e265874914d9efe379914844510d6.tar.gz bcm5719-llvm-02b7b56af82e265874914d9efe379914844510d6.zip |
[X86] Bump Darwin MaxVectorAlign to 64 when AVX512 is enabled.
Without this, 64-byte vector types (__m512), specified to be 64-byte
aligned in the AVX512 draft SysV ABI, will only be 32-byte aligned.
This is analoguous to AVX, for which we accept 32-byte max alignment.
Differential Revision: http://reviews.llvm.org/D10724
llvm-svn: 246230
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 503e529bfe2..eee181e7214 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -3640,8 +3640,9 @@ public: if (!DarwinTargetInfo<X86_32TargetInfo>::handleTargetFeatures(Features, Diags)) return false; - // Now that we know if we have AVX, we can decide how to align vectors. - MaxVectorAlign = hasFeature("avx") ? 256 : 128; + // We now know the features we have: we can decide how to align vectors. + MaxVectorAlign = + hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128; return true; } }; @@ -4006,8 +4007,9 @@ public: if (!DarwinTargetInfo<X86_64TargetInfo>::handleTargetFeatures(Features, Diags)) return false; - // Now that we know if we have AVX, we can decide how to align vectors. - MaxVectorAlign = hasFeature("avx") ? 256 : 128; + // We now know the features we have: we can decide how to align vectors. + MaxVectorAlign = + hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128; return true; } }; |