Enable automatic detection of FMA3 support to allow intrinsics to be used.
authorCraig Topper <craig.topper@gmail.com>
Fri, 1 Jun 2012 06:10:14 +0000 (06:10 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 1 Jun 2012 06:10:14 +0000 (06:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157805 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86Subtarget.cpp

index 962364bda4c93dde1b01065927eb27ca1b32a250..3b60be532e753c54bd80a631408f9ec557e42f5b 100644 (file)
@@ -205,12 +205,10 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
     HasPCLMUL = true;
     ToggleFeature(X86::FeaturePCLMUL);
   }
-  // FMA3 autodetection is switched off until we have a special flag
-  // in code generator
-  //if ((ECX >> 12) & 0x1) {
-  //  HasFMA3 = true;
-  //  ToggleFeature(X86::FeatureFMA3);
-  //}
+  if ((ECX >> 12) & 0x1) {
+    HasFMA3 = true;
+    ToggleFeature(X86::FeatureFMA3);
+  }
   if (IsIntel && ((ECX >> 22) & 0x1)) {
     HasMOVBE = true;
     ToggleFeature(X86::FeatureMOVBE);