diff options
author | Dan Gohman <gohman@apple.com> | 2010-02-19 18:12:07 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-02-19 18:12:07 +0000 |
commit | 00cb5b724547a821516292fe5cded7c6a5358bda (patch) | |
tree | a7de32f5f0495e9ca18a39599e62d221d4edf950 /test/Transforms/IndVarSimplify | |
parent | 6b89aa57e6506f073579398bd74845db9463b9f1 (diff) |
Teach ScalarEvolution how to compute a tripcount for a loop with
true or false as its exit condition. These are usually eliminated by
SimplifyCFG, but the may be left around during a pass which wishes
to preserve the CFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IndVarSimplify')
8 files changed, 12 insertions, 12 deletions
diff --git a/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll b/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll index 36d50065d3..30d9ea6fb3 100644 --- a/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll +++ b/test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll @@ -7,7 +7,7 @@ define i32 @test() { LoopHead: ; preds = %LoopHead, %0, %0 %A = phi i32 [ 7, %0 ], [ 7, %0 ], [ %B, %LoopHead ] ; <i32> [#uses=1] %B = add i32 %A, 1 ; <i32> [#uses=2] - br i1 false, label %LoopHead, label %Out + br i1 undef, label %LoopHead, label %Out Out: ; preds = %LoopHead ret i32 %B diff --git a/test/Transforms/IndVarSimplify/2003-12-10-RemoveInstrCrash.ll b/test/Transforms/IndVarSimplify/2003-12-10-RemoveInstrCrash.ll index 70ea11ebf0..7536331475 100644 --- a/test/Transforms/IndVarSimplify/2003-12-10-RemoveInstrCrash.ll +++ b/test/Transforms/IndVarSimplify/2003-12-10-RemoveInstrCrash.ll @@ -10,7 +10,7 @@ no_exit: ; preds = %no_exit, %entry %k.0.pn = phi i32 [ %inc.4, %no_exit ], [ 1, %entry ] ; <i32> [#uses=1] %inc.3 = add i32 %j.0.pn, 1 ; <i32> [#uses=1] %inc.4 = add i32 %k.0.pn, 1 ; <i32> [#uses=1] - br i1 false, label %no_exit, label %loopexit + br i1 undef, label %no_exit, label %loopexit loopexit: ; preds = %no_exit, %entry ret void diff --git a/test/Transforms/IndVarSimplify/2003-12-15-Crash.ll b/test/Transforms/IndVarSimplify/2003-12-15-Crash.ll index 5aa2d90a42..662828c749 100644 --- a/test/Transforms/IndVarSimplify/2003-12-15-Crash.ll +++ b/test/Transforms/IndVarSimplify/2003-12-15-Crash.ll @@ -8,7 +8,7 @@ cond_continue.3: ; preds = %entry loopexit.14: ; preds = %entry %tmp.738 = sub i32 0, 0 ; <i32> [#uses=1] - br i1 false, label %no_exit.15.preheader, label %loopexit.15 + br i1 undef, label %no_exit.15.preheader, label %loopexit.15 no_exit.15.preheader: ; preds = %loopexit.14 br label %no_exit.15 @@ -16,7 +16,7 @@ no_exit.15.preheader: ; preds = %loopexit.14 no_exit.15: ; preds = %no_exit.15, %no_exit.15.preheader %highC.0 = phi i32 [ %tmp.738, %no_exit.15.preheader ], [ %dec.0, %no_exit.15 ] ; <i32> [#uses=1] %dec.0 = add i32 %highC.0, -1 ; <i32> [#uses=1] - br i1 false, label %no_exit.15, label %loopexit.15 + br i1 undef, label %no_exit.15, label %loopexit.15 loopexit.15: ; preds = %no_exit.15, %loopexit.14 ret void diff --git a/test/Transforms/IndVarSimplify/2005-11-18-Crash.ll b/test/Transforms/IndVarSimplify/2005-11-18-Crash.ll index f9a3fe6233..7202c7ae9d 100644 --- a/test/Transforms/IndVarSimplify/2005-11-18-Crash.ll +++ b/test/Transforms/IndVarSimplify/2005-11-18-Crash.ll @@ -9,7 +9,7 @@ entry: no_exit.0: ; preds = %no_exit.0, %entry %p.0.0 = phi i32* [ getelementptr ([29 x [29 x [2 x i32]]]* @fixtab, i32 0, i32 0, i32 0, i32 0), %entry ], [ %inc.0, %no_exit.0 ] ; <i32*> [#uses=1] %inc.0 = getelementptr i32* %p.0.0, i32 1 ; <i32*> [#uses=1] - br i1 false, label %no_exit.0, label %no_exit.1 + br i1 undef, label %no_exit.0, label %no_exit.1 no_exit.1: ; preds = %no_exit.0 ret void diff --git a/test/Transforms/IndVarSimplify/2006-12-10-BitCast.ll b/test/Transforms/IndVarSimplify/2006-12-10-BitCast.ll index 79ac1f072d..80c9ebf2f0 100644 --- a/test/Transforms/IndVarSimplify/2006-12-10-BitCast.ll +++ b/test/Transforms/IndVarSimplify/2006-12-10-BitCast.ll @@ -20,7 +20,7 @@ cond_next182.i: ; preds = %cond_next182.i, %cond_true52 %tmp194.i53 = bitcast i32 %decay.i.0 to float ; <float> [#uses=1] %tmp195.i = fsub float %tmp194.i53, 8.000000e+00 ; <float> [#uses=1] %tmp195.i.upgrd.1 = bitcast float %tmp195.i to i32 ; <i32> [#uses=1] - br i1 false, label %cond_next182.i, label %bb418.i.preheader + br i1 undef, label %cond_next182.i, label %bb418.i.preheader bb418.i.preheader: ; preds = %cond_next182.i ret void diff --git a/test/Transforms/IndVarSimplify/2009-05-24-useafterfree.ll b/test/Transforms/IndVarSimplify/2009-05-24-useafterfree.ll index 9ad86913e2..d73eee812b 100644 --- a/test/Transforms/IndVarSimplify/2009-05-24-useafterfree.ll +++ b/test/Transforms/IndVarSimplify/2009-05-24-useafterfree.ll @@ -12,7 +12,7 @@ bb.nph1.preheader: ; preds = %4 br label %bb.nph1 bb.nph1: ; preds = %.outer, %bb.nph1.preheader - br i1 false, label %bb.nph3.preheader, label %.outer + br i1 undef, label %bb.nph3.preheader, label %.outer bb.nph3.preheader: ; preds = %bb.nph1 br label %bb.nph3 @@ -31,7 +31,7 @@ bb.nph3: ; preds = %bb.nph3, %bb.nph3.preheader br label %.outer .outer: ; preds = %.outer.loopexit, %bb.nph1 - br i1 false, label %bb.nph1, label %.outer._crit_edge.loopexit + br i1 undef, label %bb.nph1, label %.outer._crit_edge.loopexit .outer._crit_edge.loopexit: ; preds = %.outer br label %.outer._crit_edge diff --git a/test/Transforms/IndVarSimplify/avoid-i0.ll b/test/Transforms/IndVarSimplify/avoid-i0.ll index d110a8a7ba..59661fa2e8 100644 --- a/test/Transforms/IndVarSimplify/avoid-i0.ll +++ b/test/Transforms/IndVarSimplify/avoid-i0.ll @@ -10,13 +10,13 @@ entry: bb: ; preds = %bb6, %entry %p_71_addr.0 = phi i8 [ %p_71, %entry ], [ %0, %bb6 ] ; <i8> [#uses=0] - br i1 false, label %bb4, label %bb1 + br i1 undef, label %bb4, label %bb1 bb1: ; preds = %bb ret i32 0 bb4: ; preds = %bb4, %bb - br i1 false, label %bb6, label %bb4 + br i1 undef, label %bb6, label %bb4 bb6: ; preds = %bb4 %0 = and i8 0, 0 ; <i8> [#uses=1] diff --git a/test/Transforms/IndVarSimplify/max-pointer.ll b/test/Transforms/IndVarSimplify/max-pointer.ll index 71bc720d5e..f18f968f59 100644 --- a/test/Transforms/IndVarSimplify/max-pointer.ll +++ b/test/Transforms/IndVarSimplify/max-pointer.ll @@ -16,7 +16,7 @@ bb2: ; preds = %bb2, %entry %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; <i8*> [#uses=1] %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; <i8*> [#uses=2] %2 = icmp ult i8* %1, %inLastBytePtr ; <i1> [#uses=0] - br i1 false, label %bb2, label %return + br i1 undef, label %bb2, label %return return: ; preds = %bb2 ret void @@ -32,7 +32,7 @@ bb2: ; preds = %bb2, %entry %str2Ptr_addr.1 = phi i8* [ %str2Ptr_addr.0, %entry ], [ %1, %bb2 ] ; <i8*> [#uses=1] %1 = getelementptr i8* %str2Ptr_addr.1, i64 1 ; <i8*> [#uses=2] %2 = icmp slt i8* %1, %inLastBytePtr ; <i1> [#uses=0] - br i1 false, label %bb2, label %return + br i1 undef, label %bb2, label %return return: ; preds = %bb2 ret void |