diff options
author | Dale Johannesen <dalej@apple.com> | 2008-04-20 16:58:57 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-04-20 16:58:57 +0000 |
commit | 6145727b4317f3cc5b41f57f0c7021aedff33a39 (patch) | |
tree | 76163ade26f9d5a066ec0f9044c05851c28e04ea /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | ab207847408ab0d02774c4419e5e1aeb545261d8 (diff) | |
download | bcm5719-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.cpp | 3 |
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; } |