diff options
author | Shih-wei Liao <sliao@google.com> | 2010-02-10 11:10:31 -0800 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2010-02-10 11:10:31 -0800 |
commit | e264f62ca09a8f65c87a46d562a4d0f9ec5d457e (patch) | |
tree | 59e3d57ef656cef79afa708ae0a3daf25cd91fcf /test/Analysis/PostDominators | |
download | external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.zip external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.tar.gz external_llvm-e264f62ca09a8f65c87a46d562a4d0f9ec5d457e.tar.bz2 |
Check in LLVM r95781.
Diffstat (limited to 'test/Analysis/PostDominators')
-rw-r--r-- | test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll | 97 | ||||
-rw-r--r-- | test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll | 692 | ||||
-rw-r--r-- | test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll | 28 | ||||
-rw-r--r-- | test/Analysis/PostDominators/dg.exp | 3 | ||||
-rw-r--r-- | test/Analysis/PostDominators/pr1098.ll | 14 | ||||
-rw-r--r-- | test/Analysis/PostDominators/pr6047_a.ll | 15 | ||||
-rw-r--r-- | test/Analysis/PostDominators/pr6047_b.ll | 19 | ||||
-rw-r--r-- | test/Analysis/PostDominators/pr6047_c.ll | 147 | ||||
-rw-r--r-- | test/Analysis/PostDominators/pr6047_d.ll | 24 |
9 files changed, 1039 insertions, 0 deletions
diff --git a/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll b/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll new file mode 100644 index 0000000..b73b7f0 --- /dev/null +++ b/test/Analysis/PostDominators/2006-09-26-PostDominanceFrontier.ll @@ -0,0 +1,97 @@ +; RUN: opt < %s -analyze -postdomfrontier \ +; RUN: -disable-verify +; ModuleID = '2006-09-26-PostDominanceFrontier.bc' +target datalayout = "e-p:64:64" +target triple = "alphaev67-unknown-linux-gnu" + %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [44 x i8] } + %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } +@TOP = external global i64* ; <i64**> [#uses=1] +@BOT = external global i64* ; <i64**> [#uses=1] +@str = external global [2 x i8] ; <[2 x i8]*> [#uses=0] + +declare void @fopen() + +define void @main(i8** %argv) { +entry: + %netSelect.i507 = alloca i64, align 8 ; <i64*> [#uses=0] + %topStart.i = alloca i64, align 8 ; <i64*> [#uses=0] + %topEnd.i = alloca i64, align 8 ; <i64*> [#uses=0] + %botStart.i = alloca i64, align 8 ; <i64*> [#uses=0] + %botEnd.i = alloca i64, align 8 ; <i64*> [#uses=0] + %c1.i154 = alloca i32, align 4 ; <i32*> [#uses=0] + %b1.i155 = alloca i32, align 4 ; <i32*> [#uses=0] + %t1.i156 = alloca i32, align 4 ; <i32*> [#uses=0] + %c1.i = alloca i32, align 4 ; <i32*> [#uses=0] + %b1.i = alloca i32, align 4 ; <i32*> [#uses=0] + %t1.i = alloca i32, align 4 ; <i32*> [#uses=0] + %netSelect.i5 = alloca i64, align 8 ; <i64*> [#uses=0] + %netSelect.i = alloca i64, align 8 ; <i64*> [#uses=0] + %tmp2.i = getelementptr i8** %argv, i32 1 ; <i8**> [#uses=1] + %tmp3.i4 = load i8** %tmp2.i ; <i8*> [#uses=0] + call void @fopen( ) + br i1 false, label %DimensionChannel.exit, label %bb.backedge.i + +bb.backedge.i: ; preds = %entry + ret void + +DimensionChannel.exit: ; preds = %entry + %tmp13.i137 = malloc i64, i32 0 ; <i64*> [#uses=1] + %tmp610.i = malloc i64, i32 0 ; <i64*> [#uses=1] + br label %cond_true.i143 + +cond_true.i143: ; preds = %cond_true.i143, %DimensionChannel.exit + %tmp9.i140 = getelementptr i64* %tmp13.i137, i64 0 ; <i64*> [#uses=0] + %tmp12.i = getelementptr i64* %tmp610.i, i64 0 ; <i64*> [#uses=0] + br i1 false, label %bb18.i144, label %cond_true.i143 + +bb18.i144: ; preds = %cond_true.i143 + call void @fopen( ) + %tmp76.i105 = malloc i64, i32 0 ; <i64*> [#uses=3] + %tmp674.i = malloc i64, i32 0 ; <i64*> [#uses=2] + %tmp1072.i = malloc i64, i32 0 ; <i64*> [#uses=2] + %tmp1470.i = malloc i64, i32 0 ; <i64*> [#uses=1] + br label %cond_true.i114 + +cond_true.i114: ; preds = %cond_true.i114, %bb18.i144 + %tmp17.i108 = getelementptr i64* %tmp76.i105, i64 0 ; <i64*> [#uses=0] + %tmp20.i = getelementptr i64* %tmp674.i, i64 0 ; <i64*> [#uses=0] + %tmp23.i111 = getelementptr i64* %tmp1470.i, i64 0 ; <i64*> [#uses=0] + br i1 false, label %cond_true40.i, label %cond_true.i114 + +cond_true40.i: ; preds = %cond_true40.i, %cond_true.i114 + %tmp33.i115 = getelementptr i64* %tmp1072.i, i64 0 ; <i64*> [#uses=0] + br i1 false, label %bb142.i, label %cond_true40.i + +cond_next54.i: ; preds = %cond_true76.i + %tmp57.i = getelementptr i64* %tmp55.i, i64 0 ; <i64*> [#uses=0] + br i1 false, label %bb64.i, label %bb69.i + +bb64.i: ; preds = %cond_true76.i, %cond_next54.i + %tmp67.i117 = getelementptr i64* %tmp76.i105, i64 0 ; <i64*> [#uses=0] + br i1 false, label %bb114.i, label %cond_true111.i + +bb69.i: ; preds = %cond_next54.i + br i1 false, label %bb79.i, label %cond_true76.i + +cond_true76.i: ; preds = %bb142.i, %bb69.i + %tmp48.i = getelementptr i64* %tmp46.i, i64 0 ; <i64*> [#uses=0] + br i1 false, label %bb64.i, label %cond_next54.i + +bb79.i: ; preds = %bb69.i + br i1 false, label %bb114.i, label %cond_true111.i + +cond_true111.i: ; preds = %bb79.i, %bb64.i + %tmp84.i127 = getelementptr i64* %tmp46.i, i64 0 ; <i64*> [#uses=0] + ret void + +bb114.i: ; preds = %bb142.i, %bb79.i, %bb64.i + %tmp117.i = getelementptr i64* %tmp76.i105, i64 0 ; <i64*> [#uses=0] + %tmp132.i131 = getelementptr i64* %tmp674.i, i64 0 ; <i64*> [#uses=0] + %tmp122.i = getelementptr i64* %tmp1072.i, i64 0 ; <i64*> [#uses=0] + ret void + +bb142.i: ; preds = %cond_true40.i + %tmp46.i = load i64** @BOT ; <i64*> [#uses=2] + %tmp55.i = load i64** @TOP ; <i64*> [#uses=1] + br i1 false, label %bb114.i, label %cond_true76.i +} diff --git a/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll b/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll new file mode 100644 index 0000000..1ec056b --- /dev/null +++ b/test/Analysis/PostDominators/2007-04-17-PostDominanceFrontier.ll @@ -0,0 +1,692 @@ +; RUN: opt < %s -postdomfrontier -disable-output + +define void @SManager() { +entry: + br label %bb.outer + +bb.outer: ; preds = %bb193, %entry + br label %bb.outer156 + +bb.loopexit: ; preds = %bb442 + br label %bb.outer156 + +bb.outer156: ; preds = %bb.loopexit, %bb.outer + br label %bb + +bb: ; preds = %bb.backedge, %bb.outer156 + br i1 false, label %cond_true, label %bb.cond_next_crit_edge + +bb.cond_next_crit_edge: ; preds = %bb + br label %cond_next + +cond_true: ; preds = %bb + br label %cond_next + +cond_next: ; preds = %cond_true, %bb.cond_next_crit_edge + br i1 false, label %cond_next.bb.backedge_crit_edge, label %cond_next107 + +cond_next.bb.backedge_crit_edge: ; preds = %cond_next + br label %bb.backedge + +bb.backedge: ; preds = %cond_true112.bb.backedge_crit_edge, %cond_next.bb.backedge_crit_edge + br label %bb + +cond_next107: ; preds = %cond_next + br i1 false, label %cond_true112, label %cond_next197 + +cond_true112: ; preds = %cond_next107 + br i1 false, label %cond_true118, label %cond_true112.bb.backedge_crit_edge + +cond_true112.bb.backedge_crit_edge: ; preds = %cond_true112 + br label %bb.backedge + +cond_true118: ; preds = %cond_true112 + br i1 false, label %bb123.preheader, label %cond_true118.bb148_crit_edge + +cond_true118.bb148_crit_edge: ; preds = %cond_true118 + br label %bb148 + +bb123.preheader: ; preds = %cond_true118 + br label %bb123 + +bb123: ; preds = %bb142.bb123_crit_edge, %bb123.preheader + br i1 false, label %bb123.bb142_crit_edge, label %cond_next.i57 + +bb123.bb142_crit_edge: ; preds = %bb123 + br label %bb142 + +cond_next.i57: ; preds = %bb123 + br i1 false, label %cond_true135, label %cond_next.i57.bb142_crit_edge + +cond_next.i57.bb142_crit_edge: ; preds = %cond_next.i57 + br label %bb142 + +cond_true135: ; preds = %cond_next.i57 + br label %bb142 + +bb142: ; preds = %cond_true135, %cond_next.i57.bb142_crit_edge, %bb123.bb142_crit_edge + br i1 false, label %bb148.loopexit, label %bb142.bb123_crit_edge + +bb142.bb123_crit_edge: ; preds = %bb142 + br label %bb123 + +bb148.loopexit: ; preds = %bb142 + br label %bb148 + +bb148: ; preds = %bb148.loopexit, %cond_true118.bb148_crit_edge + br i1 false, label %bb151.preheader, label %bb148.bb177_crit_edge + +bb148.bb177_crit_edge: ; preds = %bb148 + br label %bb177 + +bb151.preheader: ; preds = %bb148 + br label %bb151 + +bb151: ; preds = %bb171.bb151_crit_edge, %bb151.preheader + br i1 false, label %bb151.bb171_crit_edge, label %cond_next.i49 + +bb151.bb171_crit_edge: ; preds = %bb151 + br label %bb171 + +cond_next.i49: ; preds = %bb151 + br i1 false, label %cond_true164, label %cond_next.i49.bb171_crit_edge + +cond_next.i49.bb171_crit_edge: ; preds = %cond_next.i49 + br label %bb171 + +cond_true164: ; preds = %cond_next.i49 + br label %bb171 + +bb171: ; preds = %cond_true164, %cond_next.i49.bb171_crit_edge, %bb151.bb171_crit_edge + br i1 false, label %bb177.loopexit, label %bb171.bb151_crit_edge + +bb171.bb151_crit_edge: ; preds = %bb171 + br label %bb151 + +bb177.loopexit: ; preds = %bb171 + br label %bb177 + +bb177: ; preds = %bb177.loopexit, %bb148.bb177_crit_edge + br i1 false, label %bb180.preheader, label %bb177.bb193_crit_edge + +bb177.bb193_crit_edge: ; preds = %bb177 + br label %bb193 + +bb180.preheader: ; preds = %bb177 + br label %bb180 + +bb180: ; preds = %bb180.bb180_crit_edge, %bb180.preheader + br i1 false, label %bb193.loopexit, label %bb180.bb180_crit_edge + +bb180.bb180_crit_edge: ; preds = %bb180 + br label %bb180 + +bb193.loopexit: ; preds = %bb180 + br label %bb193 + +bb193: ; preds = %bb193.loopexit, %bb177.bb193_crit_edge + br label %bb.outer + +cond_next197: ; preds = %cond_next107 + br i1 false, label %cond_next210, label %cond_true205 + +cond_true205: ; preds = %cond_next197 + br i1 false, label %cond_true205.bb213_crit_edge, label %cond_true205.bb299_crit_edge + +cond_true205.bb299_crit_edge: ; preds = %cond_true205 + br label %bb299 + +cond_true205.bb213_crit_edge: ; preds = %cond_true205 + br label %bb213 + +cond_next210: ; preds = %cond_next197 + br label %bb293 + +bb213: ; preds = %bb293.bb213_crit_edge, %cond_true205.bb213_crit_edge + br i1 false, label %bb213.cond_next290_crit_edge, label %cond_true248 + +bb213.cond_next290_crit_edge: ; preds = %bb213 + br label %cond_next290 + +cond_true248: ; preds = %bb213 + br i1 false, label %cond_true248.cond_next290_crit_edge, label %cond_true255 + +cond_true248.cond_next290_crit_edge: ; preds = %cond_true248 + br label %cond_next290 + +cond_true255: ; preds = %cond_true248 + br i1 false, label %cond_true266, label %cond_true255.cond_next271_crit_edge + +cond_true255.cond_next271_crit_edge: ; preds = %cond_true255 + br label %cond_next271 + +cond_true266: ; preds = %cond_true255 + br label %cond_next271 + +cond_next271: ; preds = %cond_true266, %cond_true255.cond_next271_crit_edge + br label %cond_next290 + +cond_next290: ; preds = %cond_next271, %cond_true248.cond_next290_crit_edge, %bb213.cond_next290_crit_edge + br label %bb293 + +bb293: ; preds = %cond_next290, %cond_next210 + br i1 false, label %bb293.bb213_crit_edge, label %bb293.bb299_crit_edge + +bb293.bb299_crit_edge: ; preds = %bb293 + br label %bb299 + +bb293.bb213_crit_edge: ; preds = %bb293 + br label %bb213 + +bb299: ; preds = %bb293.bb299_crit_edge, %cond_true205.bb299_crit_edge + br i1 false, label %bb302.preheader, label %bb299.bb390_crit_edge + +bb299.bb390_crit_edge: ; preds = %bb299 + br label %bb390 + +bb302.preheader: ; preds = %bb299 + br label %bb302 + +bb302: ; preds = %bb384.bb302_crit_edge, %bb302.preheader + br i1 false, label %bb302.bb384_crit_edge, label %cond_true339 + +bb302.bb384_crit_edge: ; preds = %bb302 + br label %bb384 + +cond_true339: ; preds = %bb302 + br i1 false, label %cond_true339.bb384_crit_edge, label %cond_true346 + +cond_true339.bb384_crit_edge: ; preds = %cond_true339 + br label %bb384 + +cond_true346: ; preds = %cond_true339 + br i1 false, label %cond_true357, label %cond_true346.cond_next361_crit_edge + +cond_true346.cond_next361_crit_edge: ; preds = %cond_true346 + br label %cond_next361 + +cond_true357: ; preds = %cond_true346 + br label %cond_next361 + +cond_next361: ; preds = %cond_true357, %cond_true346.cond_next361_crit_edge + br label %bb384 + +bb384: ; preds = %cond_next361, %cond_true339.bb384_crit_edge, %bb302.bb384_crit_edge + br i1 false, label %bb390.loopexit, label %bb384.bb302_crit_edge + +bb384.bb302_crit_edge: ; preds = %bb384 + br label %bb302 + +bb390.loopexit: ; preds = %bb384 + br label %bb390 + +bb390: ; preds = %bb390.loopexit, %bb299.bb390_crit_edge + br i1 false, label %bb391.preheader, label %bb390.bb442.preheader_crit_edge + +bb390.bb442.preheader_crit_edge: ; preds = %bb390 + br label %bb442.preheader + +bb391.preheader: ; preds = %bb390 + br label %bb391 + +bb391: ; preds = %bb413.bb391_crit_edge, %bb391.preheader + br i1 false, label %bb391.bb413_crit_edge, label %cond_next404 + +bb391.bb413_crit_edge: ; preds = %bb391 + br label %bb413 + +cond_next404: ; preds = %bb391 + br i1 false, label %cond_next404.HWrite.exit_crit_edge, label %cond_next.i13 + +cond_next404.HWrite.exit_crit_edge: ; preds = %cond_next404 + br label %HWrite.exit + +cond_next.i13: ; preds = %cond_next404 + br i1 false, label %cond_next.i13.cond_next13.i_crit_edge, label %cond_true12.i + +cond_next.i13.cond_next13.i_crit_edge: ; preds = %cond_next.i13 + br label %cond_next13.i + +cond_true12.i: ; preds = %cond_next.i13 + br label %cond_next13.i + +cond_next13.i: ; preds = %cond_true12.i, %cond_next.i13.cond_next13.i_crit_edge + br i1 false, label %cond_next13.i.bb.i22_crit_edge, label %cond_next43.i + +cond_next13.i.bb.i22_crit_edge: ; preds = %cond_next13.i + br label %bb.i22 + +cond_next43.i: ; preds = %cond_next13.i + br i1 false, label %cond_next43.i.bb.i22_crit_edge, label %bb60.i + +cond_next43.i.bb.i22_crit_edge: ; preds = %cond_next43.i + br label %bb.i22 + +bb.i22: ; preds = %cond_next43.i.bb.i22_crit_edge, %cond_next13.i.bb.i22_crit_edge + br label %bb413 + +bb60.i: ; preds = %cond_next43.i + br i1 false, label %bb60.i.HWrite.exit_crit_edge, label %cond_true81.i + +bb60.i.HWrite.exit_crit_edge: ; preds = %bb60.i + br label %HWrite.exit + +cond_true81.i: ; preds = %bb60.i + br label %bb413 + +HWrite.exit: ; preds = %bb60.i.HWrite.exit_crit_edge, %cond_next404.HWrite.exit_crit_edge + br label %bb413 + +bb413: ; preds = %HWrite.exit, %cond_true81.i, %bb.i22, %bb391.bb413_crit_edge + br i1 false, label %bb442.preheader.loopexit, label %bb413.bb391_crit_edge + +bb413.bb391_crit_edge: ; preds = %bb413 + br label %bb391 + +bb442.preheader.loopexit: ; preds = %bb413 + br label %bb442.preheader + +bb442.preheader: ; preds = %bb442.preheader.loopexit, %bb390.bb442.preheader_crit_edge + br label %bb442.outer + +bb420: ; preds = %bb442 + br i1 false, label %bb439.loopexit, label %cond_next433 + +cond_next433: ; preds = %bb420 + br i1 false, label %cond_next433.HRead.exit.loopexit_crit_edge, label %cond_next.i + +cond_next433.HRead.exit.loopexit_crit_edge: ; preds = %cond_next433 + br label %HRead.exit.loopexit + +cond_next.i: ; preds = %cond_next433 + br i1 false, label %cond_true9.i, label %cond_false223.i + +cond_true9.i: ; preds = %cond_next.i + switch i32 0, label %cond_false.i [ + i32 1, label %cond_true9.i.cond_true15.i_crit_edge + i32 5, label %cond_true9.i.cond_true15.i_crit_edge9 + ] + +cond_true9.i.cond_true15.i_crit_edge9: ; preds = %cond_true9.i + br label %cond_true15.i + +cond_true9.i.cond_true15.i_crit_edge: ; preds = %cond_true9.i + br label %cond_true15.i + +cond_true15.i: ; preds = %cond_true9.i.cond_true15.i_crit_edge, %cond_true9.i.cond_true15.i_crit_edge9 + br i1 false, label %cond_true15.i.cond_true44.i_crit_edge, label %cond_true15.i.cond_false49.i_crit_edge + +cond_true15.i.cond_false49.i_crit_edge: ; preds = %cond_true15.i + br label %cond_false49.i + +cond_true15.i.cond_true44.i_crit_edge: ; preds = %cond_true15.i + br label %cond_true44.i + +cond_false.i: ; preds = %cond_true9.i + br i1 false, label %cond_false.i.cond_next39.i_crit_edge, label %cond_true30.i + +cond_false.i.cond_next39.i_crit_edge: ; preds = %cond_false.i + br label %cond_next39.i + +cond_true30.i: ; preds = %cond_false.i + br label %cond_next39.i + +cond_next39.i: ; preds = %cond_true30.i, %cond_false.i.cond_next39.i_crit_edge + br i1 false, label %cond_next39.i.cond_true44.i_crit_edge, label %cond_next39.i.cond_false49.i_crit_edge + +cond_next39.i.cond_false49.i_crit_edge: ; preds = %cond_next39.i + br label %cond_false49.i + +cond_next39.i.cond_true44.i_crit_edge: ; preds = %cond_next39.i + br label %cond_true44.i + +cond_true44.i: ; preds = %cond_next39.i.cond_true44.i_crit_edge, %cond_true15.i.cond_true44.i_crit_edge + br i1 false, label %cond_true44.i.cond_next70.i_crit_edge, label %cond_true44.i.cond_true61.i_crit_edge + +cond_true44.i.cond_true61.i_crit_edge: ; preds = %cond_true44.i + br label %cond_true61.i + +cond_true44.i.cond_next70.i_crit_edge: ; preds = %cond_true44.i + br label %cond_next70.i + +cond_false49.i: ; preds = %cond_next39.i.cond_false49.i_crit_edge, %cond_true15.i.cond_false49.i_crit_edge + br i1 false, label %cond_false49.i.cond_next70.i_crit_edge, label %cond_false49.i.cond_true61.i_crit_edge + +cond_false49.i.cond_true61.i_crit_edge: ; preds = %cond_false49.i + br label %cond_true61.i + +cond_false49.i.cond_next70.i_crit_edge: ; preds = %cond_false49.i + br label %cond_next70.i + +cond_true61.i: ; preds = %cond_false49.i.cond_true61.i_crit_edge, %cond_true44.i.cond_true61.i_crit_edge + br i1 false, label %cond_true61.i.cond_next70.i_crit_edge, label %cond_true67.i + +cond_true61.i.cond_next70.i_crit_edge: ; preds = %cond_true61.i + br label %cond_next70.i + +cond_true67.i: ; preds = %cond_true61.i + br label %cond_next70.i + +cond_next70.i: ; preds = %cond_true67.i, %cond_true61.i.cond_next70.i_crit_edge, %cond_false49.i.cond_next70.i_crit_edge, %cond_true44.i.cond_next70.i_crit_edge + br i1 false, label %cond_true77.i, label %cond_next81.i + +cond_true77.i: ; preds = %cond_next70.i + br label %bb442.outer.backedge + +cond_next81.i: ; preds = %cond_next70.i + br i1 false, label %cond_true87.i, label %cond_false94.i + +cond_true87.i: ; preds = %cond_next81.i + br i1 false, label %cond_true87.i.cond_true130.i_crit_edge, label %cond_true87.i.cond_next135.i_crit_edge + +cond_true87.i.cond_next135.i_crit_edge: ; preds = %cond_true87.i + br label %cond_next135.i + +cond_true87.i.cond_true130.i_crit_edge: ; preds = %cond_true87.i + br label %cond_true130.i + +cond_false94.i: ; preds = %cond_next81.i + switch i32 0, label %cond_false94.i.cond_next125.i_crit_edge [ + i32 1, label %cond_false94.i.cond_true100.i_crit_edge + i32 5, label %cond_false94.i.cond_true100.i_crit_edge10 + ] + +cond_false94.i.cond_true100.i_crit_edge10: ; preds = %cond_false94.i + br label %cond_true100.i + +cond_false94.i.cond_true100.i_crit_edge: ; preds = %cond_false94.i + br label %cond_true100.i + +cond_false94.i.cond_next125.i_crit_edge: ; preds = %cond_false94.i + br label %cond_next125.i + +cond_true100.i: ; preds = %cond_false94.i.cond_true100.i_crit_edge, %cond_false94.i.cond_true100.i_crit_edge10 + br i1 false, label %cond_true107.i, label %cond_true100.i.cond_next109.i_crit_edge + +cond_true100.i.cond_next109.i_crit_edge: ; preds = %cond_true100.i + br label %cond_next109.i + +cond_true107.i: ; preds = %cond_true100.i + br label %cond_next109.i + +cond_next109.i: ; preds = %cond_true107.i, %cond_true100.i.cond_next109.i_crit_edge + br i1 false, label %cond_next109.i.cond_next125.i_crit_edge, label %cond_true116.i + +cond_next109.i.cond_next125.i_crit_edge: ; preds = %cond_next109.i + br label %cond_next125.i + +cond_true116.i: ; preds = %cond_next109.i + br label %cond_next125.i + +cond_next125.i: ; preds = %cond_true116.i, %cond_next109.i.cond_next125.i_crit_edge, %cond_false94.i.cond_next125.i_crit_edge + br i1 false, label %cond_next125.i.cond_true130.i_crit_edge, label %cond_next125.i.cond_next135.i_crit_edge + +cond_next125.i.cond_next135.i_crit_edge: ; preds = %cond_next125.i + br label %cond_next135.i + +cond_next125.i.cond_true130.i_crit_edge: ; preds = %cond_next125.i + br label %cond_true130.i + +cond_true130.i: ; preds = %cond_next125.i.cond_true130.i_crit_edge, %cond_true87.i.cond_true130.i_crit_edge + br label %cond_next135.i + +cond_next135.i: ; preds = %cond_true130.i, %cond_next125.i.cond_next135.i_crit_edge, %cond_true87.i.cond_next135.i_crit_edge + br i1 false, label %cond_true142.i, label %cond_next135.i.cond_next149.i_crit_edge + +cond_next135.i.cond_next149.i_crit_edge: ; preds = %cond_next135.i + br label %cond_next149.i + +cond_true142.i: ; preds = %cond_next135.i + br label %cond_next149.i + +cond_next149.i: ; preds = %cond_true142.i, %cond_next135.i.cond_next149.i_crit_edge + br i1 false, label %cond_true156.i, label %cond_next149.i.cond_next163.i_crit_edge + +cond_next149.i.cond_next163.i_crit_edge: ; preds = %cond_next149.i + br label %cond_next163.i + +cond_true156.i: ; preds = %cond_next149.i + br label %cond_next163.i + +cond_next163.i: ; preds = %cond_true156.i, %cond_next149.i.cond_next163.i_crit_edge + br i1 false, label %cond_true182.i, label %cond_next163.i.cond_next380.i_crit_edge + +cond_next163.i.cond_next380.i_crit_edge: ; preds = %cond_next163.i + br label %cond_next380.i + +cond_true182.i: ; preds = %cond_next163.i + br i1 false, label %cond_true182.i.cond_next380.i_crit_edge, label %cond_true196.i + +cond_true182.i.cond_next380.i_crit_edge: ; preds = %cond_true182.i + br label %cond_next380.i + +cond_true196.i: ; preds = %cond_true182.i + br i1 false, label %cond_true210.i, label %cond_true196.i.cond_next380.i_crit_edge + +cond_true196.i.cond_next380.i_crit_edge: ; preds = %cond_true196.i + br label %cond_next380.i + +cond_true210.i: ; preds = %cond_true196.i + br i1 false, label %cond_true216.i, label %cond_true210.i.cond_next380.i_crit_edge + +cond_true210.i.cond_next380.i_crit_edge: ; preds = %cond_true210.i + br label %cond_next380.i + +cond_true216.i: ; preds = %cond_true210.i + br label %cond_next380.i + +cond_false223.i: ; preds = %cond_next.i + br i1 false, label %cond_true229.i, label %cond_false355.i + +cond_true229.i: ; preds = %cond_false223.i + br i1 false, label %cond_true229.i.HRead.exit.loopexit_crit_edge, label %cond_next243.i + +cond_true229.i.HRead.exit.loopexit_crit_edge: ; preds = %cond_true229.i + br label %HRead.exit.loopexit + +cond_next243.i: ; preds = %cond_true229.i + br i1 false, label %cond_true248.i, label %cond_false255.i + +cond_true248.i: ; preds = %cond_next243.i + br label %cond_next260.i + +cond_false255.i: ; preds = %cond_next243.i + br label %cond_next260.i + +cond_next260.i: ; preds = %cond_false255.i, %cond_true248.i + br i1 false, label %cond_true267.i, label %cond_next273.i + +cond_true267.i: ; preds = %cond_next260.i + br label %bb442.backedge + +bb442.backedge: ; preds = %bb.i, %cond_true267.i + br label %bb442 + +cond_next273.i: ; preds = %cond_next260.i + br i1 false, label %cond_true281.i, label %cond_next273.i.cond_next288.i_crit_edge + +cond_next273.i.cond_next288.i_crit_edge: ; preds = %cond_next273.i + br label %cond_next288.i + +cond_true281.i: ; preds = %cond_next273.i + br label %cond_next288.i + +cond_next288.i: ; preds = %cond_true281.i, %cond_next273.i.cond_next288.i_crit_edge + br i1 false, label %cond_true295.i, label %cond_next288.i.cond_next302.i_crit_edge + +cond_next288.i.cond_next302.i_crit_edge: ; preds = %cond_next288.i + br label %cond_next302.i + +cond_true295.i: ; preds = %cond_next288.i + br label %cond_next302.i + +cond_next302.i: ; preds = %cond_true295.i, %cond_next288.i.cond_next302.i_crit_edge + br i1 false, label %cond_next302.i.cond_next380.i_crit_edge, label %cond_true328.i + +cond_next302.i.cond_next380.i_crit_edge: ; preds = %cond_next302.i + br label %cond_next380.i + +cond_true328.i: ; preds = %cond_next302.i + br i1 false, label %cond_true343.i, label %cond_true328.i.cond_next380.i_crit_edge + +cond_true328.i.cond_next380.i_crit_edge: ; preds = %cond_true328.i + br label %cond_next380.i + +cond_true343.i: ; preds = %cond_true328.i + br i1 false, label %cond_true349.i, label %cond_true343.i.cond_next380.i_crit_edge + +cond_true343.i.cond_next380.i_crit_edge: ; preds = %cond_true343.i + br label %cond_next380.i + +cond_true349.i: ; preds = %cond_true343.i + br label %cond_next380.i + +cond_false355.i: ; preds = %cond_false223.i + br i1 false, label %cond_false355.i.bb.i_crit_edge, label %cond_next363.i + +cond_false355.i.bb.i_crit_edge: ; preds = %cond_false355.i + br label %bb.i + +cond_next363.i: ; preds = %cond_false355.i + br i1 false, label %bb377.i, label %cond_next363.i.bb.i_crit_edge + +cond_next363.i.bb.i_crit_edge: ; preds = %cond_next363.i + br label %bb.i + +bb.i: ; preds = %cond_next363.i.bb.i_crit_edge, %cond_false355.i.bb.i_crit_edge + br label %bb442.backedge + +bb377.i: ; preds = %cond_next363.i + br label %cond_next380.i + +cond_next380.i: ; preds = %bb377.i, %cond_true349.i, %cond_true343.i.cond_next380.i_crit_edge, %cond_true328.i.cond_next380.i_crit_edge, %cond_next302.i.cond_next380.i_crit_edge, %cond_true216.i, %cond_true210.i.cond_next380.i_crit_edge, %cond_true196.i.cond_next380.i_crit_edge, %cond_true182.i.cond_next380.i_crit_edge, %cond_next163.i.cond_next380.i_crit_edge + br i1 false, label %cond_next380.i.HRead.exit_crit_edge, label %cond_true391.i + +cond_next380.i.HRead.exit_crit_edge: ; preds = %cond_next380.i + br label %HRead.exit + +cond_true391.i: ; preds = %cond_next380.i + br label %bb442.outer.backedge + +bb442.outer.backedge: ; preds = %bb439, %cond_true391.i, %cond_true77.i + br label %bb442.outer + +HRead.exit.loopexit: ; preds = %cond_true229.i.HRead.exit.loopexit_crit_edge, %cond_next433.HRead.exit.loopexit_crit_edge + br label %HRead.exit + +HRead.exit: ; preds = %HRead.exit.loopexit, %cond_next380.i.HRead.exit_crit_edge + br label %bb439 + +bb439.loopexit: ; preds = %bb420 + br label %bb439 + +bb439: ; preds = %bb439.loopexit, %HRead.exit + br label %bb442.outer.backedge + +bb442.outer: ; preds = %bb442.outer.backedge, %bb442.preheader + br label %bb442 + +bb442: ; preds = %bb442.outer, %bb442.backedge + br i1 false, label %bb420, label %bb.loopexit +} + +define void @Invalidate() { +entry: + br i1 false, label %cond_false, label %cond_true + +cond_true: ; preds = %entry + br i1 false, label %cond_true40, label %cond_true.cond_next_crit_edge + +cond_true.cond_next_crit_edge: ; preds = %cond_true + br label %cond_next + +cond_true40: ; preds = %cond_true + br label %cond_next + +cond_next: ; preds = %cond_true40, %cond_true.cond_next_crit_edge + br i1 false, label %cond_true68, label %cond_next.cond_next73_crit_edge + +cond_next.cond_next73_crit_edge: ; preds = %cond_next + br label %cond_next73 + +cond_true68: ; preds = %cond_next + br label %cond_next73 + +cond_next73: ; preds = %cond_true68, %cond_next.cond_next73_crit_edge + br i1 false, label %cond_true91, label %cond_next73.cond_next96_crit_edge + +cond_next73.cond_next96_crit_edge: ; preds = %cond_next73 + br label %cond_next96 + +cond_true91: ; preds = %cond_next73 + br label %cond_next96 + +cond_next96: ; preds = %cond_true91, %cond_next73.cond_next96_crit_edge + br i1 false, label %cond_next96.cond_next112_crit_edge, label %cond_true105 + +cond_next96.cond_next112_crit_edge: ; preds = %cond_next96 + br label %cond_next112 + +cond_true105: ; preds = %cond_next96 + br label %cond_next112 + +cond_next112: ; preds = %cond_true105, %cond_next96.cond_next112_crit_edge + br i1 false, label %cond_next112.cond_next127_crit_edge, label %cond_true119 + +cond_next112.cond_next127_crit_edge: ; preds = %cond_next112 + br label %cond_next127 + +cond_true119: ; preds = %cond_next112 + br label %cond_next127 + +cond_next127: ; preds = %cond_true119, %cond_next112.cond_next127_crit_edge + br i1 false, label %cond_next141, label %cond_true134 + +cond_true134: ; preds = %cond_next127 + br i1 false, label %cond_true134.bb161_crit_edge, label %cond_true134.bb_crit_edge + +cond_true134.bb_crit_edge: ; preds = %cond_true134 + br label %bb + +cond_true134.bb161_crit_edge: ; preds = %cond_true134 + br label %bb161 + +cond_next141: ; preds = %cond_next127 + br label %bb154 + +bb: ; preds = %bb154.bb_crit_edge, %cond_true134.bb_crit_edge + br label %bb154 + +bb154: ; preds = %bb, %cond_next141 + br i1 false, label %bb154.bb161_crit_edge, label %bb154.bb_crit_edge + +bb154.bb_crit_edge: ; preds = %bb154 + br label %bb + +bb154.bb161_crit_edge: ; preds = %bb154 + br label %bb161 + +bb161: ; preds = %bb154.bb161_crit_edge, %cond_true134.bb161_crit_edge + br i1 false, label %bb161.cond_next201_crit_edge, label %cond_true198 + +bb161.cond_next201_crit_edge: ; preds = %bb161 + br label %cond_next201 + +cond_true198: ; preds = %bb161 + br label %cond_next201 + +cond_next201: ; preds = %cond_true198, %bb161.cond_next201_crit_edge + br i1 false, label %cond_next212, label %cond_true206 + +cond_true206: ; preds = %cond_next201 + br label %UnifiedReturnBlock + +cond_false: ; preds = %entry + br label %UnifiedReturnBlock + +cond_next212: ; preds = %cond_next201 + br label %UnifiedReturnBlock + +UnifiedReturnBlock: ; preds = %cond_next212, %cond_false, %cond_true206 + ret void +} diff --git a/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll b/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll new file mode 100644 index 0000000..767e5db --- /dev/null +++ b/test/Analysis/PostDominators/2007-04-20-PostDom-Reset.ll @@ -0,0 +1,28 @@ +; RUN: opt < %s -postdomfrontier -disable-output + +define void @args_out_of_range() { +entry: + br label %bb + +bb: ; preds = %bb, %entry + br label %bb +} + +define void @args_out_of_range_3() { +entry: + br label %bb + +bb: ; preds = %bb, %entry + br label %bb +} + +define void @Feq() { +entry: + br i1 false, label %cond_true, label %cond_next + +cond_true: ; preds = %entry + unreachable + +cond_next: ; preds = %entry + unreachable +} diff --git a/test/Analysis/PostDominators/dg.exp b/test/Analysis/PostDominators/dg.exp new file mode 100644 index 0000000..f200589 --- /dev/null +++ b/test/Analysis/PostDominators/dg.exp @@ -0,0 +1,3 @@ +load_lib llvm.exp + +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] diff --git a/test/Analysis/PostDominators/pr1098.ll b/test/Analysis/PostDominators/pr1098.ll new file mode 100644 index 0000000..afb4776 --- /dev/null +++ b/test/Analysis/PostDominators/pr1098.ll @@ -0,0 +1,14 @@ +; RUN: opt < %s -postdomtree -analyze | grep entry +; PR932 + +define void @foo(i1 %x) { +entry: + br i1 %x, label %bb1, label %bb0 +bb0: ; preds = %entry, bb0 + br label %bb0 +bb1: ; preds = %entry + br label %bb2 +bb2: ; preds = %bb1 + ret void +} + diff --git a/test/Analysis/PostDominators/pr6047_a.ll b/test/Analysis/PostDominators/pr6047_a.ll new file mode 100644 index 0000000..ec1455b --- /dev/null +++ b/test/Analysis/PostDominators/pr6047_a.ll @@ -0,0 +1,15 @@ +; RUN: opt < %s -postdomtree -analyze | FileCheck %s +define internal void @f() { +entry: + br i1 undef, label %bb35, label %bb3.i + +bb3.i: + br label %bb3.i + +bb35.loopexit3: + br label %bb35 + +bb35: + ret void +} +; CHECK: [3] %entry diff --git a/test/Analysis/PostDominators/pr6047_b.ll b/test/Analysis/PostDominators/pr6047_b.ll new file mode 100644 index 0000000..7bd2c86 --- /dev/null +++ b/test/Analysis/PostDominators/pr6047_b.ll @@ -0,0 +1,19 @@ +; RUN: opt < %s -postdomtree -analyze | FileCheck %s +define internal void @f() { +entry: + br i1 undef, label %a, label %bb3.i + +a: + br i1 undef, label %bb35, label %bb3.i + +bb3.i: + br label %bb3.i + + +bb35.loopexit3: + br label %bb35 + +bb35: + ret void +} +; CHECK: [4] %entry diff --git a/test/Analysis/PostDominators/pr6047_c.ll b/test/Analysis/PostDominators/pr6047_c.ll new file mode 100644 index 0000000..08c9551 --- /dev/null +++ b/test/Analysis/PostDominators/pr6047_c.ll @@ -0,0 +1,147 @@ +; RUN: opt < %s -postdomtree -analyze | FileCheck %s +define internal void @f() { +entry: + br i1 undef, label %bb35, label %bb3.i + +bb3.i: + br label %bb3.i + +bb: + br label %bb35 + +bb.i: + br label %bb35 + +_float32_unpack.exit: + br label %bb35 + +bb.i5: + br label %bb35 + +_float32_unpack.exit8: + br label %bb35 + +bb32.preheader: + br label %bb35 + +bb3: + br label %bb35 + +bb3.split.us: + br label %bb35 + +bb.i4.us: + br label %bb35 + +bb7.i.us: + br label %bb35 + +bb.i4.us.backedge: + br label %bb35 + +bb1.i.us: + br label %bb35 + +bb6.i.us: + br label %bb35 + +bb4.i.us: + br label %bb35 + +bb8.i.us: + br label %bb35 + +bb3.i.loopexit.us: + br label %bb35 + +bb.nph21: + br label %bb35 + +bb4: + br label %bb35 + +bb5: + br label %bb35 + +bb14.preheader: + br label %bb35 + +bb.nph18: + br label %bb35 + +bb8.us.preheader: + br label %bb35 + +bb8.preheader: + br label %bb35 + +bb8.us: + br label %bb35 + +bb8: + br label %bb35 + +bb15.loopexit: + br label %bb35 + +bb15.loopexit2: + br label %bb35 + +bb15: + br label %bb35 + +bb16: + br label %bb35 + +bb17.loopexit.split: + br label %bb35 + +bb.nph14: + br label %bb35 + +bb19: + br label %bb35 + +bb20: + br label %bb35 + +bb29.preheader: + br label %bb35 + +bb.nph: + br label %bb35 + +bb23.us.preheader: + br label %bb35 + +bb23.preheader: + br label %bb35 + +bb23.us: + br label %bb35 + +bb23: + br label %bb35 + +bb30.loopexit: + br label %bb35 + +bb30.loopexit1: + br label %bb35 + +bb30: + br label %bb35 + +bb31: + br label %bb35 + +bb35.loopexit: + br label %bb35 + +bb35.loopexit3: + br label %bb35 + +bb35: + ret void +} +; CHECK: [3] %entry diff --git a/test/Analysis/PostDominators/pr6047_d.ll b/test/Analysis/PostDominators/pr6047_d.ll new file mode 100644 index 0000000..4cfa880 --- /dev/null +++ b/test/Analysis/PostDominators/pr6047_d.ll @@ -0,0 +1,24 @@ +; RUN: opt < %s -postdomtree -analyze | FileCheck %s +define internal void @f() { +entry: + br i1 1, label %a, label %b + +a: +br label %c + +b: +br label %c + +c: + br i1 undef, label %bb35, label %bb3.i + +bb3.i: + br label %bb3.i + +bb35.loopexit3: + br label %bb35 + +bb35: + ret void +} +; CHECK: [4] %entry |