aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Basic/Targets/X86.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-01 21:14:15 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-01 21:14:15 +0000
commitbddbc598a76ae05af106f4e8c1faaa3946a0d7ea (patch)
treefce26d095a8e2cdbfccaa55412306407ac0f267e /lib/Basic/Targets/X86.cpp
parent520a89e9d38bb1c9cc2de3f875eae3ac69f9f08a (diff)
downloadsrc-bddbc598a76ae05af106f4e8c1faaa3946a0d7ea.tar.gz
src-bddbc598a76ae05af106f4e8c1faaa3946a0d7ea.zip
Vendor import of clang release_60 branch r323948:vendor/clang/clang-release_60-r323948
Notes
Notes: svn path=/vendor/clang/dist-release_60/; revision=328739 svn path=/vendor/clang/clang-release_60-r323948/; revision=328740; tag=vendor/clang/clang-release_60-r323948
Diffstat (limited to 'lib/Basic/Targets/X86.cpp')
-rw-r--r--lib/Basic/Targets/X86.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Basic/Targets/X86.cpp b/lib/Basic/Targets/X86.cpp
index 70433ff066fc..0febb98d4684 100644
--- a/lib/Basic/Targets/X86.cpp
+++ b/lib/Basic/Targets/X86.cpp
@@ -409,7 +409,7 @@ void X86TargetInfo::setSSELevel(llvm::StringMap<bool> &Features,
if (Enabled) {
switch (Level) {
case AVX512F:
- Features["avx512f"] = true;
+ Features["avx512f"] = Features["fma"] = Features["f16c"] = true;
LLVM_FALLTHROUGH;
case AVX2:
Features["avx2"] = true;
@@ -623,6 +623,8 @@ void X86TargetInfo::setFeatureEnabledImpl(llvm::StringMap<bool> &Features,
} else if (Name == "fma") {
if (Enabled)
setSSELevel(Features, AVX, Enabled);
+ else
+ setSSELevel(Features, AVX512F, Enabled);
} else if (Name == "fma4") {
setXOPLevel(Features, FMA4, Enabled);
} else if (Name == "xop") {
@@ -632,6 +634,8 @@ void X86TargetInfo::setFeatureEnabledImpl(llvm::StringMap<bool> &Features,
} else if (Name == "f16c") {
if (Enabled)
setSSELevel(Features, AVX, Enabled);
+ else
+ setSSELevel(Features, AVX512F, Enabled);
} else if (Name == "sha") {
if (Enabled)
setSSELevel(Features, SSE2, Enabled);