From 13b27a27483c3a5a7a72595e207fb3d54d10d38b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 27 Nov 2016 21:37:02 +0000 Subject: [PATCH] [X86][FMA] Add missing Predicates qualifier around scalar FMA intrinsic patterns. llvm-svn: 288010 --- llvm/lib/Target/X86/X86InstrFMA.td | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/X86/X86InstrFMA.td b/llvm/lib/Target/X86/X86InstrFMA.td index cbf60d8..7eb627c 100644 --- a/llvm/lib/Target/X86/X86InstrFMA.td +++ b/llvm/lib/Target/X86/X86InstrFMA.td @@ -240,13 +240,15 @@ multiclass fma3s 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(NAME#"213SSr_Int") - $src1, $src2, $src3), VR128)>; + let Predicates = [HasFMA] in { + def : Pat<(IntF32 VR128:$src1, VR128:$src2, VR128:$src3), + (COPY_TO_REGCLASS(!cast(NAME#"213SSr_Int") + $src1, $src2, $src3), VR128)>; - def : Pat<(IntF64 VR128:$src1, VR128:$src2, VR128:$src3), - (COPY_TO_REGCLASS(!cast(NAME#"213SDr_Int") - $src1, $src2, $src3), VR128)>; + def : Pat<(IntF64 VR128:$src1, VR128:$src2, VR128:$src3), + (COPY_TO_REGCLASS(!cast(NAME#"213SDr_Int") + $src1, $src2, $src3), VR128)>; + } } defm VFMADD : fma3s<0x99, 0xA9, 0xB9, "vfmadd", int_x86_fma_vfmadd_ss, -- 2.7.4