summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-10-03 05:14:59 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-10-03 05:14:59 +0000
commitb1dbce1406421839b85105fc9f8a108b511d0a91 (patch)
treea4fa8795f31696a82dc7dd7b0b2e893dc3d7db52 /llvm/lib/Analysis/ScalarEvolution.cpp
parent3c624b8d0d45ec461723427c56bc3ffe529c3835 (diff)
downloadbcm5719-llvm-b1dbce1406421839b85105fc9f8a108b511d0a91.tar.gz
bcm5719-llvm-b1dbce1406421839b85105fc9f8a108b511d0a91.zip
Revert r140979 due to reports of bootstrap failure.
llvm-svn: 140980
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index a630c7e710d..ea45e9d72c7 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -5119,7 +5119,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) {
// Compute the two solutions for the quadratic formula.
// The divisions must be performed as signed divisions.
APInt NegB(-B);
- APInt TwoA(A << 1);
+ APInt TwoA( A << 1 );
if (TwoA.isMinValue()) {
const SCEV *CNC = SE.getCouldNotCompute();
return std::make_pair(CNC, CNC);
@@ -5134,7 +5134,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) {
return std::make_pair(SE.getConstant(Solution1),
SE.getConstant(Solution2));
- } // end APIntOps namespace
+ } // end APIntOps namespace
}
/// HowFarToZero - Return the number of times a backedge comparing the specified
@@ -5228,12 +5228,8 @@ ScalarEvolution::HowFarToZero(const SCEV *V, const Loop *L) {
// Handle unitary steps, which cannot wraparound.
// 1*N = -Start; -1*N = Start (mod 2^BW), so:
// N = Distance (as unsigned)
- if (StepC->getValue()->equalsInt(1) || StepC->getValue()->isAllOnesValue()) {
- ConstantRange CR = getUnsignedRange(Start);
- const SCEV *MaxBECount = getConstant(CountDown ? CR.getUnsignedMax()
- : ~CR.getUnsignedMin());
- return ExitLimit(Distance, MaxBECount);
- }
+ if (StepC->getValue()->equalsInt(1) || StepC->getValue()->isAllOnesValue())
+ return Distance;
// If the recurrence is known not to wraparound, unsigned divide computes the
// back edge count. We know that the value will either become zero (and thus
OpenPOWER on IntegriCloud