[PATCH] D156990: [LegalizeTypes][RISCV] Support libcalls for fpto{s,u}i of bfloat by extending to f32 first

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 05:06:34 PDT 2023


asb created this revision.
asb added reviewers: craig.topper, reames, bjope.
Herald added subscribers: jobnoorman, luke, wingo, pmatos, VincentWu, vkmr, frasercrmck, 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.
asb requested review of this revision.
Herald added subscribers: wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

As there is no direct bf16 libcall for these conversions, extend to f32 first.

This patch includes a tiny refactoring to pull out equivalent logic in ExpandIntRes_XROUND_XRINT so it can be reused in ExpandIntRes_FP_TO_{S,U}INT.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156990

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/test/CodeGen/RISCV/bfloat-convert.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156990.546810.patch
Type: text/x-patch
Size: 9772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230803/2f01df06/attachment.bin>


More information about the llvm-commits mailing list