- Teach LSR to avoid changing cmp iv stride if it will create an immediate that
authorEvan Cheng <evan.cheng@apple.com>
Thu, 12 Nov 2009 07:35:05 +0000 (07:35 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 12 Nov 2009 07:35:05 +0000 (07:35 +0000)
commit586f69a11881d828c056ce017b3fb432341d9657
treecaf876c0d7890ff0b865674caac6d2118ff94046
parentb9d2c03d200bea99470766b0fb53dd07e11b086a
- Teach LSR to avoid changing cmp iv stride if it will create an immediate that
  cannot be folded into target cmp instruction.
- Avoid a phase ordering issue where early cmp optimization would prevent the
  later count-to-zero optimization.
- Add missing checks which could cause LSR to reuse stride that does not have
  users.
- Fix a bug in count-to-zero optimization code which failed to find the pre-inc
  iv's phi node.
- Remove, tighten, loosen some incorrect checks disable valid transformations.
- Quite a bit of code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86969 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/IVUsers.h
lib/Analysis/IVUsers.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/Thumb2/lsr-deficiency.ll [new file with mode: 0644]