[PATCH] D141599: [RISCV] Generalize performFP_TO_INTCombine to vectors

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 04:25:34 PST 2023


luke created this revision.
luke added reviewers: asb, reames, craig.topper.
Herald added subscribers: sunshaoce, pmatos, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

Like in the scalar domain, combine calls to (fp_to_int (ftrunc X)) on
scalable and fixed-length vectors into a single vfcvt instruction.
For truncating rounds, the static vfcvt.rtz rounding mode is used.
Otherwise use the VFCVT_RM_ variants to set the rounding mode
dynamically.
Closes #56737


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141599

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.h
  llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
  llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
  llvm/test/CodeGen/RISCV/rvv/double-round-conv.ll
  llvm/test/CodeGen/RISCV/rvv/float-round-conv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141599.488599.patch
Type: text/x-patch
Size: 19505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/e7196e23/attachment-0001.bin>


More information about the llvm-commits mailing list