This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Use custom lowering for {U,S}INT_TO_FP with i8.
ClosedPublic

Authored by fhahn on Nov 10 2021, 11:55 AM.

Details

Summary

With fullfp16, it is cheaper to cast the {U,S}INT_TO_FP operand to i16
first, rather than promoting it to i32. The custom lowering for
{U,S}INT_TO_FP already supports that, it just needs to be used.

Diff Detail

Event Timeline

fhahn created this revision.Nov 10 2021, 11:55 AM
fhahn requested review of this revision.Nov 10 2021, 11:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2021, 11:56 AM
dmgreen accepted this revision.Nov 10 2021, 10:16 PM

Thanks. LGTM

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
1017

-> Otherwise

1034

It might be worth combining into this if block, to keep the similar code together.

This revision is now accepted and ready to land.Nov 10 2021, 10:16 PM
This revision was automatically updated to reflect the committed changes.
fhahn marked 2 inline comments as done.Nov 11 2021, 12:49 AM
fhahn added inline comments.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
1017

Thanks, the comment change is gone after moving to the existing if/else.

1034

Good point, I moved it to the existing if/else in the committed version. Thanks!