From fb996ee7274fa75eed856ac798572f0f17a60b6d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 7 Oct 2006 06:31:41 +0000 Subject: [PATCH] simplify horizontal op definitions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30794 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrSSE.td | 47 ++++++++++++++++------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index 1dcb1d40813..67f9ba6df5f 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -255,19 +255,22 @@ class PD_Intrm o, string OpcodeStr, Intrinsic IntId> !strconcat(OpcodeStr, " {$src2, $dst|$dst, $src2}"), [(set VR128:$dst, (IntId VR128:$src1, (load addr:$src2)))]>; -class S3D_Intrr o, string asm, Intrinsic IntId> - : S3DI o, string OpcodeStr, Intrinsic IntId> + : S3DI; -class S3D_Intrm o, string asm, Intrinsic IntId> - : S3DI o, string OpcodeStr, Intrinsic IntId> + : S3DI; -class S3_Intrr o, string asm, Intrinsic IntId> - : S3I o, string OpcodeStr, Intrinsic IntId> + : S3I; -class S3_Intrm o, string asm, Intrinsic IntId> - : S3I; +class S3_Intrm o, string OpcodeStr, Intrinsic IntId> + : S3I; // Some 'special' instructions def IMPLICIT_DEF_FR32 : I<0, Pseudo, (ops FR32:$dst), @@ -1234,22 +1237,14 @@ def UNPCKLPDrm : PDI<0x14, MRMSrcMem, // Horizontal ops let isTwoAddress = 1 in { -def HADDPSrr : S3D_Intrr<0x7C, "haddps {$src2, $dst|$dst, $src2}", - int_x86_sse3_hadd_ps>; -def HADDPSrm : S3D_Intrm<0x7C, "haddps {$src2, $dst|$dst, $src2}", - int_x86_sse3_hadd_ps>; -def HADDPDrr : S3_Intrr<0x7C, "haddpd {$src2, $dst|$dst, $src2}", - int_x86_sse3_hadd_pd>; -def HADDPDrm : S3_Intrm<0x7C, "haddpd {$src2, $dst|$dst, $src2}", - int_x86_sse3_hadd_pd>; -def HSUBPSrr : S3D_Intrr<0x7D, "hsubps {$src2, $dst|$dst, $src2}", - int_x86_sse3_hsub_ps>; -def HSUBPSrm : S3D_Intrm<0x7D, "hsubps {$src2, $dst|$dst, $src2}", - int_x86_sse3_hsub_ps>; -def HSUBPDrr : S3_Intrr<0x7D, "hsubpd {$src2, $dst|$dst, $src2}", - int_x86_sse3_hsub_pd>; -def HSUBPDrm : S3_Intrm<0x7D, "hsubpd {$src2, $dst|$dst, $src2}", - int_x86_sse3_hsub_pd>; +def HADDPSrr : S3D_Intrr<0x7C, "haddps", int_x86_sse3_hadd_ps>; +def HADDPSrm : S3D_Intrm<0x7C, "haddps", int_x86_sse3_hadd_ps>; +def HADDPDrr : S3_Intrr <0x7C, "haddpd", int_x86_sse3_hadd_pd>; +def HADDPDrm : S3_Intrm <0x7C, "haddpd", int_x86_sse3_hadd_pd>; +def HSUBPSrr : S3D_Intrr<0x7D, "hsubps", int_x86_sse3_hsub_ps>; +def HSUBPSrm : S3D_Intrm<0x7D, "hsubps", int_x86_sse3_hsub_ps>; +def HSUBPDrr : S3_Intrr <0x7D, "hsubpd", int_x86_sse3_hsub_pd>; +def HSUBPDrm : S3_Intrm <0x7D, "hsubpd", int_x86_sse3_hsub_pd>; } //===----------------------------------------------------------------------===//