]> granicus.if.org Git - clang/commitdiff
Make -mno-mmx imply -mno-3dnow. This is what gcc does, and it makes sense.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Sun, 17 Apr 2011 19:22:03 +0000 (19:22 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Sun, 17 Apr 2011 19:22:03 +0000 (19:22 +0000)
Also, fold the sse4 and sse4.1 cases together.

Patch by Alexander Best!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129665 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index 0dcb95903930fdf3c0747fd4c87ed9ead295e194..aa32cbd28f3cafb3a8ccab9ae185595e77b68fcc 100644 (file)
@@ -1146,7 +1146,8 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
       Features["avx"] = true;
   } else {
     if (Name == "mmx")
-      Features["mmx"] = Features["sse"] = Features["sse2"] = Features["sse3"] =
+      Features["mmx"] = Features["3dnow"] = Features["3dnowa"] =
+        Features["sse"] = Features["sse2"] = Features["sse3"] =
         Features["ssse3"] = Features["sse41"] = Features["sse42"] = false;
     else if (Name == "sse")
       Features["sse"] = Features["sse2"] = Features["sse3"] =
@@ -1159,12 +1160,10 @@ bool X86TargetInfo::setFeatureEnabled(llvm::StringMap<bool> &Features,
         Features["sse42"] = false;
     else if (Name == "ssse3")
       Features["ssse3"] = Features["sse41"] = Features["sse42"] = false;
-    else if (Name == "sse4")
+    else if (Name == "sse4" || Name == "sse4.1")
       Features["sse41"] = Features["sse42"] = false;
     else if (Name == "sse4.2")
       Features["sse42"] = false;
-    else if (Name == "sse4.1")
-      Features["sse41"] = Features["sse42"] = false;
     else if (Name == "3dnow")
       Features["3dnow"] = Features["3dnowa"] = false;
     else if (Name == "3dnowa")