aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/ScalarEvolution.cpp
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
commitb2840fdcd8a98de32e86e70a267b54cf0af35140 (patch)
tree7eba2990a61df35b99228a924255c6bf7999efc5 /lib/Analysis/ScalarEvolution.cpp
parent77b7352db027cb486d25a92c2756c379a3073d7f (diff)
downloadexternal_llvm-b2840fdcd8a98de32e86e70a267b54cf0af35140.zip
external_llvm-b2840fdcd8a98de32e86e70a267b54cf0af35140.tar.gz
external_llvm-b2840fdcd8a98de32e86e70a267b54cf0af35140.tar.bz2
Revert r139126 due to selfhost failures reported by buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index a2cd38b..8859c3b 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/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