This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Optimize pattern for converting a half word byte swap in a 64-bit input to a rev16 instruction
ClosedPublic

Authored by bipmis on Mar 29 2022, 3:19 AM.

Details

Summary

rev16 instruction is being generated for a half word byte swap on a 32-bit input as a bswap+rotr. This is not true for a 64-bit input.

This patch implements the rev16 instruction for a AArch64 backend for a half word byte swap on a 64-bit input.

Diff Detail

Event Timeline

bipmis created this revision.Mar 29 2022, 3:19 AM
bipmis requested review of this revision.Mar 29 2022, 3:19 AM
samtebbs accepted this revision.Mar 29 2022, 5:24 AM

Nice one. Looks good to me.

This revision is now accepted and ready to land.Mar 29 2022, 5:24 AM
This revision was landed with ongoing or failed builds.Apr 5 2022, 5:43 AM
This revision was automatically updated to reflect the committed changes.