summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-08-27 22:24:56 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-08-27 22:24:56 +0000
commit68bf64e302b5fb87a1943101828a489b5ca1fc46 (patch)
tree8aea8f1f5e3318a875cd19a553867674d92ca37c /clang/lib/Basic/Targets.cpp
parentee03b5bbb9a45a6e3778c04a815219c4f904e0ee (diff)
downloadbcm5719-llvm-68bf64e302b5fb87a1943101828a489b5ca1fc46.tar.gz
bcm5719-llvm-68bf64e302b5fb87a1943101828a489b5ca1fc46.zip
[X86] Use AVX features instead of ABI to init. SimdDefaultAlign.
The ABI string only exists to communicate with TargetCodeGenInfo. Concretely, since we only used "avx*" ABI strings on x86_64 (as AVX doesn't affect the i386 ABIs), this meant that, when initializing SimdDefaultAlign, we would ignore AVX/AVX512 on i386, for no good reason. Instead, directly check the features. A similar change for MaxVectorAlign will follow. Differential Revision: http://reviews.llvm.org/D12390 llvm-svn: 246228
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 577ee8abc81..985e991e601 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -2984,7 +2984,7 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
MMX3DNowLevel = std::max(MMX3DNowLevel, MMX);
SimdDefaultAlign =
- (getABI() == "avx512") ? 512 : (getABI() == "avx") ? 256 : 128;
+ hasFeature("avx512f") ? 512 : hasFeature("avx") ? 256 : 128;
return true;
}
OpenPOWER on IntegriCloud