1 ; RUN: llc < %s -mtriple=powerpc-apple-darwin
3 %struct.HDescriptor = type <{ i32, i32 }>
5 declare void @bcopy(i8*, i8*, i32)
7 define i32 @main(i32 %argc, i8** %argv) {
9 br i1 false, label %bb31, label %bb
14 bb31: ; preds = %entry
15 switch i32 0, label %bb189 [
16 i32 73, label %cond_next209
19 i32 78, label %cond_next209
20 i32 85, label %cond_next209
21 i32 97, label %cond_next209
22 i32 100, label %cond_next209
23 i32 107, label %cond_next209
26 i32 115, label %cond_next209
31 br i1 false, label %cond_true48, label %cond_true200.critedge2117
33 cond_true48: ; preds = %bb43
34 br i1 false, label %cond_next372, label %AllDone
39 bb57: ; preds = %bb31, %bb31
45 bb189: ; preds = %bb31
48 cond_true200.critedge2117: ; preds = %bb43
51 cond_next209: ; preds = %bb31, %bb31, %bb31, %bb31, %bb31, %bb31, %bb31
54 cond_next372: ; preds = %cond_true48
55 switch i32 0, label %bb1728 [
57 i32 74, label %cond_true1700
61 i32 107, label %AllDone
62 i32 112, label %cond_next423
63 i32 117, label %cond_next1453
66 cond_next423: ; preds = %cond_next372
67 switch i16 0, label %cond_next691 [
68 i16 18475, label %cond_next807
69 i16 18520, label %cond_next807
72 cond_next691: ; preds = %cond_next423
75 cond_next807: ; preds = %cond_next423, %cond_next423
76 switch i16 0, label %cond_true1192 [
77 i16 18475, label %cond_next21.i
78 i16 18520, label %cond_next21.i
81 cond_next21.i: ; preds = %cond_next807, %cond_next807
82 br i1 false, label %cond_next934, label %free.i
84 free.i: ; preds = %cond_next21.i
87 cond_next934: ; preds = %bb1005, %cond_next21.i
88 %listsize.1 = phi i32 [ 0, %bb1005 ], [ 64, %cond_next21.i ] ; <i32> [#uses=1]
89 %catalogExtents.2 = phi %struct.HDescriptor* [ %catalogExtents.1.reg2mem.1, %bb1005 ], [ null, %cond_next21.i ] ; <%struct.HDescriptor*> [#uses=3]
90 br i1 false, label %cond_next942, label %Return1020
92 cond_next942: ; preds = %cond_next934
93 br i1 false, label %bb1005, label %bb947
95 bb947: ; preds = %cond_next971, %cond_next942
96 %indvar = phi i32 [ 0, %cond_next942 ], [ %indvar.next2140, %cond_next971 ] ; <i32> [#uses=2]
97 %catalogExtents.1.reg2mem.0 = phi %struct.HDescriptor* [ %catalogExtents.2, %cond_next942 ], [ %tmp977978, %cond_next971 ] ; <%struct.HDescriptor*> [#uses=1]
98 %extents.0.reg2mem.0 = phi %struct.HDescriptor* [ null, %cond_next942 ], [ %tmp977978, %cond_next971 ] ; <%struct.HDescriptor*> [#uses=1]
99 br i1 false, label %cond_next971, label %Return1020
101 cond_next971: ; preds = %bb947
102 %tmp = shl i32 %indvar, 6 ; <i32> [#uses=1]
103 %listsize.0.reg2mem.0 = add i32 %tmp, %listsize.1 ; <i32> [#uses=1]
104 %tmp973 = add i32 %listsize.0.reg2mem.0, 64 ; <i32> [#uses=1]
105 %tmp974975 = bitcast %struct.HDescriptor* %extents.0.reg2mem.0 to i8* ; <i8*> [#uses=1]
106 %tmp977 = call i8* @realloc( i8* %tmp974975, i32 %tmp973 ) ; <i8*> [#uses=1]
107 %tmp977978 = bitcast i8* %tmp977 to %struct.HDescriptor* ; <%struct.HDescriptor*> [#uses=3]
108 call void @bcopy( i8* null, i8* null, i32 64 )
109 %indvar.next2140 = add i32 %indvar, 1 ; <i32> [#uses=1]
110 br i1 false, label %bb1005, label %bb947
112 bb1005: ; preds = %cond_next971, %cond_next942
113 %catalogExtents.1.reg2mem.1 = phi %struct.HDescriptor* [ %catalogExtents.2, %cond_next942 ], [ %tmp977978, %cond_next971 ] ; <%struct.HDescriptor*> [#uses=2]
114 br i1 false, label %Return1020, label %cond_next934
116 Return1020: ; preds = %bb1005, %bb947, %cond_next934
117 %catalogExtents.3 = phi %struct.HDescriptor* [ %catalogExtents.1.reg2mem.0, %bb947 ], [ %catalogExtents.2, %cond_next934 ], [ %catalogExtents.1.reg2mem.1, %bb1005 ] ; <%struct.HDescriptor*> [#uses=0]
120 cond_true1192: ; preds = %cond_next807
123 cond_next1453: ; preds = %cond_next372
126 bb1620: ; preds = %cond_next372
129 cond_true1700: ; preds = %cond_next372
132 bb1713: ; preds = %cond_next372
135 bb1718: ; preds = %cond_next372
138 bb1723: ; preds = %cond_next372
141 bb1728: ; preds = %cond_next372
144 AllDone: ; preds = %cond_next372, %cond_true48
148 declare i8* @realloc(i8*, i32)