diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-16 02:24:41 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-16 02:24:41 +0000 |
commit | 3e35c8d15e6981ab759820e84ffcb945bfcef71b (patch) | |
tree | 4bd15fb2d258b8154ffec872e2e83e21029be862 /lib/Analysis/ScalarEvolution.cpp | |
parent | 1cd9d77a7dd9eacf0f331dfbf5ff875668ceb604 (diff) |
Revert last patch. It was already fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 89067539c3..473eadcd87 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)); |