This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Improve orr+movk sequences for MOVi64imm.
ClosedPublic

Authored by efriedma on May 21 2018, 7:14 PM.

Details

Summary

The existing code has three different ways to try to lower a 64-bit immediate to an ORR+MOVK. The result is messy: it misses some possible sequences, and the order of the checks means we sometimes emit ORR+MOVK+MOVK instead of ORR+MOVK.

Instead, just use a simple loop to try all possible two-instruction ORR+MOVK sequences.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.May 21 2018, 7:14 PM
t.p.northover accepted this revision.May 24 2018, 5:14 AM
t.p.northover added a subscriber: t.p.northover.

Looks reasonable to me.

This revision is now accepted and ready to land.May 24 2018, 5:14 AM
This revision was automatically updated to reflect the committed changes.