This is an archive of the discontinued LLVM Phabricator instance.

[TargetLowering][RISCV] Improve codegen for saturating bf16 to int conversion
ClosedPublic

Authored by asb on Aug 2 2023, 2:18 PM.

Details

Summary

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.

Diff Detail

Event Timeline

asb created this revision.Aug 2 2023, 2:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 2:18 PM
asb requested review of this revision.Aug 2 2023, 2:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 2:18 PM
asb retitled this revision from [TargetLowering][RISCV] Improve codegen for saturing bf16 to int conversion to [TargetLowering][RISCV] Improve codegen for saturating bf16 to int conversion.Aug 2 2023, 2:25 PM
This revision is now accepted and ready to land.Aug 4 2023, 10:10 PM
This revision was landed with ongoing or failed builds.Aug 7 2023, 3:22 AM
This revision was automatically updated to reflect the committed changes.