diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-09 01:22:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-09 01:22:56 +0000 |
commit | b3cdb0ec31482b7fd730ccee92b19455f6f3022b (patch) | |
tree | f7102406d8c82c24f564675dd800344b3225aca2 /lib/Analysis/IVUsers.cpp | |
parent | 094b1c851dbc189aee5db580338c4c2206133b88 (diff) | |
download | llvm-b3cdb0ec31482b7fd730ccee92b19455f6f3022b.tar.gz llvm-b3cdb0ec31482b7fd730ccee92b19455f6f3022b.tar.bz2 llvm-b3cdb0ec31482b7fd730ccee92b19455f6f3022b.tar.xz |
Fix a bug in IVUsers which was permitting non-affine addrecs to
be sent to LSR, which it isn't prepared to handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IVUsers.cpp')
-rw-r--r-- | lib/Analysis/IVUsers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/IVUsers.cpp b/lib/Analysis/IVUsers.cpp index 467f9dd840..c821cc95ca 100644 --- a/lib/Analysis/IVUsers.cpp +++ b/lib/Analysis/IVUsers.cpp @@ -73,8 +73,8 @@ static bool isInteresting(const SCEV *S, const Instruction *I, const Loop *L) { // An addrec is interesting if it's affine or if it has an interesting start. if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { // Keep things simple. Don't touch loop-variant strides. - if (AR->getLoop() == L && (AR->isAffine() || !L->contains(I))) - return true; + if (AR->getLoop() == L) + return AR->isAffine() || !L->contains(I); // Otherwise recurse to see if the start value is interesting. return isInteresting(AR->getStart(), I, L); } |