Fix a copy+pasto.
authorDan Gohman <gohman@apple.com>
Tue, 4 May 2010 01:11:15 +0000 (01:11 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 4 May 2010 01:11:15 +0000 (01:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102996 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index d2b46d6f0d18921c83baf875d862db131eb74f55..758ad070e7c8bec5fb663cbf156ddaac0522e7d9 100644 (file)
@@ -967,8 +967,8 @@ const SCEV *ScalarEvolution::getZeroExtendExpr(const SCEV *Op,
         } else if (isKnownNegative(Step)) {
           const SCEV *N = getConstant(APInt::getMaxValue(BitWidth) -
                                       getSignedRange(Step).getSignedMin());
-          if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_UGT, AR, N) &&
-              (isLoopEntryGuardedByCond(L, ICmpInst::ICMP_UGT, Start, N) ||
+          if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_UGT, AR, N) ||
+              (isLoopEntryGuardedByCond(L, ICmpInst::ICMP_UGT, Start, N) &&
                isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_UGT,
                                            AR->getPostIncExpr(*this), N)))
             // Return the expression with the addrec on the outside.