[PATCH] D157509: [LegalizeTypes][RISCV] Enable expanding {S,U}INT_TO_FP for bf16 when bf16 is a legal type

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 07:35:59 PDT 2023


asb created this revision.
asb added reviewers: craig.topper, reames, joshua-arch1.
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.

This finishes enabling all tests in bfloat-convert.ll.

Although in this particular case it should be trivial, this conservatively leaves strict conversions to future work that would introduce proper test coverage. There are substantial gaps here right now for systems where bf16 isn't a legal type - there are no STRICT_BF16_TO_FP or STRICT_FP_TO_BF16 nodes and even for half types where the appropriate node exists, the needed logic isn't yet implemented in LegalizeFloatTypes.cpp.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157509

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157509.548617.patch
Type: text/x-patch
Size: 5404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230809/58679db0/attachment.bin>


More information about the llvm-commits mailing list