forked from OSchip/llvm-project
[X86] Rename MOVSX32_NOREXrr8 to MOVSX32rr8_NOREX so that the scheduler model regular expressions will pick it up with the regular version.
Do the same for MOVSX32_NOREXrm8, MOVZX32_NOREXrr8, and MOVZX32_NOREXrm8 llvm-svn: 327948
This commit is contained in:
parent
4778fa7e8a
commit
ad7c685791
|
@ -3095,7 +3095,7 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
|
|||
if (HiReg == X86::AH && !SDValue(Node, 1).use_empty()) {
|
||||
SDValue AHCopy = CurDAG->getRegister(X86::AH, MVT::i8);
|
||||
unsigned AHExtOpcode =
|
||||
isSigned ? X86::MOVSX32_NOREXrr8 : X86::MOVZX32_NOREXrr8;
|
||||
isSigned ? X86::MOVSX32rr8_NOREX : X86::MOVZX32rr8_NOREX;
|
||||
|
||||
SDNode *RNode = CurDAG->getMachineNode(AHExtOpcode, dl, MVT::i32,
|
||||
MVT::Glue, AHCopy, InFlag);
|
||||
|
|
|
@ -1569,16 +1569,16 @@ def : Pat<(i8 (trunc (srl_su GR32:$src, (i8 8)))),
|
|||
Requires<[Not64BitMode]>;
|
||||
def : Pat<(srl GR16:$src, (i8 8)),
|
||||
(EXTRACT_SUBREG
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
(MOVZX32rr8_NOREX (EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
sub_16bit)>;
|
||||
def : Pat<(i32 (zext (srl_su GR16:$src, (i8 8)))),
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>;
|
||||
(MOVZX32rr8_NOREX (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>;
|
||||
def : Pat<(i32 (anyext (srl_su GR16:$src, (i8 8)))),
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>;
|
||||
(MOVZX32rr8_NOREX (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>;
|
||||
def : Pat<(and (srl_su GR32:$src, (i8 8)), (i32 255)),
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>;
|
||||
(MOVZX32rr8_NOREX (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>;
|
||||
def : Pat<(srl (and_su GR32:$src, immff00_ffff), (i8 8)),
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>;
|
||||
(MOVZX32rr8_NOREX (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>;
|
||||
|
||||
// h-register tricks.
|
||||
// For now, be conservative on x86-64 and use an h-register extract only if the
|
||||
|
@ -1591,19 +1591,19 @@ def : Pat<(srl (and_su GR32:$src, immff00_ffff), (i8 8)),
|
|||
def : Pat<(and (srl_su GR64:$src, (i8 8)), (i64 255)),
|
||||
(SUBREG_TO_REG
|
||||
(i64 0),
|
||||
(MOVZX32_NOREXrr8
|
||||
(MOVZX32rr8_NOREX
|
||||
(EXTRACT_SUBREG GR64:$src, sub_8bit_hi)),
|
||||
sub_32bit)>;
|
||||
def : Pat<(i64 (zext (srl_su GR16:$src, (i8 8)))),
|
||||
(SUBREG_TO_REG
|
||||
(i64 0),
|
||||
(MOVZX32_NOREXrr8
|
||||
(MOVZX32rr8_NOREX
|
||||
(EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
sub_32bit)>;
|
||||
def : Pat<(i64 (anyext (srl_su GR16:$src, (i8 8)))),
|
||||
(SUBREG_TO_REG
|
||||
(i64 0),
|
||||
(MOVZX32_NOREXrr8
|
||||
(MOVZX32rr8_NOREX
|
||||
(EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
sub_32bit)>;
|
||||
|
||||
|
|
|
@ -93,22 +93,22 @@ def MOVZX32rm16: I<0xB7, MRMSrcMem, (outs GR32:$dst), (ins i16mem:$src),
|
|||
// except that they use GR32_NOREX for the output operand register class
|
||||
// instead of GR32. This allows them to operate on h registers on x86-64.
|
||||
let hasSideEffects = 0, isCodeGenOnly = 1 in {
|
||||
def MOVZX32_NOREXrr8 : I<0xB6, MRMSrcReg,
|
||||
def MOVZX32rr8_NOREX : I<0xB6, MRMSrcReg,
|
||||
(outs GR32_NOREX:$dst), (ins GR8_NOREX:$src),
|
||||
"movz{bl|x}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_MOVZX>, TB, OpSize32, Sched<[WriteALU]>;
|
||||
let mayLoad = 1 in
|
||||
def MOVZX32_NOREXrm8 : I<0xB6, MRMSrcMem,
|
||||
def MOVZX32rm8_NOREX : I<0xB6, MRMSrcMem,
|
||||
(outs GR32_NOREX:$dst), (ins i8mem_NOREX:$src),
|
||||
"movz{bl|x}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_MOVZX>, TB, OpSize32, Sched<[WriteALULd]>;
|
||||
|
||||
def MOVSX32_NOREXrr8 : I<0xBE, MRMSrcReg,
|
||||
def MOVSX32rr8_NOREX : I<0xBE, MRMSrcReg,
|
||||
(outs GR32_NOREX:$dst), (ins GR8_NOREX:$src),
|
||||
"movs{bl|x}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_MOVSX>, TB, OpSize32, Sched<[WriteALU]>;
|
||||
let mayLoad = 1 in
|
||||
def MOVSX32_NOREXrm8 : I<0xBE, MRMSrcMem,
|
||||
def MOVSX32rm8_NOREX : I<0xBE, MRMSrcMem,
|
||||
(outs GR32_NOREX:$dst), (ins i8mem_NOREX:$src),
|
||||
"movs{bl|x}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_MOVSX>, TB, OpSize32, Sched<[WriteALULd]>;
|
||||
|
|
|
@ -614,7 +614,7 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI)
|
|||
{ X86::MOVSLDUPrr, X86::MOVSLDUPrm, TB_ALIGN_16 },
|
||||
{ X86::MOVSX16rr8, X86::MOVSX16rm8, 0 },
|
||||
{ X86::MOVSX32rr16, X86::MOVSX32rm16, 0 },
|
||||
{ X86::MOVSX32_NOREXrr8, X86::MOVSX32_NOREXrm8, 0 },
|
||||
{ X86::MOVSX32rr8_NOREX, X86::MOVSX32rm8_NOREX, 0 },
|
||||
{ X86::MOVSX32rr8, X86::MOVSX32rm8, 0 },
|
||||
{ X86::MOVSX64rr16, X86::MOVSX64rm16, 0 },
|
||||
{ X86::MOVSX64rr32, X86::MOVSX64rm32, 0 },
|
||||
|
@ -624,7 +624,7 @@ X86InstrInfo::X86InstrInfo(X86Subtarget &STI)
|
|||
{ X86::MOVZPQILo2PQIrr, X86::MOVQI2PQIrm, TB_NO_REVERSE },
|
||||
{ X86::MOVZX16rr8, X86::MOVZX16rm8, 0 },
|
||||
{ X86::MOVZX32rr16, X86::MOVZX32rm16, 0 },
|
||||
{ X86::MOVZX32_NOREXrr8, X86::MOVZX32_NOREXrm8, 0 },
|
||||
{ X86::MOVZX32rr8_NOREX, X86::MOVZX32rm8_NOREX, 0 },
|
||||
{ X86::MOVZX32rr8, X86::MOVZX32rm8, 0 },
|
||||
{ X86::MOVZX64rr16, X86::MOVZX64rm16, 0 },
|
||||
{ X86::MOVZX64rr8, X86::MOVZX64rm8, 0 },
|
||||
|
|
Loading…
Reference in New Issue