Skip to content

Commit 272025e

Browse files
committed
[RISCV] Remove unneeded anyext/trunc patterns from RISCVGISel.td. NFC
We have code to manually select these as copies already. There are multiple combinations of types that need to be supported due to s32 and s16 being legal for the GPR register bank. It's simpler to handle generically than to write out all the patterns.
1 parent 119216e commit 272025e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

llvm/lib/Target/RISCV/RISCVGISel.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ def : LdPat<extloadi16, LH, i32>;
138138
def : StPat<truncstorei8, SB, GPR, i32>;
139139
def : StPat<truncstorei16, SH, GPR, i32>;
140140

141-
def : Pat<(anyext (i32 GPR:$src)), (COPY GPR:$src)>;
142141
def : Pat<(sext (i32 GPR:$src)), (ADDIW GPR:$src, 0)>;
143-
def : Pat<(i32 (trunc GPR:$src)), (COPY GPR:$src)>;
144142

145143
def : Pat<(sext_inreg (i64 (add GPR:$rs1, simm12_lo:$imm)), i32),
146144
(ADDIW GPR:$rs1, simm12_lo:$imm)>;

0 commit comments

Comments
 (0)