Page MenuHomePhabricator

[AArch64][GlobalISel] Prefer mov for s32->s64 G_ZEXT

Authored by paquette on May 17 2021, 4:08 PM.



We can use an ORRWrs (mov) + SUBREG_TO_REG rather than a UBFX for G_ZEXT on

This closer matches what SDAG does, and is likely more power efficient etc.

(Also fixed up arm64-rev.ll which had a fallback check line which was entirely useless.)

Simple example:

Diff Detail

Event Timeline

paquette created this revision.May 17 2021, 4:08 PM
paquette requested review of this revision.May 17 2021, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2021, 4:08 PM
paquette added inline comments.May 17 2021, 4:10 PM

This is the case that actually changed here. We probably shouldn't actually emit the mov to match SDAG. I think that's a different patch though.

This revision is now accepted and ready to land.May 18 2021, 8:30 AM
This revision was automatically updated to reflect the committed changes.