HomePhabricator

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

Description

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

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.

Differential Revision: https://reviews.llvm.org/D65173