This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add some float -> int -> float conversion patterns
ClosedPublic

Authored by SjoerdMeijer on Mar 19 2021, 8:35 AM.

Details

Summary

This adds some conversion match patterns for which we want to keep the int values in FP registers using the corresponding NEON instructions (not the FP instructions) to avoid more costly int <-> fp register transfers.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Mar 19 2021, 8:35 AM
SjoerdMeijer requested review of this revision.Mar 19 2021, 8:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2021, 8:35 AM

Sounds good to me. Can we add unsigned variants too, to keep them symmetric?

llvm/lib/Target/AArch64/AArch64InstrInfo.td
4752

Should we have a HasNeon predicate?

4756

And for this one do we need HasFullFP16?

Thanks Dave, forgot about the unsigned variants, but have added them now as well as the predicates.

dmgreen accepted this revision.Mar 22 2021, 3:34 AM

Thanks. LGTM

This revision is now accepted and ready to land.Mar 22 2021, 3:34 AM
This revision was landed with ongoing or failed builds.Mar 22 2021, 4:06 AM
This revision was automatically updated to reflect the committed changes.