Page MenuHomePhabricator

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

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

Details

Summary

We can use an ORRWrs (mov) + SUBREG_TO_REG rather than a UBFX for G_ZEXT on
s32->s64.

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: https://godbolt.org/z/h1jKKdx5c

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
llvm/test/CodeGen/AArch64/arm64-rev.ll
117

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.