Skip to content

Commit 9c118aa

Browse files
committed
[RISCV] Remove unusable pattern from RISCVGISel.td. NFC
This pattern doesn't have a GISelPredicateCode so it's only usable in SDAG.
1 parent b8127cc commit 9c118aa

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

llvm/lib/Target/RISCV/RISCVGISel.td

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ let Predicates = [HasAtomicLdSt, IsRV64] in {
126126
// RV64 i32 patterns not used by SelectionDAG
127127
//===----------------------------------------------------------------------===//
128128

129-
def zext_is_sext : PatFrag<(ops node:$src), (zext node:$src), [{
130-
KnownBits Known = CurDAG->computeKnownBits(N->getOperand(0), 0);
131-
return Known.isNonNegative();
132-
}]>;
133-
134129
let Predicates = [IsRV64] in {
135130
def : LdPat<extloadi8, LBU, i32>; // Prefer unsigned due to no c.lb in Zcb.
136131
def : LdPat<extloadi16, LH, i32>;
@@ -142,9 +137,6 @@ def : Pat<(sext (i32 GPR:$src)), (ADDIW GPR:$src, 0)>;
142137

143138
def : Pat<(sext_inreg (i64 (add GPR:$rs1, simm12_lo:$imm)), i32),
144139
(ADDIW GPR:$rs1, simm12_lo:$imm)>;
145-
146-
// Use sext if the sign bit of the input is 0.
147-
def : Pat<(zext_is_sext (i32 GPR:$src)), (ADDIW GPR:$src, 0)>;
148140
}
149141

150142
let Predicates = [IsRV64, NoStdExtZba] in

0 commit comments

Comments
 (0)