[llvm-commits] [llvm] r168417 - in /llvm/trunk/lib/Target/X86: X86InstrFMA.td X86InstrFormats.td
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Nov 26 11:14:37 PST 2012
On Nov 21, 2012, at 6:00 AM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
> is this testable?
Yes, see test/CodeGen/X86/sse-domains.ll
/jakob
>
> On 21 November 2012 03:08, Craig Topper <craig.topper at gmail.com> wrote:
>> Author: ctopper
>> Date: Wed Nov 21 02:08:21 2012
>> New Revision: 168417
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=168417&view=rev
>> Log:
>> Fix execution domain for packed FMA4 instructions.
>>
>> Modified:
>> llvm/trunk/lib/Target/X86/X86InstrFMA.td
>> llvm/trunk/lib/Target/X86/X86InstrFormats.td
>>
>> Modified: llvm/trunk/lib/Target/X86/X86InstrFMA.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFMA.td?rev=168417&r1=168416&r2=168417&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86InstrFMA.td (original)
>> +++ llvm/trunk/lib/Target/X86/X86InstrFMA.td Wed Nov 21 02:08:21 2012
>> @@ -307,8 +307,6 @@
>> } // isCodeGenOnly = 1
>> }
>>
>> -let Predicates = [HasFMA4] in {
>> -
>> defm VFMADDSS4 : fma4s<0x6A, "vfmaddss", FR32, f32mem, f32, X86Fmadd, loadf32>,
>> fma4s_int<0x6A, "vfmaddss", ssmem, sse_load_f32,
>> int_x86_fma_vfmadd_ss>;
>> @@ -338,29 +336,33 @@
>> fma4s_int<0x7F, "vfnmsubsd", sdmem, sse_load_f64,
>> int_x86_fma_vfnmsub_sd>;
>>
>> -defm VFMADDPS4 : fma4p<0x68, "vfmaddps", X86Fmadd, v4f32, v8f32,
>> - memopv4f32, memopv8f32>;
>> -defm VFMADDPD4 : fma4p<0x69, "vfmaddpd", X86Fmadd, v2f64, v4f64,
>> - memopv2f64, memopv4f64>;
>> -defm VFMSUBPS4 : fma4p<0x6C, "vfmsubps", X86Fmsub, v4f32, v8f32,
>> - memopv4f32, memopv8f32>;
>> -defm VFMSUBPD4 : fma4p<0x6D, "vfmsubpd", X86Fmsub, v2f64, v4f64,
>> - memopv2f64, memopv4f64>;
>> -defm VFNMADDPS4 : fma4p<0x78, "vfnmaddps", X86Fnmadd, v4f32, v8f32,
>> - memopv4f32, memopv8f32>;
>> -defm VFNMADDPD4 : fma4p<0x79, "vfnmaddpd", X86Fnmadd, v2f64, v4f64,
>> - memopv2f64, memopv4f64>;
>> -defm VFNMSUBPS4 : fma4p<0x7C, "vfnmsubps", X86Fnmsub, v4f32, v8f32,
>> - memopv4f32, memopv8f32>;
>> -defm VFNMSUBPD4 : fma4p<0x7D, "vfnmsubpd", X86Fnmsub, v2f64, v4f64,
>> - memopv2f64, memopv4f64>;
>> -defm VFMADDSUBPS4 : fma4p<0x5C, "vfmaddsubps", X86Fmaddsub, v4f32, v8f32,
>> - memopv4f32, memopv8f32>;
>> -defm VFMADDSUBPD4 : fma4p<0x5D, "vfmaddsubpd", X86Fmaddsub, v2f64, v4f64,
>> - memopv2f64, memopv4f64>;
>> -defm VFMSUBADDPS4 : fma4p<0x5E, "vfmsubaddps", X86Fmsubadd, v4f32, v8f32,
>> - memopv4f32, memopv8f32>;
>> -defm VFMSUBADDPD4 : fma4p<0x5F, "vfmsubaddpd", X86Fmsubadd, v2f64, v4f64,
>> - memopv2f64, memopv4f64>;
>> -} // HasFMA4
>> +let ExeDomain = SSEPackedSingle in {
>> + defm VFMADDPS4 : fma4p<0x68, "vfmaddps", X86Fmadd, v4f32, v8f32,
>> + memopv4f32, memopv8f32>;
>> + defm VFMSUBPS4 : fma4p<0x6C, "vfmsubps", X86Fmsub, v4f32, v8f32,
>> + memopv4f32, memopv8f32>;
>> + defm VFNMADDPS4 : fma4p<0x78, "vfnmaddps", X86Fnmadd, v4f32, v8f32,
>> + memopv4f32, memopv8f32>;
>> + defm VFNMSUBPS4 : fma4p<0x7C, "vfnmsubps", X86Fnmsub, v4f32, v8f32,
>> + memopv4f32, memopv8f32>;
>> + defm VFMADDSUBPS4 : fma4p<0x5C, "vfmaddsubps", X86Fmaddsub, v4f32, v8f32,
>> + memopv4f32, memopv8f32>;
>> + defm VFMSUBADDPS4 : fma4p<0x5E, "vfmsubaddps", X86Fmsubadd, v4f32, v8f32,
>> + memopv4f32, memopv8f32>;
>> +}
>> +
>> +let ExeDomain = SSEPackedDouble in {
>> + defm VFMADDPD4 : fma4p<0x69, "vfmaddpd", X86Fmadd, v2f64, v4f64,
>> + memopv2f64, memopv4f64>;
>> + defm VFMSUBPD4 : fma4p<0x6D, "vfmsubpd", X86Fmsub, v2f64, v4f64,
>> + memopv2f64, memopv4f64>;
>> + defm VFNMADDPD4 : fma4p<0x79, "vfnmaddpd", X86Fnmadd, v2f64, v4f64,
>> + memopv2f64, memopv4f64>;
>> + defm VFNMSUBPD4 : fma4p<0x7D, "vfnmsubpd", X86Fnmsub, v2f64, v4f64,
>> + memopv2f64, memopv4f64>;
>> + defm VFMADDSUBPD4 : fma4p<0x5D, "vfmaddsubpd", X86Fmaddsub, v2f64, v4f64,
>> + memopv2f64, memopv4f64>;
>> + defm VFMSUBADDPD4 : fma4p<0x5F, "vfmsubaddpd", X86Fmsubadd, v2f64, v4f64,
>> + memopv2f64, memopv4f64>;
>> +}
>>
>>
>> Modified: llvm/trunk/lib/Target/X86/X86InstrFormats.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFormats.td?rev=168417&r1=168416&r2=168417&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86InstrFormats.td (original)
>> +++ llvm/trunk/lib/Target/X86/X86InstrFormats.td Wed Nov 21 02:08:21 2012
>> @@ -570,7 +570,7 @@
>> // FMA4 Instruction Templates
>> class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
>> list<dag>pattern, InstrItinClass itin = IIC_DEFAULT>
>> - : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
>> + : I<o, F, outs, ins, asm, pattern, itin>, TA,
>> OpSize, VEX_4V, VEX_I8IMM, Requires<[HasFMA4]>;
>>
>> // XOP 2, 3 and 4 Operand Instruction Template
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list