This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][WIP] Use various tricks to improve MOVi64imm lowering.
Needs ReviewPublic

Authored by efriedma on Apr 27 2020, 7:17 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Currently, the lowering only uses a single 64-bit MOVN/MOVZ/ORR followed by some number of MOVK instructions. But there are other possibilities: we can also use 32-bit instructions, or other logical operations. This patch adds a bunch of new two-instruction patterns.

I'm not sure how far it's worth going in this direction; these patterns do show up in real code, but they're rare. And thoroughly testing all the various paths is tricky. It's fun to write them, though. :)

I've had this sitting around on my hard drive unfinished for a while; if someone else wants to pick this up, feel free.

Diff Detail