This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Implement soft FP legalisation for bf16 FP_EXTEND and BF16_TO_FP
ClosedPublic

Authored by asb on May 26 2023, 6:37 AM.

Details

Summary

As discussed in D151436, it's safe to do this as a simple shift (as is done in LegalizeDAG.cpp) rather than needing a libcall. The added test cases for RISC-V previously just triggered an assertion.

Diff Detail

Unit TestsFailed

Event Timeline

asb created this revision.May 26 2023, 6:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 6:37 AM
asb requested review of this revision.May 26 2023, 6:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 6:37 AM
craig.topper accepted this revision.May 26 2023, 8:42 AM

LGTM

llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
110

Format this like the others lines?

This revision is now accepted and ready to land.May 26 2023, 8:42 AM
asb updated this revision to Diff 526189.May 26 2023, 2:03 PM
asb marked an inline comment as done.
This revision was landed with ongoing or failed builds.May 29 2023, 2:34 AM
This revision was automatically updated to reflect the committed changes.