From b3cdb0ec31482b7fd730ccee92b19455f6f3022b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 9 Apr 2010 01:22:56 +0000 Subject: 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 --- lib/Analysis/IVUsers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Analysis/IVUsers.cpp') 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(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); } -- cgit v1.2.3-70-g09d2