[PATCH] D103312: [RISCV] Support vector conversions between fp and i1

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 04:44:37 PDT 2021


frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, HsiangKai, rogfer01, evandro, khchen, arcbbb.
Herald added subscribers: vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

This patch custom lowers FP_TO_[US]INT and [US]INT_TO_FP conversions
between floating-point and boolean vectors. As the default action is
scalarization, this patch both supports scalable-vector conversions and
improves the code generation for fixed-length vectors.

The lowering for these conversions can piggy-back on the existing
lowering, which lowers the operations to a supported narrowing/widening
conversion and then either an extension or truncation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103312

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll
  llvm/test/CodeGen/RISCV/rvv/vfptoi-sdnode.ll
  llvm/test/CodeGen/RISCV/rvv/vitofp-sdnode.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103312.348494.patch
Type: text/x-patch
Size: 159719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210528/cef25945/attachment.bin>


More information about the llvm-commits mailing list