summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-04-20 16:58:57 +0000
committerDale Johannesen <dalej@apple.com>2008-04-20 16:58:57 +0000
commit6145727b4317f3cc5b41f57f0c7021aedff33a39 (patch)
tree76163ade26f9d5a066ec0f9044c05851c28e04ea /llvm/lib/Analysis/ScalarEvolution.cpp
parentab207847408ab0d02774c4419e5e1aeb545261d8 (diff)
downloadbcm5719-llvm-6145727b4317f3cc5b41f57f0c7021aedff33a39.tar.gz
bcm5719-llvm-6145727b4317f3cc5b41f57f0c7021aedff33a39.zip
(re)fix handling of UGT. Pointed out by Nick Lewycky.
llvm-svn: 49991
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 32e9e96a6d8..0a58f2b629d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -1980,7 +1980,8 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) {
break;
}
case ICmpInst::ICMP_UGT: {
- SCEVHandle TC = HowFarToZero(SE.getMinusSCEV(LHS, RHS), L);
+ SCEVHandle TC = HowManyLessThans(SE.getNotSCEV(LHS),
+ SE.getNotSCEV(RHS), L, false);
if (!isa<SCEVCouldNotCompute>(TC)) return TC;
break;
}
OpenPOWER on IntegriCloud