This is an archive of the discontinued LLVM Phabricator instance.

Implement correct cost for SVE bitcasts

Authored by alban.bridonneau on Jan 24 2022, 1:55 AM.



We have some bitcasts which we know will be simplified,
so their cost is zero.

Diff Detail

Event Timeline

alban.bridonneau requested review of this revision.Jan 24 2022, 1:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2022, 1:55 AM

Looks like a nice improvement @alban.bridonneau! Just had one minor comment on the tests ...


Hi @alban.bridonneau, I think it's also worth adding tests for the inverse case i.e. bitcast <vscale x 2 x half> -> bitcast <vscale x 2 x i16>. The operations should also be free I think.

Adding test cases for float to integer bitcasts

alban.bridonneau marked an inline comment as done.Jan 25 2022, 5:36 AM
alban.bridonneau added inline comments.

Done. I also added the corresponding costs in the TTI

david-arm accepted this revision.Jan 25 2022, 5:37 AM

LGTM! Thanks for the changes @alban.bridonneau.

This revision is now accepted and ready to land.Jan 25 2022, 5:37 AM
sdesmalen accepted this revision.Jan 25 2022, 7:03 AM
Matt added a subscriber: Matt.Jan 25 2022, 3:23 PM
This revision was landed with ongoing or failed builds.Jan 26 2022, 6:26 AM
This revision was automatically updated to reflect the committed changes.