Prevent ARM assembler from losing a right shift by #32 applied to a register
[oota-llvm.git] / lib / Target / X86 / X86Subtarget.cpp
index 3e00f50ec4f84b39f6514838b499e7e90dde0358..5be3126728198c0d2e97b8df66afc6593282978a 100644 (file)
@@ -202,15 +202,13 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
   bool IsAMD   = !IsIntel && memcmp(text.c, "AuthenticAMD", 12) == 0;
 
   if ((ECX >> 1) & 0x1) {
-    HasCLMUL = true;
-    ToggleFeature(X86::FeatureCLMUL);
+    HasPCLMUL = true;
+    ToggleFeature(X86::FeaturePCLMUL);
+  }
+  if ((ECX >> 12) & 0x1) {
+    HasFMA = true;
+    ToggleFeature(X86::FeatureFMA);
   }
-  // FMA3 autodetection is switched off until we have a special flag
-  // in code generator
-  //if ((ECX >> 12) & 0x1) {
-  //  HasFMA3 = true;
-  //  ToggleFeature(X86::FeatureFMA3);
-  //}
   if (IsIntel && ((ECX >> 22) & 0x1)) {
     HasMOVBE = true;
     ToggleFeature(X86::FeatureMOVBE);
@@ -328,8 +326,8 @@ X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU,
   , HasPOPCNT(false)
   , HasSSE4A(false)
   , HasAES(false)
-  , HasCLMUL(false)
-  , HasFMA3(false)
+  , HasPCLMUL(false)
+  , HasFMA(false)
   , HasFMA4(false)
   , HasXOP(false)
   , HasMOVBE(false)