From: Nate Begeman Date: Sat, 9 Feb 2008 01:38:08 +0000 (+0000) Subject: Skeleton of insert and extract matching, more to come X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1426d52cab7faca74958ba890dbc28c93e4db0d0;p=oota-llvm.git Skeleton of insert and extract matching, more to come git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46902 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index a01aa7fb568..3acc054fa3a 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -3192,11 +3192,45 @@ defm PMAXUD : SS41I_binop_rm_int<0x3F, "pmaxud", int_x86_sse41_pmaxud, 1>; defm PMAXUW : SS41I_binop_rm_int<0x3E, "pmaxuw", int_x86_sse41_pmaxuw, 1>; -defm PMULLD : SS41I_binop_rm_int<0x40, "pmulld", - int_x86_sse41_pmulld, 1>; defm PMULDQ : SS41I_binop_rm_int<0x28, "pmuldq", int_x86_sse41_pmuldq, 1>; + +/// SS41I_binop_rm_int - Simple SSE 4.1 binary operator +let isTwoAddress = 1 in { + multiclass SS41I_binop_patint opc, string OpcodeStr, SDNode OpNode, + Intrinsic IntId128, bit Commutable = 0> { + def rr : SS48I, OpSize { + let isCommutable = Commutable; + } + def rr_int : SS48I, + OpSize { + let isCommutable = Commutable; + } + def rm : SS48I, OpSize; + def rm_int : SS48I, + OpSize; + } +} +defm PMULLD : SS41I_binop_patint<0x40, "pmulld", mul, + int_x86_sse41_pmulld, 1>; + + /// SS41I_binop_rmi_int - SSE 4.1 binary operator with immediate let isTwoAddress = 1 in { multiclass SS41I_binop_rmi_int opc, string OpcodeStr, @@ -3233,3 +3267,29 @@ defm DPPD : SS41I_binop_rmi_int<0x41, "dppd", int_x86_sse41_dppd, 1>; defm MPSADBW : SS41I_binop_rmi_int<0x42, "mpsadbw", int_x86_sse41_mpsadbw, 0>; + +/// SS41I_binop_ext32 - SSE 4.1 binary operator with immediate +multiclass SS41I_binop_ext32 opc, string OpcodeStr> { + def rri128 : SS4AI, + OpSize; +} + +defm PEXTRD : SS41I_binop_ext32<0x16, "pextrd">; + +/// SS41I_binop_extf32 - SSE 4.1 binary operator with immediate +multiclass SS41I_binop_extf32 opc, string OpcodeStr> { + def rri128 : SS4AI, + OpSize; +} + +defm EXTRACTPS : SS41I_binop_extf32<0x17, "extractps">;