This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fold G_MUL into XRO load addressing mode when possible
ClosedPublic

Authored by paquette on Jul 23 2019, 4:39 PM.

Details

Summary

If we have a G_MUL, and either the LHS or the RHS of that mul is the legal shift value for a load addressing mode, we can fold it into the load.

This gives some code size savings on some SPEC tests. The best are around 2% on 300.twolf and 3% on 254.gap.

Diff Detail

Event Timeline

paquette created this revision.Jul 23 2019, 4:39 PM
aemerson accepted this revision.Jul 24 2019, 2:54 PM

LGTM.

This revision is now accepted and ready to land.Jul 24 2019, 2:54 PM
This revision was automatically updated to reflect the committed changes.