blob: 0862f1131b5a0d90cbe54c712c341c4628f533b3 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -indvars -disable-output
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003define void @main() {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004entry:
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005 br label %no_exit.1.outer
Dan Gohmanf17a25c2007-07-18 16:29:46 +00006
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00007no_exit.1.outer: ; preds = %endif.0, %entry
8 %l_14237116.1.0.ph = phi i8 [ -46, %entry ], [ 0, %endif.0 ] ; <i8> [#uses=1]
9 %i.0.0.0.ph = phi i32 [ 0, %entry ], [ %inc.1, %endif.0 ] ; <i32> [#uses=1]
10 br label %no_exit.1
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000012no_exit.1: ; preds = %_Z13func_47880058cc.exit, %no_exit.1.outer
13 br i1 false, label %_Z13func_47880058cc.exit, label %then.i
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000015then.i: ; preds = %no_exit.1
16 br label %_Z13func_47880058cc.exit
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000018_Z13func_47880058cc.exit: ; preds = %then.i, %no_exit.1
19 br i1 false, label %then.0, label %no_exit.1
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000021then.0: ; preds = %_Z13func_47880058cc.exit
22 %tmp.6 = bitcast i8 %l_14237116.1.0.ph to i8 ; <i8> [#uses=1]
23 br i1 false, label %endif.0, label %then.1
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000025then.1: ; preds = %then.0
26 br label %endif.0
Dan Gohmanf17a25c2007-07-18 16:29:46 +000027
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000028endif.0: ; preds = %then.1, %then.0
29 %inc.1 = add i32 %i.0.0.0.ph, 1 ; <i32> [#uses=2]
30 %tmp.2 = icmp sgt i32 %inc.1, 99 ; <i1> [#uses=1]
31 br i1 %tmp.2, label %loopexit.0, label %no_exit.1.outer
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000033loopexit.0: ; preds = %endif.0
34 %tmp.28 = zext i8 %tmp.6 to i32 ; <i32> [#uses=0]
35 ret void
Dan Gohmanf17a25c2007-07-18 16:29:46 +000036}
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000037