1 //===-- X86InstrFMA.td - FMA Instruction Set ---------------*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes FMA (Fused Multiply-Add) instructions.
12 //===----------------------------------------------------------------------===//
14 //===----------------------------------------------------------------------===//
15 // FMA3 - Intel 3 operand Fused Multiply-Add instructions
16 //===----------------------------------------------------------------------===//
18 // For all FMA opcodes declared in fma3p_rm and fma3s_rm milticlasses defined
19 // below, both the register and memory variants are commutable.
20 // For the register form the commutable operands are 1, 2 and 3.
21 // For the memory variant the folded operand must be in 3. Thus,
22 // in that case, only the operands 1 and 2 can be swapped.
23 // Commuting some of operands may require the opcode change.
25 // operands 1 and 2 (memory & register forms): *213* --> *213*(no changes);
26 // operands 1 and 3 (register forms only): *213* --> *231*;
27 // operands 2 and 3 (register forms only): *213* --> *132*.
29 // operands 1 and 2 (memory & register forms): *132* --> *231*;
30 // operands 1 and 3 (register forms only): *132* --> *132*(no changes);
31 // operands 2 and 3 (register forms only): *132* --> *213*.
33 // operands 1 and 2 (memory & register forms): *231* --> *132*;
34 // operands 1 and 3 (register forms only): *231* --> *213*;
35 // operands 2 and 3 (register forms only): *231* --> *231*(no changes).
37 let Constraints = "$src1 = $dst", hasSideEffects = 0, isCommutable = 1 in
38 multiclass fma3p_rm<bits<8> opc, string OpcodeStr,
39 PatFrag MemFrag128, PatFrag MemFrag256,
40 ValueType OpVT128, ValueType OpVT256,
41 SDPatternOperator Op = null_frag> {
42 let usesCustomInserter = 1 in
43 def r : FMA3<opc, MRMSrcReg, (outs VR128:$dst),
44 (ins VR128:$src1, VR128:$src2, VR128:$src3),
46 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
47 [(set VR128:$dst, (OpVT128 (Op VR128:$src2,
48 VR128:$src1, VR128:$src3)))]>;
51 def m : FMA3<opc, MRMSrcMem, (outs VR128:$dst),
52 (ins VR128:$src1, VR128:$src2, f128mem:$src3),
54 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
55 [(set VR128:$dst, (OpVT128 (Op VR128:$src2, VR128:$src1,
56 (MemFrag128 addr:$src3))))]>;
58 let usesCustomInserter = 1 in
59 def rY : FMA3<opc, MRMSrcReg, (outs VR256:$dst),
60 (ins VR256:$src1, VR256:$src2, VR256:$src3),
62 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
63 [(set VR256:$dst, (OpVT256 (Op VR256:$src2, VR256:$src1,
64 VR256:$src3)))]>, VEX_L;
67 def mY : FMA3<opc, MRMSrcMem, (outs VR256:$dst),
68 (ins VR256:$src1, VR256:$src2, f256mem:$src3),
70 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
72 (OpVT256 (Op VR256:$src2, VR256:$src1,
73 (MemFrag256 addr:$src3))))]>, VEX_L;
76 multiclass fma3p_forms<bits<8> opc132, bits<8> opc213, bits<8> opc231,
77 string OpcodeStr, string PackTy,
78 PatFrag MemFrag128, PatFrag MemFrag256,
79 SDNode Op, ValueType OpTy128, ValueType OpTy256> {
80 defm r213 : fma3p_rm<opc213,
81 !strconcat(OpcodeStr, "213", PackTy),
82 MemFrag128, MemFrag256, OpTy128, OpTy256, Op>;
83 defm r132 : fma3p_rm<opc132,
84 !strconcat(OpcodeStr, "132", PackTy),
85 MemFrag128, MemFrag256, OpTy128, OpTy256>;
86 defm r231 : fma3p_rm<opc231,
87 !strconcat(OpcodeStr, "231", PackTy),
88 MemFrag128, MemFrag256, OpTy128, OpTy256>;
92 let ExeDomain = SSEPackedSingle in {
93 defm VFMADDPS : fma3p_forms<0x98, 0xA8, 0xB8, "vfmadd", "ps", loadv4f32,
94 loadv8f32, X86Fmadd, v4f32, v8f32>;
95 defm VFMSUBPS : fma3p_forms<0x9A, 0xAA, 0xBA, "vfmsub", "ps", loadv4f32,
96 loadv8f32, X86Fmsub, v4f32, v8f32>;
97 defm VFMADDSUBPS : fma3p_forms<0x96, 0xA6, 0xB6, "vfmaddsub", "ps",
98 loadv4f32, loadv8f32, X86Fmaddsub,
100 defm VFMSUBADDPS : fma3p_forms<0x97, 0xA7, 0xB7, "vfmsubadd", "ps",
101 loadv4f32, loadv8f32, X86Fmsubadd,
105 let ExeDomain = SSEPackedDouble in {
106 defm VFMADDPD : fma3p_forms<0x98, 0xA8, 0xB8, "vfmadd", "pd", loadv2f64,
107 loadv4f64, X86Fmadd, v2f64, v4f64>, VEX_W;
108 defm VFMSUBPD : fma3p_forms<0x9A, 0xAA, 0xBA, "vfmsub", "pd", loadv2f64,
109 loadv4f64, X86Fmsub, v2f64, v4f64>, VEX_W;
110 defm VFMADDSUBPD : fma3p_forms<0x96, 0xA6, 0xB6, "vfmaddsub", "pd",
111 loadv2f64, loadv4f64, X86Fmaddsub,
112 v2f64, v4f64>, VEX_W;
113 defm VFMSUBADDPD : fma3p_forms<0x97, 0xA7, 0xB7, "vfmsubadd", "pd",
114 loadv2f64, loadv4f64, X86Fmsubadd,
115 v2f64, v4f64>, VEX_W;
118 // Fused Negative Multiply-Add
119 let ExeDomain = SSEPackedSingle in {
120 defm VFNMADDPS : fma3p_forms<0x9C, 0xAC, 0xBC, "vfnmadd", "ps", loadv4f32,
121 loadv8f32, X86Fnmadd, v4f32, v8f32>;
122 defm VFNMSUBPS : fma3p_forms<0x9E, 0xAE, 0xBE, "vfnmsub", "ps", loadv4f32,
123 loadv8f32, X86Fnmsub, v4f32, v8f32>;
125 let ExeDomain = SSEPackedDouble in {
126 defm VFNMADDPD : fma3p_forms<0x9C, 0xAC, 0xBC, "vfnmadd", "pd", loadv2f64,
127 loadv4f64, X86Fnmadd, v2f64, v4f64>, VEX_W;
128 defm VFNMSUBPD : fma3p_forms<0x9E, 0xAE, 0xBE, "vfnmsub", "pd",
129 loadv2f64, loadv4f64, X86Fnmsub, v2f64,
133 // All source register operands of FMA opcodes defined in fma3s_rm multiclass
134 // can be commuted. In many cases such commute transformation requres an opcode
135 // adjustment, for example, commuting the operands 1 and 2 in FMA*132 form
136 // would require an opcode change to FMA*231:
137 // FMA*132* reg1, reg2, reg3; // reg1 * reg3 + reg2;
139 // FMA*231* reg2, reg1, reg3; // reg1 * reg3 + reg2;
140 // Please see more detailed comment at the very beginning of the section
141 // defining FMA3 opcodes above.
142 let Constraints = "$src1 = $dst", isCommutable = 1, hasSideEffects = 0 in
143 multiclass fma3s_rm<bits<8> opc, string OpcodeStr,
144 X86MemOperand x86memop, RegisterClass RC,
145 SDPatternOperator OpNode = null_frag> {
146 let usesCustomInserter = 1 in
147 def r : FMA3<opc, MRMSrcReg, (outs RC:$dst),
148 (ins RC:$src1, RC:$src2, RC:$src3),
149 !strconcat(OpcodeStr,
150 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
151 [(set RC:$dst, (OpNode RC:$src2, RC:$src1, RC:$src3))]>;
154 def m : FMA3<opc, MRMSrcMem, (outs RC:$dst),
155 (ins RC:$src1, RC:$src2, x86memop:$src3),
156 !strconcat(OpcodeStr,
157 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
159 (OpNode RC:$src2, RC:$src1, (load addr:$src3)))]>;
162 // These FMA*_Int instructions are defined specially for being used when
163 // the scalar FMA intrinsics are lowered to machine instructions, and in that
164 // sence they are similar to existing ADD*_Int, SUB*_Int, MUL*_Int, etc.
167 // FIXME: The FMA*_Int instructions are TEMPORARILY defined as NOT commutable.
168 // Commuting the 2nd and 3rd source register operands of FMAs is quite trivial
169 // and the corresponding optimization has been developed (please see
170 // http://reviews.llvm.org/D13269 for details). The optimization though needs
171 // some minor tuning to enable it for FMA*_Int opcodes.
172 // Commuting the 1st operand of FMA*_Int requires some additional analysis,
173 // the commute optimization is legal only if all users of FMA*_Int use only
174 // the lowest element of the FMA*_Int instruction.
175 let Constraints = "$src1 = $dst", isCommutable = 0, isCodeGenOnly =1,
176 hasSideEffects = 0 in
177 multiclass fma3s_rm_int<bits<8> opc, string OpcodeStr,
178 Operand memopr, RegisterClass RC> {
179 def r_Int : FMA3<opc, MRMSrcReg, (outs RC:$dst),
180 (ins RC:$src1, RC:$src2, RC:$src3),
181 !strconcat(OpcodeStr,
182 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
186 def m_Int : FMA3<opc, MRMSrcMem, (outs RC:$dst),
187 (ins RC:$src1, RC:$src2, memopr:$src3),
188 !strconcat(OpcodeStr,
189 "\t{$src3, $src2, $dst|$dst, $src2, $src3}"),
193 multiclass fma3s_forms<bits<8> opc132, bits<8> opc213, bits<8> opc231,
194 string OpStr, string PackTy,
195 SDNode OpNode, RegisterClass RC,
196 X86MemOperand x86memop> {
197 defm r132 : fma3s_rm<opc132, !strconcat(OpStr, "132", PackTy), x86memop, RC>;
198 defm r213 : fma3s_rm<opc213, !strconcat(OpStr, "213", PackTy), x86memop, RC,
200 defm r231 : fma3s_rm<opc231, !strconcat(OpStr, "231", PackTy), x86memop, RC>;
203 // The FMA 213 form is created for lowering of scalar FMA intrinscis
204 // to machine instructions.
205 // The FMA 132 form can trivially be get by commuting the 2nd and 3rd operands
207 // The FMA 231 form can be get only by commuting the 1st operand of 213 or 132
208 // forms and is possible only after special analysis of all uses of the initial
209 // instruction. Such analysis do not exist yet and thus introducing the 231
210 // form of FMA*_Int instructions is done using an optimistic assumption that
211 // such analysis will be implemented eventually.
212 multiclass fma3s_int_forms<bits<8> opc132, bits<8> opc213, bits<8> opc231,
213 string OpStr, string PackTy,
214 RegisterClass RC, Operand memop> {
215 defm r132 : fma3s_rm_int<opc132, !strconcat(OpStr, "132", PackTy),
217 defm r213 : fma3s_rm_int<opc213, !strconcat(OpStr, "213", PackTy),
219 defm r231 : fma3s_rm_int<opc231, !strconcat(OpStr, "231", PackTy),
223 multiclass fma3s<bits<8> opc132, bits<8> opc213, bits<8> opc231,
224 string OpStr, Intrinsic IntF32, Intrinsic IntF64,
226 defm SS : fma3s_forms<opc132, opc213, opc231, OpStr, "ss", OpNode,
228 fma3s_int_forms<opc132, opc213, opc231, OpStr, "ss", VR128, ssmem>;
229 defm SD : fma3s_forms<opc132, opc213, opc231, OpStr, "sd", OpNode,
231 fma3s_int_forms<opc132, opc213, opc231, OpStr, "sd", VR128, sdmem>,
234 // These patterns use the 123 ordering, instead of 213, even though
235 // they match the intrinsic to the 213 version of the instruction.
236 // This is because src1 is tied to dest, and the scalar intrinsics
237 // require the pass-through values to come from the first source
238 // operand, not the second.
239 def : Pat<(IntF32 VR128:$src1, VR128:$src2, VR128:$src3),
241 (!cast<Instruction>(NAME#"SSr213r_Int")
242 (COPY_TO_REGCLASS $src1, FR32),
243 (COPY_TO_REGCLASS $src2, FR32),
244 (COPY_TO_REGCLASS $src3, FR32)),
247 def : Pat<(IntF64 VR128:$src1, VR128:$src2, VR128:$src3),
249 (!cast<Instruction>(NAME#"SDr213r_Int")
250 (COPY_TO_REGCLASS $src1, FR64),
251 (COPY_TO_REGCLASS $src2, FR64),
252 (COPY_TO_REGCLASS $src3, FR64)),
256 defm VFMADD : fma3s<0x99, 0xA9, 0xB9, "vfmadd", int_x86_fma_vfmadd_ss,
257 int_x86_fma_vfmadd_sd, X86Fmadd>, VEX_LIG;
258 defm VFMSUB : fma3s<0x9B, 0xAB, 0xBB, "vfmsub", int_x86_fma_vfmsub_ss,
259 int_x86_fma_vfmsub_sd, X86Fmsub>, VEX_LIG;
261 defm VFNMADD : fma3s<0x9D, 0xAD, 0xBD, "vfnmadd", int_x86_fma_vfnmadd_ss,
262 int_x86_fma_vfnmadd_sd, X86Fnmadd>, VEX_LIG;
263 defm VFNMSUB : fma3s<0x9F, 0xAF, 0xBF, "vfnmsub", int_x86_fma_vfnmsub_ss,
264 int_x86_fma_vfnmsub_sd, X86Fnmsub>, VEX_LIG;
267 //===----------------------------------------------------------------------===//
268 // FMA4 - AMD 4 operand Fused Multiply-Add instructions
269 //===----------------------------------------------------------------------===//
272 multiclass fma4s<bits<8> opc, string OpcodeStr, RegisterClass RC,
273 X86MemOperand x86memop, ValueType OpVT, SDNode OpNode,
275 let isCommutable = 1 in
276 def rr : FMA4<opc, MRMSrcReg, (outs RC:$dst),
277 (ins RC:$src1, RC:$src2, RC:$src3),
278 !strconcat(OpcodeStr,
279 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
281 (OpVT (OpNode RC:$src1, RC:$src2, RC:$src3)))]>, VEX_W, VEX_LIG, MemOp4;
282 def rm : FMA4<opc, MRMSrcMem, (outs RC:$dst),
283 (ins RC:$src1, RC:$src2, x86memop:$src3),
284 !strconcat(OpcodeStr,
285 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
286 [(set RC:$dst, (OpNode RC:$src1, RC:$src2,
287 (mem_frag addr:$src3)))]>, VEX_W, VEX_LIG, MemOp4;
288 def mr : FMA4<opc, MRMSrcMem, (outs RC:$dst),
289 (ins RC:$src1, x86memop:$src2, RC:$src3),
290 !strconcat(OpcodeStr,
291 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
293 (OpNode RC:$src1, (mem_frag addr:$src2), RC:$src3))]>, VEX_LIG;
295 let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0 in
296 def rr_REV : FMA4<opc, MRMSrcReg, (outs RC:$dst),
297 (ins RC:$src1, RC:$src2, RC:$src3),
298 !strconcat(OpcodeStr,
299 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"), []>,
303 multiclass fma4s_int<bits<8> opc, string OpcodeStr, Operand memop,
304 ComplexPattern mem_cpat, Intrinsic Int> {
305 let isCodeGenOnly = 1 in {
306 let isCommutable = 1 in
307 def rr_Int : FMA4<opc, MRMSrcReg, (outs VR128:$dst),
308 (ins VR128:$src1, VR128:$src2, VR128:$src3),
309 !strconcat(OpcodeStr,
310 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
312 (Int VR128:$src1, VR128:$src2, VR128:$src3))]>, VEX_W, VEX_LIG, MemOp4;
313 def rm_Int : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
314 (ins VR128:$src1, VR128:$src2, memop:$src3),
315 !strconcat(OpcodeStr,
316 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
317 [(set VR128:$dst, (Int VR128:$src1, VR128:$src2,
318 mem_cpat:$src3))]>, VEX_W, VEX_LIG, MemOp4;
319 def mr_Int : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
320 (ins VR128:$src1, memop:$src2, VR128:$src3),
321 !strconcat(OpcodeStr,
322 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
324 (Int VR128:$src1, mem_cpat:$src2, VR128:$src3))]>, VEX_LIG;
325 } // isCodeGenOnly = 1
328 multiclass fma4p<bits<8> opc, string OpcodeStr, SDNode OpNode,
329 ValueType OpVT128, ValueType OpVT256,
330 PatFrag ld_frag128, PatFrag ld_frag256> {
331 let isCommutable = 1 in
332 def rr : FMA4<opc, MRMSrcReg, (outs VR128:$dst),
333 (ins VR128:$src1, VR128:$src2, VR128:$src3),
334 !strconcat(OpcodeStr,
335 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
337 (OpVT128 (OpNode VR128:$src1, VR128:$src2, VR128:$src3)))]>,
339 def rm : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
340 (ins VR128:$src1, VR128:$src2, f128mem:$src3),
341 !strconcat(OpcodeStr,
342 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
343 [(set VR128:$dst, (OpNode VR128:$src1, VR128:$src2,
344 (ld_frag128 addr:$src3)))]>, VEX_W, MemOp4;
345 def mr : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
346 (ins VR128:$src1, f128mem:$src2, VR128:$src3),
347 !strconcat(OpcodeStr,
348 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
350 (OpNode VR128:$src1, (ld_frag128 addr:$src2), VR128:$src3))]>;
351 let isCommutable = 1 in
352 def rrY : FMA4<opc, MRMSrcReg, (outs VR256:$dst),
353 (ins VR256:$src1, VR256:$src2, VR256:$src3),
354 !strconcat(OpcodeStr,
355 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
357 (OpVT256 (OpNode VR256:$src1, VR256:$src2, VR256:$src3)))]>,
358 VEX_W, MemOp4, VEX_L;
359 def rmY : FMA4<opc, MRMSrcMem, (outs VR256:$dst),
360 (ins VR256:$src1, VR256:$src2, f256mem:$src3),
361 !strconcat(OpcodeStr,
362 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
363 [(set VR256:$dst, (OpNode VR256:$src1, VR256:$src2,
364 (ld_frag256 addr:$src3)))]>, VEX_W, MemOp4, VEX_L;
365 def mrY : FMA4<opc, MRMSrcMem, (outs VR256:$dst),
366 (ins VR256:$src1, f256mem:$src2, VR256:$src3),
367 !strconcat(OpcodeStr,
368 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
369 [(set VR256:$dst, (OpNode VR256:$src1,
370 (ld_frag256 addr:$src2), VR256:$src3))]>, VEX_L;
372 let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0 in {
373 def rr_REV : FMA4<opc, MRMSrcReg, (outs VR128:$dst),
374 (ins VR128:$src1, VR128:$src2, VR128:$src3),
375 !strconcat(OpcodeStr,
376 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"), []>;
377 def rrY_REV : FMA4<opc, MRMSrcReg, (outs VR256:$dst),
378 (ins VR256:$src1, VR256:$src2, VR256:$src3),
379 !strconcat(OpcodeStr,
380 "\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"), []>,
382 } // isCodeGenOnly = 1
385 defm VFMADDSS4 : fma4s<0x6A, "vfmaddss", FR32, f32mem, f32, X86Fmadd, loadf32>,
386 fma4s_int<0x6A, "vfmaddss", ssmem, sse_load_f32,
387 int_x86_fma_vfmadd_ss>;
388 defm VFMADDSD4 : fma4s<0x6B, "vfmaddsd", FR64, f64mem, f64, X86Fmadd, loadf64>,
389 fma4s_int<0x6B, "vfmaddsd", sdmem, sse_load_f64,
390 int_x86_fma_vfmadd_sd>;
391 defm VFMSUBSS4 : fma4s<0x6E, "vfmsubss", FR32, f32mem, f32, X86Fmsub, loadf32>,
392 fma4s_int<0x6E, "vfmsubss", ssmem, sse_load_f32,
393 int_x86_fma_vfmsub_ss>;
394 defm VFMSUBSD4 : fma4s<0x6F, "vfmsubsd", FR64, f64mem, f64, X86Fmsub, loadf64>,
395 fma4s_int<0x6F, "vfmsubsd", sdmem, sse_load_f64,
396 int_x86_fma_vfmsub_sd>;
397 defm VFNMADDSS4 : fma4s<0x7A, "vfnmaddss", FR32, f32mem, f32,
399 fma4s_int<0x7A, "vfnmaddss", ssmem, sse_load_f32,
400 int_x86_fma_vfnmadd_ss>;
401 defm VFNMADDSD4 : fma4s<0x7B, "vfnmaddsd", FR64, f64mem, f64,
403 fma4s_int<0x7B, "vfnmaddsd", sdmem, sse_load_f64,
404 int_x86_fma_vfnmadd_sd>;
405 defm VFNMSUBSS4 : fma4s<0x7E, "vfnmsubss", FR32, f32mem, f32,
407 fma4s_int<0x7E, "vfnmsubss", ssmem, sse_load_f32,
408 int_x86_fma_vfnmsub_ss>;
409 defm VFNMSUBSD4 : fma4s<0x7F, "vfnmsubsd", FR64, f64mem, f64,
411 fma4s_int<0x7F, "vfnmsubsd", sdmem, sse_load_f64,
412 int_x86_fma_vfnmsub_sd>;
414 let ExeDomain = SSEPackedSingle in {
415 defm VFMADDPS4 : fma4p<0x68, "vfmaddps", X86Fmadd, v4f32, v8f32,
416 loadv4f32, loadv8f32>;
417 defm VFMSUBPS4 : fma4p<0x6C, "vfmsubps", X86Fmsub, v4f32, v8f32,
418 loadv4f32, loadv8f32>;
419 defm VFNMADDPS4 : fma4p<0x78, "vfnmaddps", X86Fnmadd, v4f32, v8f32,
420 loadv4f32, loadv8f32>;
421 defm VFNMSUBPS4 : fma4p<0x7C, "vfnmsubps", X86Fnmsub, v4f32, v8f32,
422 loadv4f32, loadv8f32>;
423 defm VFMADDSUBPS4 : fma4p<0x5C, "vfmaddsubps", X86Fmaddsub, v4f32, v8f32,
424 loadv4f32, loadv8f32>;
425 defm VFMSUBADDPS4 : fma4p<0x5E, "vfmsubaddps", X86Fmsubadd, v4f32, v8f32,
426 loadv4f32, loadv8f32>;
429 let ExeDomain = SSEPackedDouble in {
430 defm VFMADDPD4 : fma4p<0x69, "vfmaddpd", X86Fmadd, v2f64, v4f64,
431 loadv2f64, loadv4f64>;
432 defm VFMSUBPD4 : fma4p<0x6D, "vfmsubpd", X86Fmsub, v2f64, v4f64,
433 loadv2f64, loadv4f64>;
434 defm VFNMADDPD4 : fma4p<0x79, "vfnmaddpd", X86Fnmadd, v2f64, v4f64,
435 loadv2f64, loadv4f64>;
436 defm VFNMSUBPD4 : fma4p<0x7D, "vfnmsubpd", X86Fnmsub, v2f64, v4f64,
437 loadv2f64, loadv4f64>;
438 defm VFMADDSUBPD4 : fma4p<0x5D, "vfmaddsubpd", X86Fmaddsub, v2f64, v4f64,
439 loadv2f64, loadv4f64>;
440 defm VFMSUBADDPD4 : fma4p<0x5F, "vfmsubaddpd", X86Fmsubadd, v2f64, v4f64,
441 loadv2f64, loadv4f64>;