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
diff --git a/lib/Analysis/IVUsers.cpp b/lib/Analysis/IVUsers.cpp
index 467f9dd..c821cc9 100644
--- a/lib/Analysis/IVUsers.cpp
+++ b/lib/Analysis/IVUsers.cpp
@@ -73,8 +73,8 @@
   // 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);
   }