[SLSR] handles off bounds GEPs
authorJingyue Wu <jingyue@google.com>
Thu, 2 Apr 2015 21:18:32 +0000 (21:18 +0000)
committerJingyue Wu <jingyue@google.com>
Thu, 2 Apr 2015 21:18:32 +0000 (21:18 +0000)
commit6dedfc073afdcf8407bd7fe0a1e22172e3b6ea88
treec92067e7eff58de4b373ba7d70b06eb6075d050c
parentdf4fd4fc4ef483341fa866ae0d3788a15bc01877
[SLSR] handles off bounds GEPs

Summary:
The old requirement on GEP candidates being in bounds is unnecessary.
For off-bound GEPs, we still have

  &B[i * S] = B + (i * S) * e = B + (i * e) * S

Test Plan: slsr_offbound_gep in slsr-gep.ll

Reviewers: meheff

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8809

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233949 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
test/Transforms/StraightLineStrengthReduce/slsr-gep.ll