aboutsummaryrefslogtreecommitdiffstats
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
commit6d2a23e573e13973de286cc337ea6345e5d02a0a (patch)
tree42a9e8c7210c3d0bf91be0b0c28e735f9d130604
parent688479740ba49f116496ec81879eb4e379c86bf7 (diff)
downloadexternal_llvm-6d2a23e573e13973de286cc337ea6345e5d02a0a.zip
external_llvm-6d2a23e573e13973de286cc337ea6345e5d02a0a.tar.gz
external_llvm-6d2a23e573e13973de286cc337ea6345e5d02a0a.tar.bz2
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
-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 4b4b97e..0508bb7 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;
}