]> granicus.if.org Git - llvm/commit
[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)
commit8e9a370102f0c7ac9eae1d28d1bf32b4656db4ff
treea0e43e3dd946698f8c67367e32919e0eca06bc44
parent6b82f4e52628372b41a7426d4c14b81cbbbc3700
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366954 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstructionSelector.cpp
test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir