[PATCH] D133207: [SelectionDAG] Rewrite bfloat16 softening to use the "half promotion" path

Benjamin Kramer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 07:19:50 PDT 2022


bkramer created this revision.
bkramer added reviewers: pengfei, LuoYuanke.
Herald added subscribers: ecnelises, hiraditya.
Herald added a project: All.
bkramer requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The main difference is that this preserves intermediate rounding steps,
which the other route doesn't. This aligns bfloat16 more with half
floats, which use this path on most targets.

I didn't understand what the difference was between these softening
approaches when I first added bfloat lowerings, would be nice if we only
had one of them.

Based on @pengfei 's D131502 <https://reviews.llvm.org/D131502>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133207

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  llvm/lib/CodeGen/TargetLoweringBase.cpp
  llvm/test/CodeGen/X86/bfloat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133207.457592.patch
Type: text/x-patch
Size: 23279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220902/5ecf55a0/attachment.bin>


More information about the llvm-commits mailing list