Skip to content

Commit 45e882e

Browse files
committed
[RISCV] Add IsRV32 to some isel patterns not needed for RV64.
1 parent 92ffefe commit 45e882e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoF.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,13 @@ def : LdPat<load, LW_INX, f32>;
708708
def : StPat<store, SW_INX, GPRF32, f32>;
709709
} // Predicates = [HasStdExtZfinx]
710710

711-
let Predicates = [HasStdExtF] in {
711+
let Predicates = [HasStdExtF, IsRV32] in {
712712
// Moves (no conversion)
713713
def : Pat<(bitconvert (i32 GPR:$rs1)), (FMV_W_X GPR:$rs1)>;
714714
def : Pat<(i32 (bitconvert FPR32:$rs1)), (FMV_X_W FPR32:$rs1)>;
715715
} // Predicates = [HasStdExtF]
716716

717-
let Predicates = [HasStdExtZfinx] in {
717+
let Predicates = [HasStdExtZfinx, IsRV32] in {
718718
// Moves (no conversion)
719719
def : Pat<(f32 (bitconvert (i32 GPR:$rs1))), (EXTRACT_SUBREG GPR:$rs1, sub_32)>;
720720
def : Pat<(i32 (bitconvert FPR32INX:$rs1)), (INSERT_SUBREG (XLenVT (IMPLICIT_DEF)), FPR32INX:$rs1, sub_32)>;

0 commit comments

Comments
 (0)