2010-07-23 08:54:35 +08:00
|
|
|
//====- X86InstrFMA.td - Describe the X86 Instruction Set --*- tablegen -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file describes FMA (Fused Multiply-Add) instructions.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FMA3 - Intel 3 operand Fused Multiply-Add instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2011-12-30 04:43:40 +08:00
|
|
|
multiclass fma3p_rm<bits<8> opc, string OpcodeStr> {
|
2010-07-23 08:54:35 +08:00
|
|
|
def r : FMA3<opc, MRMSrcReg, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, VR128:$src2),
|
|
|
|
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
|
|
|
|
[]>;
|
|
|
|
def m : FMA3<opc, MRMSrcMem, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, f128mem:$src2),
|
|
|
|
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
|
|
|
|
[]>;
|
|
|
|
def rY : FMA3<opc, MRMSrcReg, (outs VR256:$dst),
|
|
|
|
(ins VR256:$src1, VR256:$src2),
|
|
|
|
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
|
|
|
|
[]>;
|
|
|
|
def mY : FMA3<opc, MRMSrcMem, (outs VR256:$dst),
|
|
|
|
(ins VR256:$src1, f256mem:$src2),
|
|
|
|
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
|
|
|
|
[]>;
|
|
|
|
}
|
|
|
|
|
2011-12-30 04:43:40 +08:00
|
|
|
multiclass fma3p_forms<bits<8> opc132, bits<8> opc213, bits<8> opc231,
|
|
|
|
string OpcodeStr, string PackTy> {
|
|
|
|
defm r132 : fma3p_rm<opc132, !strconcat(OpcodeStr, !strconcat("132", PackTy))>;
|
|
|
|
defm r213 : fma3p_rm<opc213, !strconcat(OpcodeStr, !strconcat("213", PackTy))>;
|
|
|
|
defm r231 : fma3p_rm<opc231, !strconcat(OpcodeStr, !strconcat("231", PackTy))>;
|
2010-07-23 08:54:35 +08:00
|
|
|
}
|
|
|
|
|
2011-12-30 04:03:14 +08:00
|
|
|
// Fused Multiply-Add
|
2011-12-30 04:43:40 +08:00
|
|
|
let ExeDomain = SSEPackedSingle in {
|
|
|
|
defm VFMADDPS : fma3p_forms<0x98, 0xA8, 0xB8, "vfmadd", "ps">;
|
|
|
|
defm VFMSUBPS : fma3p_forms<0x9A, 0xAA, 0xBA, "vfmsub", "ps">;
|
|
|
|
defm VFMADDSUBPS : fma3p_forms<0x96, 0xA6, 0xB6, "vfmaddsub", "ps">;
|
|
|
|
defm VFMSUBADDPS : fma3p_forms<0x97, 0xA7, 0xB7, "vfmsubadd", "ps">;
|
|
|
|
}
|
|
|
|
|
|
|
|
let ExeDomain = SSEPackedDouble in {
|
|
|
|
defm VFMADDPD : fma3p_forms<0x98, 0xA8, 0xB8, "vfmadd", "pd">, VEX_W;
|
|
|
|
defm VFMSUBPD : fma3p_forms<0x9A, 0xAA, 0xBA, "vfmsub", "pd">, VEX_W;
|
|
|
|
defm VFMADDSUBPD : fma3p_forms<0x96, 0xA6, 0xB6, "vfmaddsub", "pd">, VEX_W;
|
|
|
|
defm VFMSUBADDPD : fma3p_forms<0x97, 0xA7, 0xB7, "vfmsubadd", "pd">, VEX_W;
|
|
|
|
}
|
2010-07-23 08:54:35 +08:00
|
|
|
|
2011-12-30 04:03:14 +08:00
|
|
|
// Fused Negative Multiply-Add
|
2011-12-30 04:43:40 +08:00
|
|
|
let ExeDomain = SSEPackedSingle in {
|
|
|
|
defm VFNMADDPS : fma3p_forms<0x9C, 0xAC, 0xBC, "vfnmadd", "ps">;
|
|
|
|
defm VFNMSUBPS : fma3p_forms<0x9E, 0xAE, 0xBE, "vfnmsub", "ps">;
|
|
|
|
}
|
|
|
|
let ExeDomain = SSEPackedDouble in {
|
|
|
|
defm VFNMADDPD : fma3p_forms<0x9C, 0xAC, 0xBC, "vfnmadd", "pd">, VEX_W;
|
|
|
|
defm VFNMSUBPD : fma3p_forms<0x9E, 0xAE, 0xBE, "vfnmsub", "pd">, VEX_W;
|
|
|
|
}
|
|
|
|
|
|
|
|
multiclass fma3s_rm<bits<8> opc, string OpcodeStr, X86MemOperand x86memop> {
|
|
|
|
def r : FMA3<opc, MRMSrcReg, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, VR128:$src2),
|
|
|
|
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
|
|
|
|
[]>;
|
|
|
|
def m : FMA3<opc, MRMSrcMem, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, x86memop:$src2),
|
|
|
|
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
|
|
|
|
[]>;
|
|
|
|
}
|
|
|
|
|
|
|
|
multiclass fma3s_forms<bits<8> opc132, bits<8> opc213, bits<8> opc231,
|
|
|
|
string OpcodeStr> {
|
|
|
|
defm SSr132 : fma3s_rm<opc132, !strconcat(OpcodeStr, "132ss"), f32mem>;
|
|
|
|
defm SSr213 : fma3s_rm<opc213, !strconcat(OpcodeStr, "213ss"), f32mem>;
|
|
|
|
defm SSr231 : fma3s_rm<opc231, !strconcat(OpcodeStr, "231ss"), f32mem>;
|
|
|
|
defm SDr132 : fma3s_rm<opc132, !strconcat(OpcodeStr, "132sd"), f64mem>, VEX_W;
|
|
|
|
defm SDr213 : fma3s_rm<opc213, !strconcat(OpcodeStr, "213sd"), f64mem>, VEX_W;
|
|
|
|
defm SDr231 : fma3s_rm<opc231, !strconcat(OpcodeStr, "231sd"), f64mem>, VEX_W;
|
|
|
|
}
|
|
|
|
|
|
|
|
defm VFMADD : fma3s_forms<0x99, 0xA9, 0xB9, "vfmadd">;
|
|
|
|
defm VFMSUB : fma3s_forms<0x9B, 0xAB, 0xBB, "vfmsub">;
|
|
|
|
|
|
|
|
defm VFNMADD : fma3s_forms<0x9D, 0xAD, 0xBD, "vfnmadd">;
|
|
|
|
defm VFNMSUB : fma3s_forms<0x9F, 0xAF, 0xBF, "vfnmsub">;
|
2011-11-26 03:33:42 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// FMA4 - AMD 4 operand Fused Multiply-Add instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
2011-12-30 09:49:53 +08:00
|
|
|
multiclass fma4s<bits<8> opc, string OpcodeStr, Operand memop> {
|
2011-11-26 03:33:42 +08:00
|
|
|
def rr : FMA4<opc, MRMSrcReg, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
2011-12-08 22:43:19 +08:00
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-11-26 03:33:42 +08:00
|
|
|
[]>, XOP_W;
|
|
|
|
def rm : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
|
2011-12-30 09:49:53 +08:00
|
|
|
(ins VR128:$src1, VR128:$src2, memop:$src3),
|
2011-11-26 03:33:42 +08:00
|
|
|
!strconcat(OpcodeStr,
|
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
|
|
|
[]>, XOP_W;
|
|
|
|
def mr : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
|
2011-12-30 09:49:53 +08:00
|
|
|
(ins VR128:$src1, memop:$src2, VR128:$src3),
|
2011-11-26 03:33:42 +08:00
|
|
|
!strconcat(OpcodeStr,
|
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
|
|
|
[]>;
|
|
|
|
}
|
|
|
|
|
2011-12-30 11:17:15 +08:00
|
|
|
multiclass fma4p<bits<8> opc, string OpcodeStr,
|
|
|
|
Intrinsic Int128, Intrinsic Int256,
|
|
|
|
PatFrag ld_frag128, PatFrag ld_frag256> {
|
2011-12-01 06:09:42 +08:00
|
|
|
def rr : FMA4<opc, MRMSrcReg, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
2011-12-08 22:43:19 +08:00
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-12-30 11:17:15 +08:00
|
|
|
[(set VR128:$dst,
|
|
|
|
(Int128 VR128:$src1, VR128:$src2, VR128:$src3))]>, XOP_W;
|
2011-12-01 06:09:42 +08:00
|
|
|
def rm : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, VR128:$src2, f128mem:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-12-30 11:17:15 +08:00
|
|
|
[(set VR128:$dst, (Int128 VR128:$src1, VR128:$src2,
|
|
|
|
(ld_frag128 addr:$src3)))]>, XOP_W;
|
2011-12-01 06:09:42 +08:00
|
|
|
def mr : FMA4<opc, MRMSrcMem, (outs VR128:$dst),
|
|
|
|
(ins VR128:$src1, f128mem:$src2, VR128:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-12-30 11:17:15 +08:00
|
|
|
[(set VR128:$dst,
|
|
|
|
(Int128 VR128:$src1, (ld_frag128 addr:$src2), VR128:$src3))]>;
|
2011-12-01 06:09:42 +08:00
|
|
|
def rrY : FMA4<opc, MRMSrcReg, (outs VR256:$dst),
|
|
|
|
(ins VR256:$src1, VR256:$src2, VR256:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
2011-12-08 22:43:19 +08:00
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-12-30 11:17:15 +08:00
|
|
|
[(set VR256:$dst,
|
|
|
|
(Int256 VR256:$src1, VR256:$src2, VR256:$src3))]>, XOP_W;
|
2011-12-01 06:09:42 +08:00
|
|
|
def rmY : FMA4<opc, MRMSrcMem, (outs VR256:$dst),
|
|
|
|
(ins VR256:$src1, VR256:$src2, f256mem:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-12-30 11:17:15 +08:00
|
|
|
[(set VR256:$dst, (Int256 VR256:$src1, VR256:$src2,
|
|
|
|
(ld_frag256 addr:$src3)))]>, XOP_W;
|
2011-12-01 06:09:42 +08:00
|
|
|
def mrY : FMA4<opc, MRMSrcMem, (outs VR256:$dst),
|
|
|
|
(ins VR256:$src1, f256mem:$src2, VR256:$src3),
|
|
|
|
!strconcat(OpcodeStr,
|
|
|
|
"\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}"),
|
2011-12-30 11:17:15 +08:00
|
|
|
[(set VR256:$dst,
|
|
|
|
(Int256 VR256:$src1, (ld_frag256 addr:$src2), VR256:$src3))]>;
|
2011-12-01 06:09:42 +08:00
|
|
|
}
|
|
|
|
|
2011-11-26 03:33:42 +08:00
|
|
|
let isAsmParserOnly = 1 in {
|
2011-12-30 09:49:53 +08:00
|
|
|
defm VFMADDSS4 : fma4s<0x6A, "vfmaddss", ssmem>;
|
|
|
|
defm VFMADDSD4 : fma4s<0x6B, "vfmaddsd", sdmem>;
|
2011-12-30 11:17:15 +08:00
|
|
|
defm VFMADDPS4 : fma4p<0x68, "vfmaddps", int_x86_fma4_vfmadd_ps,
|
|
|
|
int_x86_fma4_vfmadd_ps_256, memopv4f32, memopv8f32>;
|
|
|
|
defm VFMADDPD4 : fma4p<0x69, "vfmaddpd", int_x86_fma4_vfmadd_pd,
|
|
|
|
int_x86_fma4_vfmadd_pd_256, memopv2f64, memopv4f64>;
|
2011-12-30 09:49:53 +08:00
|
|
|
defm VFMSUBSS4 : fma4s<0x6E, "vfmsubss", ssmem>;
|
|
|
|
defm VFMSUBSD4 : fma4s<0x6F, "vfmsubsd", sdmem>;
|
2011-12-30 11:17:15 +08:00
|
|
|
defm VFMSUBPS4 : fma4p<0x6C, "vfmsubps", int_x86_fma4_vfmsub_ps,
|
|
|
|
int_x86_fma4_vfmsub_ps_256, memopv4f32, memopv8f32>;
|
|
|
|
defm VFMSUBPD4 : fma4p<0x6D, "vfmsubpd", int_x86_fma4_vfmsub_pd,
|
|
|
|
int_x86_fma4_vfmsub_pd_256, memopv2f64, memopv4f64>;
|
2011-12-30 09:49:53 +08:00
|
|
|
defm VFNMADDSS4 : fma4s<0x7A, "vfnmaddss", ssmem>;
|
|
|
|
defm VFNMADDSD4 : fma4s<0x7B, "vfnmaddsd", sdmem>;
|
2011-12-30 11:17:15 +08:00
|
|
|
defm VFNMADDPS4 : fma4p<0x78, "vfnmaddps", int_x86_fma4_vfnmadd_ps,
|
|
|
|
int_x86_fma4_vfnmadd_ps_256, memopv4f32, memopv8f32>;
|
|
|
|
defm VFNMADDPD4 : fma4p<0x79, "vfnmaddpd", int_x86_fma4_vfnmadd_pd,
|
|
|
|
int_x86_fma4_vfnmadd_pd_256, memopv2f64, memopv4f64>;
|
2011-12-30 09:49:53 +08:00
|
|
|
defm VFNMSUBSS4 : fma4s<0x7E, "vfnmsubss", ssmem>;
|
|
|
|
defm VFNMSUBSD4 : fma4s<0x7F, "vfnmsubsd", sdmem>;
|
2011-12-30 11:17:15 +08:00
|
|
|
defm VFNMSUBPS4 : fma4p<0x7C, "vfnmsubps", int_x86_fma4_vfnmsub_ps,
|
|
|
|
int_x86_fma4_vfnmsub_ps_256, memopv4f32, memopv8f32>;
|
|
|
|
defm VFNMSUBPD4 : fma4p<0x7D, "vfnmsubpd", int_x86_fma4_vfnmsub_pd,
|
|
|
|
int_x86_fma4_vfnmsub_pd_256, memopv2f64, memopv4f64>;
|
|
|
|
defm VFMADDSUBPS4 : fma4p<0x5C, "vfmaddsubps", int_x86_fma4_vfmaddsub_ps,
|
|
|
|
int_x86_fma4_vfmaddsub_ps_256, memopv4f32, memopv8f32>;
|
|
|
|
defm VFMADDSUBPD4 : fma4p<0x5D, "vfmaddsubpd", int_x86_fma4_vfmaddsub_pd,
|
|
|
|
int_x86_fma4_vfmaddsub_pd_256, memopv2f64, memopv4f64>;
|
|
|
|
defm VFMSUBADDPS4 : fma4p<0x5E, "vfmsubaddps", int_x86_fma4_vfmsubadd_ps,
|
|
|
|
int_x86_fma4_vfmsubadd_ps_256, memopv4f32, memopv8f32>;
|
|
|
|
defm VFMSUBADDPD4 : fma4p<0x5F, "vfmsubaddpd", int_x86_fma4_vfmsubadd_pd,
|
|
|
|
int_x86_fma4_vfmsubadd_pd_256, memopv2f64, memopv4f64>;
|
2011-11-26 03:33:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// FMA4 Intrinsics patterns
|
|
|
|
|
2011-12-30 11:17:15 +08:00
|
|
|
let Predicates = [HasFMA4] in {
|
|
|
|
|
2011-12-01 06:09:42 +08:00
|
|
|
// VFMADD
|
|
|
|
def : Pat<(int_x86_fma4_vfmadd_ss VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFMADDSS4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmadd_ss VR128:$src1, VR128:$src2, sse_load_f32:$src3),
|
|
|
|
(VFMADDSS4rm VR128:$src1, VR128:$src2, sse_load_f32:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfmadd_ss VR128:$src1, sse_load_f32:$src2, VR128:$src3),
|
|
|
|
(VFMADDSS4mr VR128:$src1, sse_load_f32:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
2011-11-26 03:33:42 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmadd_sd VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFMADDSD4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmadd_sd VR128:$src1, VR128:$src2, sse_load_f64:$src3),
|
|
|
|
(VFMADDSD4rm VR128:$src1, VR128:$src2, sse_load_f64:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfmadd_sd VR128:$src1, sse_load_f64:$src2, VR128:$src3),
|
|
|
|
(VFMADDSD4mr VR128:$src1, sse_load_f64:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
// VFMSUB
|
|
|
|
def : Pat<(int_x86_fma4_vfmsub_ss VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFMSUBSS4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmsub_ss VR128:$src1, VR128:$src2, sse_load_f32:$src3),
|
|
|
|
(VFMSUBSS4rm VR128:$src1, VR128:$src2, sse_load_f32:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfmsub_ss VR128:$src1, sse_load_f32:$src2, VR128:$src3),
|
|
|
|
(VFMSUBSS4mr VR128:$src1, sse_load_f32:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
def : Pat<(int_x86_fma4_vfmsub_sd VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFMSUBSD4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmsub_sd VR128:$src1, VR128:$src2, sse_load_f64:$src3),
|
|
|
|
(VFMSUBSD4rm VR128:$src1, VR128:$src2, sse_load_f64:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfmsub_sd VR128:$src1, sse_load_f64:$src2, VR128:$src3),
|
|
|
|
(VFMSUBSD4mr VR128:$src1, sse_load_f64:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
// VFNMADD
|
|
|
|
def : Pat<(int_x86_fma4_vfnmadd_ss VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFNMADDSS4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfnmadd_ss VR128:$src1, VR128:$src2, sse_load_f32:$src3),
|
|
|
|
(VFNMADDSS4rm VR128:$src1, VR128:$src2, sse_load_f32:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfnmadd_ss VR128:$src1, sse_load_f32:$src2, VR128:$src3),
|
|
|
|
(VFNMADDSS4mr VR128:$src1, sse_load_f32:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
def : Pat<(int_x86_fma4_vfnmadd_sd VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFNMADDSD4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfnmadd_sd VR128:$src1, VR128:$src2, sse_load_f64:$src3),
|
|
|
|
(VFNMADDSD4rm VR128:$src1, VR128:$src2, sse_load_f64:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfnmadd_sd VR128:$src1, sse_load_f64:$src2, VR128:$src3),
|
|
|
|
(VFNMADDSD4mr VR128:$src1, sse_load_f64:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
// VFNMSUB
|
|
|
|
def : Pat<(int_x86_fma4_vfnmsub_ss VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFNMSUBSS4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfnmsub_ss VR128:$src1, VR128:$src2, sse_load_f32:$src3),
|
|
|
|
(VFNMSUBSS4rm VR128:$src1, VR128:$src2, sse_load_f32:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfnmsub_ss VR128:$src1, sse_load_f32:$src2, VR128:$src3),
|
|
|
|
(VFNMSUBSS4mr VR128:$src1, sse_load_f32:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
def : Pat<(int_x86_fma4_vfnmsub_sd VR128:$src1, VR128:$src2, VR128:$src3),
|
|
|
|
(VFNMSUBSD4rr VR128:$src1, VR128:$src2, VR128:$src3)>;
|
2011-12-30 09:49:53 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfnmsub_sd VR128:$src1, VR128:$src2, sse_load_f64:$src3),
|
|
|
|
(VFNMSUBSD4rm VR128:$src1, VR128:$src2, sse_load_f64:$src3)>;
|
|
|
|
def : Pat<(int_x86_fma4_vfnmsub_sd VR128:$src1, sse_load_f64:$src2, VR128:$src3),
|
|
|
|
(VFNMSUBSD4mr VR128:$src1, sse_load_f64:$src2, VR128:$src3)>;
|
2011-12-01 06:09:42 +08:00
|
|
|
|
|
|
|
// VFMADDSUB
|
2011-12-30 10:18:36 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmaddsub_ps VR128:$src1, (memopv4f32 addr:$src2),
|
2011-12-01 06:09:42 +08:00
|
|
|
VR128:$src3),
|
|
|
|
(VFMADDSUBPS4mr VR128:$src1, addr:$src2, VR128:$src3)>;
|
|
|
|
|
2011-12-30 10:18:36 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmaddsub_pd VR128:$src1, (memopv2f64 addr:$src2),
|
2011-12-01 06:09:42 +08:00
|
|
|
VR128:$src3),
|
|
|
|
(VFMADDSUBPD4mr VR128:$src1, addr:$src2, VR128:$src3)>;
|
|
|
|
|
|
|
|
|
|
|
|
// VFMSUBADD
|
2011-12-30 10:18:36 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmsubadd_ps VR128:$src1, (memopv4f32 addr:$src2),
|
2011-12-01 06:09:42 +08:00
|
|
|
VR128:$src3),
|
|
|
|
(VFMSUBADDPS4mr VR128:$src1, addr:$src2, VR128:$src3)>;
|
|
|
|
|
2011-12-30 10:18:36 +08:00
|
|
|
def : Pat<(int_x86_fma4_vfmsubadd_pd VR128:$src1, (memopv2f64 addr:$src2),
|
2011-12-01 06:09:42 +08:00
|
|
|
VR128:$src3),
|
|
|
|
(VFMSUBADDPD4mr VR128:$src1, addr:$src2, VR128:$src3)>;
|
|
|
|
|
2011-12-30 11:17:15 +08:00
|
|
|
} // Predicates = [HasFMA4]
|