[PATCH] D97130: [RISCV] Have sexti32 also recognize AssertZExt from types smaller than i32.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 20 16:35:49 PST 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoF.td:403
// [u]int->fp. Match GCC and default to using dynamic rounding mode.
-def : Pat<(sint_to_fp (i64 (sexti32 GPR:$rs1))), (FCVT_S_W $rs1, 0b111)>;
+def : Pat<(sint_to_fp (i64 (sexti32 i64:$rs1))), (FCVT_S_W $rs1, 0b111)>;
def : Pat<(uint_to_fp (i64 (zexti32 GPR:$rs1))), (FCVT_S_WU $rs1, 0b111)>;
----------------
The i64 instead of GPR here tricks tablegen into not generating extra patterns for RV32.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97130/new/
https://reviews.llvm.org/D97130
More information about the llvm-commits
mailing list