diff options
author | Jingyue Wu <jingyue@google.com> | 2015-04-15 16:46:13 +0000 |
---|---|---|
committer | Jingyue Wu <jingyue@google.com> | 2015-04-15 16:46:13 +0000 |
commit | 43885ebb3ab308ddab0273b33118629b65add984 (patch) | |
tree | 6d1f41255cbb25381c58cdd7a5cb0d5e49eeec88 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | f80fc10b9e5e86ea2bf454c5dfc6246b545d940d (diff) | |
download | llvm-43885ebb3ab308ddab0273b33118629b65add984.zip llvm-43885ebb3ab308ddab0273b33118629b65add984.tar.gz llvm-43885ebb3ab308ddab0273b33118629b65add984.tar.bz2 |
[SLSR] handle candidate form (B + i * S)
Summary:
With this patch, SLSR may rewrite
S1: X = B + i * S
S2: Y = B + i' * S
to
S2: Y = X + (i' - i) * S
A secondary improvement: if (i' - i) is a power of 2, emit Y as X + (S << log(i' - i)). (S << log(i' -i)) is in a canonical form and thus more likely GVN'ed than (i' - i) * S.
Test Plan: slsr-add.ll
Reviewers: hfinkel, sanjoy, meheff, broune, eliben
Reviewed By: eliben
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8983
llvm-svn: 235019
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions