From: Craig Topper Date: Wed, 30 May 2012 05:54:54 +0000 (+0000) Subject: SSE4A should not imply LZCNT and POPCNT. FMA4 should imply SSE4A. Add missing break... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90ea0363ef3701b8df8d1c437749297c7ef60e19;p=clang SSE4A should not imply LZCNT and POPCNT. FMA4 should imply SSE4A. Add missing break at the end of btver1 feature list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157680 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 21992363da..9f692294b4 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -1689,6 +1689,7 @@ void X86TargetInfo::getDefaultFeatures(llvm::StringMap &Features) const { case CK_BTVER1: setFeatureEnabled(Features, "ssse3", true); setFeatureEnabled(Features, "sse4a", true); + break; case CK_BDVER1: case CK_BDVER2: setFeatureEnabled(Features, "avx", true); @@ -1750,10 +1751,11 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap &Features, else if (Name == "fma4") Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = - Features["popcnt"] = Features["avx"] = Features["fma4"] = true; + Features["popcnt"] = Features["avx"] = Features["sse4a"] = + Features["fma4"] = true; else if (Name == "sse4a") Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = - Features["lzcnt"] = Features["popcnt"] = Features["sse4a"] = true; + Features["sse4a"] = true; else if (Name == "lzcnt") Features["lzcnt"] = true; else if (Name == "bmi") @@ -1792,7 +1794,7 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap &Features, else if (Name == "avx2") Features["avx2"] = false; else if (Name == "sse4a") - Features["sse4a"] = false; + Features["sse4a"] = Features["fma4"] = false; else if (Name == "lzcnt") Features["lzcnt"] = false; else if (Name == "bmi")