[AArch64][GlobalISel] Fold G_MUL into XRO load addressing mode when possible
authorJessica Paquette <jpaquette@apple.com>
Wed, 24 Jul 2019 22:49:42 +0000 (22:49 +0000)
committerJessica Paquette <jpaquette@apple.com>
Wed, 24 Jul 2019 22:49:42 +0000 (22:49 +0000)
commit68499112cf6b49aa7ee3a48f17dea7132b84255c
treebb093f58b1887164dea07a1d4563e4bc1828fe04
parent5f4426e517fc26d10db2fd09f3e254e80446d62d
[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

llvm-svn: 366954
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir