This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Rewrite bfloat16 softening to use the "half promotion" path
ClosedPublic

Authored by bkramer on Sep 2 2022, 7:19 AM.

Details

Summary

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

Diff Detail

Event Timeline

bkramer created this revision.Sep 2 2022, 7:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2022, 7:19 AM
bkramer requested review of this revision.Sep 2 2022, 7:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2022, 7:19 AM
pengfei accepted this revision.Sep 5 2022, 6:29 AM
pengfei added a subscriber: craig.topper.

Thanks for working on this! The patch looks good to me, but I'd like @craig.topper to have a look too.

This revision is now accepted and ready to land.Sep 5 2022, 6:29 AM
This revision was landed with ongoing or failed builds.Sep 6 2022, 2:57 AM
This revision was automatically updated to reflect the committed changes.