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 | ee6451dca187e524799bfd574c31bdd5b05fe9b1 (patch) | |
| tree | 55cc1028736eb5ca4d063ca97edee8dbfcbdf80f /llvm/lib/Analysis/IVUsers.cpp | |
| parent | 9c3d160039d6ab1be9d09be0b7b4967048bceaa9 (diff) | |
| download | bcm5719-llvm-ee6451dca187e524799bfd574c31bdd5b05fe9b1.tar.gz bcm5719-llvm-ee6451dca187e524799bfd574c31bdd5b05fe9b1.zip | |
Fix a bug in IVUsers which was permitting non-affine addrecs to
be sent to LSR, which it isn't prepared to handle.
llvm-svn: 100839
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
| -rw-r--r-- | llvm/lib/Analysis/IVUsers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp index 467f9dd840b..c821cc95ca1 100644 --- a/llvm/lib/Analysis/IVUsers.cpp +++ b/llvm/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); } |

