summaryrefslogtreecommitdiffstats
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
commitce9dc8699427193cb783b0ac7134a2cb78cacf23 (patch)
treeedb42b1178c968f265790537383c69669e0f94f8
parentdcdcdcdfef3044ead7710c3a636ded2f406c7ecc (diff)
downloadbcm5719-llvm-ce9dc8699427193cb783b0ac7134a2cb78cacf23.tar.gz
bcm5719-llvm-ce9dc8699427193cb783b0ac7134a2cb78cacf23.zip
Fix a scalar evolution bug. Reversing everything
does not work because of 0; 2>0 but -2U is also >0. llvm-svn: 49928
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 4b4b97e2862..0508bb76c1e 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud