[PATCH] D156944: [TargetLowering][RISCV] Improve codegen for saturing bf16 to int conversion

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 14:18:40 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.

Extending to f32 first (as is done for f16) results in better generated code for RISC-V (and affects no other in-tree tests). Additionally, performing the FP_EXTEND first seems equally justified for bf16 and for f16.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156944

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156944.546605.patch
Type: text/x-patch
Size: 9985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230802/381ee673/attachment.bin>


More information about the llvm-commits mailing list