1 ; RUN: opt < %s -loop-index-split -stats -disable-output | not grep "loop-index-split"
3 @g_40 = common global i32 0 ; <i32*> [#uses=1]
4 @g_192 = common global i32 0 ; <i32*> [#uses=2]
5 @"\01LC" = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
7 define void @func_29() nounwind {
9 %0 = load i32* @g_40, align 4 ; <i32> [#uses=1]
10 %1 = icmp eq i32 %0, 0 ; <i1> [#uses=1]
11 %g_192.promoted = load i32* @g_192 ; <i32> [#uses=0]
12 br i1 %1, label %entry.split.us, label %entry.split
14 entry.split.us: ; preds = %entry
17 bb.us: ; preds = %bb5.us, %entry.split.us
18 %i.0.reg2mem.0.us = phi i32 [ 0, %entry.split.us ], [ %3, %bb5.us ] ; <i32> [#uses=2]
19 %2 = icmp eq i32 %i.0.reg2mem.0.us, 0 ; <i1> [#uses=1]
20 br i1 %2, label %bb1.us, label %bb5.us
22 bb5.us: ; preds = %bb1.us, %bb4.us, %bb.us
23 %iftmp.0.0.us = phi i32 [ 0, %bb4.us ], [ 1, %bb.us ], [ 1, %bb1.us ] ; <i32> [#uses=1]
24 %3 = add i32 %i.0.reg2mem.0.us, 1 ; <i32> [#uses=3]
25 %4 = icmp ult i32 %3, 10 ; <i1> [#uses=1]
26 br i1 %4, label %bb.us, label %bb8.us
28 bb4.us: ; preds = %bb1.us
31 bb1.us: ; preds = %bb.us
32 br i1 true, label %bb4.us, label %bb5.us
34 bb8.us: ; preds = %bb5.us
35 %iftmp.0.0.lcssa.us = phi i32 [ %iftmp.0.0.us, %bb5.us ] ; <i32> [#uses=1]
36 %.lcssa.us = phi i32 [ %3, %bb5.us ] ; <i32> [#uses=1]
39 entry.split: ; preds = %entry
42 bb: ; preds = %bb5, %entry.split
43 %i.0.reg2mem.0 = phi i32 [ 0, %entry.split ], [ %6, %bb5 ] ; <i32> [#uses=2]
44 %5 = icmp eq i32 %i.0.reg2mem.0, 0 ; <i1> [#uses=1]
45 br i1 %5, label %bb1, label %bb5
48 br i1 false, label %bb4, label %bb5
53 bb5: ; preds = %bb1, %bb, %bb4
54 %iftmp.0.0 = phi i32 [ 0, %bb4 ], [ 1, %bb ], [ 1, %bb1 ] ; <i32> [#uses=1]
55 %6 = add i32 %i.0.reg2mem.0, 1 ; <i32> [#uses=3]
56 %7 = icmp ult i32 %6, 10 ; <i1> [#uses=1]
57 br i1 %7, label %bb, label %bb8
60 %iftmp.0.0.lcssa = phi i32 [ %iftmp.0.0, %bb5 ] ; <i32> [#uses=1]
61 %.lcssa = phi i32 [ %6, %bb5 ] ; <i32> [#uses=1]
64 bb8.split: ; preds = %bb8.us, %bb8
65 %iftmp.0.0.lcssa.us-lcssa = phi i32 [ %iftmp.0.0.lcssa, %bb8 ], [ %iftmp.0.0.lcssa.us, %bb8.us ] ; <i32> [#uses=1]
66 %.lcssa.us-lcssa = phi i32 [ %.lcssa, %bb8 ], [ %.lcssa.us, %bb8.us ] ; <i32> [#uses=1]
67 store i32 %iftmp.0.0.lcssa.us-lcssa, i32* @g_192
68 %8 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @"\01LC", i32 0, i32 0), i32 %.lcssa.us-lcssa ) nounwind ; <i32> [#uses=0]
72 declare i32 @printf(i8*, ...) nounwind
74 define i32 @main() nounwind {
76 call void @func_29( ) nounwind