mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[X86] Use _NOREX MOVZX instructions for some patterns even in 32-bit mode.
This unifies the patterns between both modes. This should be effectively NFC since all the available registers in 32-bit mode statisfy this constraint. llvm-svn: 314643
This commit is contained in:
parent
823c8bbd40
commit
b7a03e80b8
@ -1488,21 +1488,16 @@ def : Pat<(i8 (trunc (srl_su GR32:$src, (i8 8)))),
|
||||
Requires<[Not64BitMode]>;
|
||||
def : Pat<(srl GR16:$src, (i8 8)),
|
||||
(EXTRACT_SUBREG
|
||||
(MOVZX32rr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
sub_16bit)>,
|
||||
Requires<[Not64BitMode]>;
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
sub_16bit)>;
|
||||
def : Pat<(i32 (zext (srl_su GR16:$src, (i8 8)))),
|
||||
(MOVZX32rr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>,
|
||||
Requires<[Not64BitMode]>;
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>;
|
||||
def : Pat<(i32 (anyext (srl_su GR16:$src, (i8 8)))),
|
||||
(MOVZX32rr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>,
|
||||
Requires<[Not64BitMode]>;
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>;
|
||||
def : Pat<(and (srl_su GR32:$src, (i8 8)), (i32 255)),
|
||||
(MOVZX32rr8 (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>,
|
||||
Requires<[Not64BitMode]>;
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>;
|
||||
def : Pat<(srl (and_su GR32:$src, 0xff00), (i8 8)),
|
||||
(MOVZX32rr8 (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>,
|
||||
Requires<[Not64BitMode]>;
|
||||
(MOVZX32_NOREXrr8 (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
|
||||
@ -1518,27 +1513,6 @@ def : Pat<(and (srl_su GR64:$src, (i8 8)), (i64 255)),
|
||||
(MOVZX32_NOREXrr8
|
||||
(EXTRACT_SUBREG GR64:$src, sub_8bit_hi)),
|
||||
sub_32bit)>;
|
||||
def : Pat<(and (srl_su GR32:$src, (i8 8)), (i32 255)),
|
||||
(MOVZX32_NOREXrr8
|
||||
(EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>,
|
||||
Requires<[In64BitMode]>;
|
||||
def : Pat<(srl (and_su GR32:$src, 0xff00), (i8 8)),
|
||||
(MOVZX32_NOREXrr8 (EXTRACT_SUBREG GR32:$src, sub_8bit_hi))>,
|
||||
Requires<[In64BitMode]>;
|
||||
def : Pat<(srl GR16:$src, (i8 8)),
|
||||
(EXTRACT_SUBREG
|
||||
(MOVZX32_NOREXrr8
|
||||
(EXTRACT_SUBREG GR16:$src, sub_8bit_hi)),
|
||||
sub_16bit)>,
|
||||
Requires<[In64BitMode]>;
|
||||
def : Pat<(i32 (zext (srl_su GR16:$src, (i8 8)))),
|
||||
(MOVZX32_NOREXrr8
|
||||
(EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>,
|
||||
Requires<[In64BitMode]>;
|
||||
def : Pat<(i32 (anyext (srl_su GR16:$src, (i8 8)))),
|
||||
(MOVZX32_NOREXrr8
|
||||
(EXTRACT_SUBREG GR16:$src, sub_8bit_hi))>,
|
||||
Requires<[In64BitMode]>;
|
||||
def : Pat<(i64 (zext (srl_su GR16:$src, (i8 8)))),
|
||||
(SUBREG_TO_REG
|
||||
(i64 0),
|
||||
|
Loading…
Reference in New Issue
Block a user