diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 89067539c32..473eadcd878 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -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));