From 90c2f1455ae1e88aa31e68f4e7cdcdf955c945ed Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Wed, 15 Oct 2014 19:25:28 +0000 Subject: Teach ScalarEvolution to sharpen range information. If x is known to have the range [a, b) in a loop predicated by (icmp ne x, a), its range can be sharpened to [a + 1, b). Get ScalarEvolution and hence IndVars to exploit this fact. This change triggers an optimization to widen-loop-comp.ll, so it had to be edited to get it to pass. phabricator: http://reviews.llvm.org/D5639 llvm-svn: 219834 --- llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll') diff --git a/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll b/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll index bfe74afe894..0930a0c4139 100644 --- a/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll +++ b/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll @@ -67,8 +67,7 @@ for.end: define void @test2([8 x i8]* %a, i8* %b, i8 %limit) { entry: %conv = zext i8 %limit to i32 - %cmp23 = icmp eq i8 %limit, 0 - br i1 %cmp23, label %for.cond1.preheader, label %for.cond1.preheader.us + br i1 undef, label %for.cond1.preheader, label %for.cond1.preheader.us for.cond1.preheader.us: %storemerge5.us = phi i32 [ 0, %entry ], [ %inc14.us, %for.inc13.us ] -- cgit v1.2.3