Revert last patch. It was already fixed.
authorReid Spencer <rspencer@reidspencer.com>
Mon, 16 Apr 2007 02:24:41 +0000 (02:24 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 16 Apr 2007 02:24:41 +0000 (02:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36102 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 89067539c32e465c75baae7caca48c91a8a85773..473eadcd87864bac583aefbffb628813789757f4 100644 (file)
@@ -2125,12 +2125,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec) {
     // Compute the two solutions for the quadratic formula. 
     // The divisions must be performed as signed divisions.
     APInt NegB(-B);
-    APInt TwoA( A << Two );
-    if (TwoA == 0) {
-      const Type* Ty = LC->getValue()->getType();
-      return std::make_pair(SCEVUnknown::get(UndefValue::get(Ty)),
-                            SCEVUnknown::get(UndefValue::get(Ty)));
-    }
+    APInt TwoA( A << 1 );
     ConstantInt *Solution1 = ConstantInt::get((NegB + SqrtVal).sdiv(TwoA));
     ConstantInt *Solution2 = ConstantInt::get((NegB - SqrtVal).sdiv(TwoA));