[llvm] r267108 - [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
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 21 22:13:01 PDT 2016
Author: ctopper
Date: Fri Apr 22 00:13:01 2016
New Revision: 267108
URL: http://llvm.org/viewvc/llvm-project?rev=267108&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Target/Lanai/LanaiISelLowering.cpp
llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td
Modified: llvm/trunk/lib/Target/Lanai/LanaiISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiISelLowering.cpp?rev=267108&r1=267107&r2=267108&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiISelLowering.cpp Fri Apr 22 00:13:01 2016
@@ -111,9 +111,9 @@ LanaiTargetLowering::LanaiTargetLowering
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);
Modified: llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td?rev=267108&r1=267107&r2=267108&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiInstrInfo.td Fri Apr 22 00:13:01 2016
@@ -823,20 +823,11 @@ def POPC: InstSpecial<0b001, (outs GPR:$
// 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))]>;
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list