[all-commits] [llvm/llvm-project] c349d7: [SelectionDAG] Rewrite bfloat16 softening to use t...

Benjamin Kramer via All-commits all-commits at lists.llvm.org
Tue Sep 6 02:57:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c349d7f4ff2931840b735b134e56478750f30948
      https://github.com/llvm/llvm-project/commit/c349d7f4ff2931840b735b134e56478750f30948
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2022-09-06 (Tue, 06 Sep 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    M llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
    M llvm/lib/CodeGen/TargetLoweringBase.cpp
    M llvm/test/CodeGen/X86/bfloat.ll

  Log Message:
  -----------
  [SelectionDAG] Rewrite bfloat16 softening to use the "half promotion" path

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

Differential Revision: https://reviews.llvm.org/D133207




More information about the All-commits mailing list