mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[Lanai] Set CTLZ_ZERO_UNDEF/CTTZ_ZERO_UNDEF to Expand instead of Legal so they will be converted to CTLZ/CTTZ by LegalizeDAG. Remove extra instructions that only existed to to contain patterns that match the zero_undef operations. NFC
llvm-svn: 267108
This commit is contained in:
parent
07012bab8b
commit
9b0556c083
@ -111,9 +111,9 @@ LanaiTargetLowering::LanaiTargetLowering(const TargetMachine &TM,
|
||||
setOperationAction(ISD::BSWAP, MVT::i32, Expand);
|
||||
setOperationAction(ISD::CTPOP, MVT::i32, Legal);
|
||||
setOperationAction(ISD::CTLZ, MVT::i32, Legal);
|
||||
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i32, Legal);
|
||||
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i32, Expand);
|
||||
setOperationAction(ISD::CTTZ, MVT::i32, Legal);
|
||||
setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i32, Legal);
|
||||
setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i32, Expand);
|
||||
|
||||
setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand);
|
||||
setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i8, Expand);
|
||||
|
@ -823,20 +823,11 @@ def POPC: InstSpecial<0b001, (outs GPR:$Rd), (ins GPR:$Rs1),
|
||||
// Count Leading Zeros (LEADZ)
|
||||
def LEADZ: InstSpecial<0b010, (outs GPR:$Rd), (ins GPR:$Rs1),
|
||||
"leadz\t$Rs1, $Rd", [(set GPR:$Rd, (ctlz GPR:$Rs1))]>;
|
||||
let isCodeGenOnly = 1 in
|
||||
def LEADZUNDEF: InstSpecial<0b010, (outs GPR:$Rd), (ins GPR:$Rs1),
|
||||
"leadz\t$Rs1, $Rd",
|
||||
[(set GPR:$Rd, (ctlz_zero_undef GPR:$Rs1))]>;
|
||||
|
||||
// Count Trailing Zeros (TRAILZ)
|
||||
def TRAILZ : InstSpecial<0b011, (outs GPR:$Rd), (ins GPR:$Rs1),
|
||||
"trailz\t$Rs1, $Rd",
|
||||
[(set GPR:$Rd, (cttz GPR:$Rs1))]>;
|
||||
let isCodeGenOnly = 1 in
|
||||
def TRAILZUNDEF : InstSpecial<0b011, (outs GPR:$Rd), (ins GPR:$Rs1),
|
||||
"trailz\t$Rs1, $Rd",
|
||||
[(set GPR:$Rd,
|
||||
(cttz_zero_undef GPR:$Rs1))]>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user