[PATCH] D78906: [RISCV] Add patterns for indirect float conversions

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 02:25:35 PDT 2020


asb added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoF.td:397-404
-let Predicates = [HasStdExtF, IsRV32] in {
-// FP->[u]int. Round-to-zero must be used
-def : Pat<(fp_to_sint FPR32:$rs1), (FCVT_W_S $rs1, 0b001)>;
-def : Pat<(fp_to_uint FPR32:$rs1), (FCVT_WU_S $rs1, 0b001)>;
 
-// [u]int->fp. Match GCC and default to using dynamic rounding mode.
-def : Pat<(sint_to_fp GPR:$rs1), (FCVT_S_W $rs1, 0b111)>;
----------------
lenary wrote:
> These patterns were duplicated in this file, which seems incorrect.
Looks like a likely holdover of some rebasing. I agree, these patterns can be deleted. Please do land that NFC change directly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78906/new/

https://reviews.llvm.org/D78906





More information about the llvm-commits mailing list