]> granicus.if.org Git - llvm/commitdiff
[X86][FMA] Add missing Predicates qualifier around scalar FMA intrinsic patterns.
authorCraig Topper <craig.topper@gmail.com>
Sun, 27 Nov 2016 21:37:02 +0000 (21:37 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 27 Nov 2016 21:37:02 +0000 (21:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288010 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrFMA.td

index cbf60d8bec8768dd9319a88380295ac5b953645c..7eb627c572df18ea395220d25e8b5094205b7ec2 100644 (file)
@@ -240,13 +240,15 @@ multiclass fma3s<bits<8> opc132, bits<8> opc213, bits<8> opc231,
   // This is because src1 is tied to dest, and the scalar intrinsics
   // require the pass-through values to come from the first source
   // operand, not the second.
-  def : Pat<(IntF32 VR128:$src1, VR128:$src2, VR128:$src3),
-            (COPY_TO_REGCLASS(!cast<Instruction>(NAME#"213SSr_Int")
-             $src1, $src2, $src3), VR128)>;
+  let Predicates = [HasFMA] in {
+    def : Pat<(IntF32 VR128:$src1, VR128:$src2, VR128:$src3),
+              (COPY_TO_REGCLASS(!cast<Instruction>(NAME#"213SSr_Int")
+               $src1, $src2, $src3), VR128)>;
 
-  def : Pat<(IntF64 VR128:$src1, VR128:$src2, VR128:$src3),
-            (COPY_TO_REGCLASS(!cast<Instruction>(NAME#"213SDr_Int")
-             $src1, $src2, $src3), VR128)>;
+    def : Pat<(IntF64 VR128:$src1, VR128:$src2, VR128:$src3),
+              (COPY_TO_REGCLASS(!cast<Instruction>(NAME#"213SDr_Int")
+               $src1, $src2, $src3), VR128)>;
+  }
 }
 
 defm VFMADD : fma3s<0x99, 0xA9, 0xB9, "vfmadd", int_x86_fma_vfmadd_ss,