summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-09-06 02:43:13 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-09-06 02:43:13 +0000
commitb1438c763af3bc35fe1f6524b7d8f03efa3e0ffc (patch)
treec1077b078b4d83d7b4a9ccd54fa51d2c8c5fa23d /llvm/lib/Analysis
parent2e8201422d73cea1597fcd6d52df510422428444 (diff)
downloadbcm5719-llvm-b1438c763af3bc35fe1f6524b7d8f03efa3e0ffc.tar.gz
bcm5719-llvm-b1438c763af3bc35fe1f6524b7d8f03efa3e0ffc.zip
Revert r139126 due to selfhost failures reported by buildbots.
llvm-svn: 139130
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index a2cd38b4bf5..8859c3b22fb 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -5184,12 +5184,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