diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 4b4b97e2862..0508bb76c1e 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(TC)) return TC; break; }