[llvm] 6fdd62c - [RISCV] Remove unused code

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 28 19:44:30 PDT 2022


Author: liqinweng
Date: 2022-08-29T10:16:44+08:00
New Revision: 6fdd62c98da0707b66ecd245788f8d85be8bcb71

URL: https://github.com/llvm/llvm-project/commit/6fdd62c98da0707b66ecd245788f8d85be8bcb71
DIFF: https://github.com/llvm/llvm-project/commit/6fdd62c98da0707b66ecd245788f8d85be8bcb71.diff

LOG: [RISCV] Remove unused code

Reviewed By: benshi001

Differential Revision: https://reviews.llvm.org/D132281

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
index 9b536e824b81..404d86e64fe8 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td
@@ -366,15 +366,6 @@ def ixlenimm_li : Operand<XLenVT> {
 def simm12_plus1 : ImmLeaf<XLenVT,
   [{return (isInt<12>(Imm) && Imm != -2048) || Imm == 2048;}]>;
 
-// A 12-bit signed immediate sub one and exclude zero
-def simm12_minus1_nonzero : PatLeaf<(imm), [{
-  if (!N->hasOneUse())
-    return false;
-  // The immediate operand must be in range [-2049, 0) or (0, 2046].
-  int64_t Imm = N->getSExtValue();
-  return (Imm >= -2049 && Imm < 0) || (Imm > 0 && Imm <= 2046);
-}]>;
-
 // A 6-bit constant greater than 32.
 def uimm6gt32 : ImmLeaf<XLenVT, [{
   return isUInt<6>(Imm) && Imm > 32;
@@ -398,12 +389,6 @@ def ImmSub32 : SDNodeXForm<imm, [{
                                    N->getValueType(0));
 }]>;
 
-// Return an immediate value plus 1.
-def ImmPlus1 : SDNodeXForm<imm, [{
-  return CurDAG->getTargetConstant(N->getSExtValue() + 1, SDLoc(N),
-                                   N->getValueType(0));
-}]>;
-
 // Return an immediate subtracted from XLen.
 def ImmSubFromXLen : SDNodeXForm<imm, [{
   uint64_t XLen = Subtarget->getXLen();


        


More information about the llvm-commits mailing list