aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-04-18 21:38:31 +0000
committerDale Johannesen <dalej@apple.com>2008-04-18 21:38:31 +0000
commitcf363181c1b98c0982010cf5714e31b7277bdd2a (patch)
tree42a9e8c7210c3d0bf91be0b0c28e735f9d130604 /lib/Analysis/ScalarEvolution.cpp
parentdc17ab2bf0c4d325b87ac8130004ab11f3f7106d (diff)
Fix a scalar evolution bug. Reversing everything
does not work because of 0; 2>0 but -2U is also >0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 4b4b97e286..0508bb76c1 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -1980,8 +1980,7 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) {
break;
}
case ICmpInst::ICMP_UGT: {
- SCEVHandle TC = HowManyLessThans(SE.getNegativeSCEV(LHS),
- SE.getNegativeSCEV(RHS), L, false);
+ SCEVHandle TC = HowFarToZero(SE.getMinusSCEV(LHS, RHS), L);
if (!isa<SCEVCouldNotCompute>(TC)) return TC;
break;
}