From a6ba27fbde14ea266decad04348f20280e90510f Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 24 Mar 2016 16:31:30 +0000 Subject: [X86][XOP] Fixed instruction postfixes to more closely match operands Suggested by Sanjay in D18189 as the multiple folding options in XOP instructions can be tricky llvm-svn: 264305 --- llvm/lib/Target/X86/X86InstrInfo.cpp | 12 +-- llvm/lib/Target/X86/X86InstrXOP.td | 170 +++++++++++++++++------------------ 2 files changed, 91 insertions(+), 91 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index d61ae4d7bab..46e67bb982d 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -1602,8 +1602,8 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) { X86::VFMSUBADDPD4rrY, X86::VFMSUBADDPD4mrY, TB_ALIGN_NONE }, // XOP foldable instructions - { X86::VPCMOVrr, X86::VPCMOVmr, 0 }, - { X86::VPCMOVrrY, X86::VPCMOVmrY, 0 }, + { X86::VPCMOVrrr, X86::VPCMOVrmr, 0 }, + { X86::VPCMOVrrrY, X86::VPCMOVrmrY, 0 }, { X86::VPCOMBri, X86::VPCOMBmi, 0 }, { X86::VPCOMDri, X86::VPCOMDmi, 0 }, { X86::VPCOMQri, X86::VPCOMQmi, 0 }, @@ -1628,7 +1628,7 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) { X86::VPMACSWWrr, X86::VPMACSWWrm, 0 }, { X86::VPMADCSSWDrr, X86::VPMADCSSWDrm, 0 }, { X86::VPMADCSWDrr, X86::VPMADCSWDrm, 0 }, - { X86::VPPERMrr, X86::VPPERMmr, 0 }, + { X86::VPPERMrrr, X86::VPPERMrmr, 0 }, { X86::VPROTBrr, X86::VPROTBrm, 0 }, { X86::VPROTDrr, X86::VPROTDrm, 0 }, { X86::VPROTQrr, X86::VPROTQrm, 0 }, @@ -1904,13 +1904,13 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI) { X86::VFMSUBADDPD4rrY, X86::VFMSUBADDPD4rmY, TB_ALIGN_NONE }, // XOP foldable instructions - { X86::VPCMOVrr, X86::VPCMOVrm, 0 }, - { X86::VPCMOVrrY, X86::VPCMOVrmY, 0 }, + { X86::VPCMOVrrr, X86::VPCMOVrrm, 0 }, + { X86::VPCMOVrrrY, X86::VPCMOVrrmY, 0 }, { X86::VPERMIL2PDrr, X86::VPERMIL2PDrm, 0 }, { X86::VPERMIL2PDrrY, X86::VPERMIL2PDrmY, 0 }, { X86::VPERMIL2PSrr, X86::VPERMIL2PSrm, 0 }, { X86::VPERMIL2PSrrY, X86::VPERMIL2PSrmY, 0 }, - { X86::VPPERMrr, X86::VPPERMrm, 0 }, + { X86::VPPERMrrr, X86::VPPERMrrm, 0 }, // AVX-512 VPERMI instructions with 3 source operands. { X86::VPERMI2Drr, X86::VPERMI2Drm, 0 }, diff --git a/llvm/lib/Target/X86/X86InstrXOP.td b/llvm/lib/Target/X86/X86InstrXOP.td index d0480966169..57e6c1aec64 100644 --- a/llvm/lib/Target/X86/X86InstrXOP.td +++ b/llvm/lib/Target/X86/X86InstrXOP.td @@ -224,37 +224,37 @@ let ExeDomain = SSEPackedInt in { // SSE integer instructions multiclass xop4op opc, string OpcodeStr, SDNode OpNode, ValueType vt128> { - def rr : IXOPi8, - XOP_4V, VEX_I8IMM; - def rm : IXOPi8, - XOP_4V, VEX_I8IMM, VEX_W, MemOp4; - def mr : IXOPi8, - XOP_4V, VEX_I8IMM; + def rrr : IXOPi8, + XOP_4V, VEX_I8IMM; + def rrm : IXOPi8, + XOP_4V, VEX_I8IMM, VEX_W, MemOp4; + def rmr : IXOPi8, + XOP_4V, VEX_I8IMM; // For disassembler let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0 in - def rr_REV : IXOPi8, XOP_4V, VEX_I8IMM, VEX_W, MemOp4; + def rrr_REV : IXOPi8, XOP_4V, VEX_I8IMM, VEX_W, MemOp4; } let ExeDomain = SSEPackedInt in { @@ -265,66 +265,66 @@ let ExeDomain = SSEPackedInt in { multiclass xop4op_int opc, string OpcodeStr, Intrinsic Int128, Intrinsic Int256> { // 128-bit Instruction - def rr : IXOPi8, - XOP_4V, VEX_I8IMM; - def rm : IXOPi8, - XOP_4V, VEX_I8IMM, VEX_W, MemOp4; - def mr : IXOPi8, - XOP_4V, VEX_I8IMM; + def rrr : IXOPi8, + XOP_4V, VEX_I8IMM; + def rrm : IXOPi8, + XOP_4V, VEX_I8IMM, VEX_W, MemOp4; + def rmr : IXOPi8, + XOP_4V, VEX_I8IMM; // For disassembler let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0 in - def rr_REV : IXOPi8, XOP_4V, VEX_I8IMM, VEX_W, MemOp4; + def rrr_REV : IXOPi8, XOP_4V, VEX_I8IMM, VEX_W, MemOp4; // 256-bit Instruction - def rrY : IXOPi8, - XOP_4V, VEX_I8IMM, VEX_L; - def rmY : IXOPi8, - XOP_4V, VEX_I8IMM, VEX_W, MemOp4, VEX_L; - def mrY : IXOPi8, - XOP_4V, VEX_I8IMM, VEX_L; + def rrrY : IXOPi8, + XOP_4V, VEX_I8IMM, VEX_L; + def rrmY : IXOPi8, + XOP_4V, VEX_I8IMM, VEX_W, MemOp4, VEX_L; + def rmrY : IXOPi8, + XOP_4V, VEX_I8IMM, VEX_L; // For disassembler let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0 in - def rrY_REV : IXOPi8, XOP_4V, VEX_I8IMM, VEX_W, MemOp4, VEX_L; + def rrrY_REV : IXOPi8, XOP_4V, VEX_I8IMM, VEX_W, MemOp4, VEX_L; } let ExeDomain = SSEPackedInt in { @@ -335,11 +335,11 @@ let ExeDomain = SSEPackedInt in { let Predicates = [HasXOP] in { def : Pat<(v2i64 (or (and VR128:$src3, VR128:$src1), (X86andnp VR128:$src3, VR128:$src2))), - (VPCMOVrr VR128:$src1, VR128:$src2, VR128:$src3)>; + (VPCMOVrrr VR128:$src1, VR128:$src2, VR128:$src3)>; def : Pat<(v4i64 (or (and VR256:$src3, VR256:$src1), (X86andnp VR256:$src3, VR256:$src2))), - (VPCMOVrrY VR256:$src1, VR256:$src2, VR256:$src3)>; + (VPCMOVrrrY VR256:$src1, VR256:$src2, VR256:$src3)>; } multiclass xop5op opc, string OpcodeStr, Intrinsic Int128, -- cgit v1.2.3