1 ;RUN: opt < %s -codegenprepare -S | FileCheck %s
3 ;CHECK: define void @foo()
8 ;CHECK-NEXT: br label %cond_next475
13 br i1 false, label %cond_next31, label %cond_true
15 cond_true: ; preds = %entry
16 br i1 false, label %cond_true19, label %cond_next31
18 cond_true19: ; preds = %cond_true
19 br i1 false, label %bb510, label %cond_next31
21 cond_next31: ; preds = %cond_true19, %cond_true, %entry
22 br i1 false, label %cond_true61, label %cond_next78
24 cond_true61: ; preds = %cond_next31
27 cond_next78: ; preds = %cond_true61, %cond_next31
28 br i1 false, label %cond_true93, label %bb.preheader
30 cond_true93: ; preds = %cond_next78
31 br label %bb.preheader
33 bb.preheader: ; preds = %cond_true93, %cond_next78
34 %iftmp.11.0.ph.ph = phi i16 [ 0, %cond_true93 ], [ 0, %cond_next78 ] ; <i16> [#uses=1]
37 bb: ; preds = %cond_next499, %bb.preheader
38 %n.1 = phi i16 [ %iftmp.11.0.ph.ph, %cond_next499 ], [ 0, %bb.preheader ] ; <i16> [#uses=0]
39 br i1 false, label %bb148.preheader, label %bb493
41 bb148.preheader: ; preds = %bb
44 bb148: ; preds = %cond_next475, %bb148.preheader
45 br i1 false, label %cond_next175, label %bb184
47 cond_next175: ; preds = %bb148
48 br i1 false, label %bb184, label %bb185
50 bb184: ; preds = %cond_next175, %bb148
53 bb185: ; preds = %bb184, %cond_next175
54 br i1 false, label %bb420.preheader, label %cond_true198
56 bb420.preheader: ; preds = %bb185
59 cond_true198: ; preds = %bb185
60 br i1 false, label %bb294, label %cond_next208
62 cond_next208: ; preds = %cond_true198
63 br i1 false, label %cond_next249, label %cond_true214
65 cond_true214: ; preds = %cond_next208
66 br i1 false, label %bb294, label %cond_next262
68 cond_next249: ; preds = %cond_next208
69 br i1 false, label %bb294, label %cond_next262
71 cond_next262: ; preds = %cond_next249, %cond_true214
74 bb269: ; preds = %cond_next285, %cond_next262
75 br i1 false, label %cond_next285, label %cond_true279
77 cond_true279: ; preds = %bb269
78 br label %cond_next285
80 cond_next285: ; preds = %cond_true279, %bb269
81 br i1 false, label %bb269, label %cond_next446.loopexit
83 bb294: ; preds = %cond_next249, %cond_true214, %cond_true198
84 br i1 false, label %cond_next336, label %cond_true301
86 cond_true301: ; preds = %bb294
87 br i1 false, label %cond_false398, label %cond_true344
89 cond_next336: ; preds = %bb294
90 br i1 false, label %cond_false398, label %cond_true344
92 cond_true344: ; preds = %cond_next336, %cond_true301
93 br i1 false, label %cond_false381, label %cond_true351
95 cond_true351: ; preds = %cond_true344
96 br label %cond_next387
98 cond_false381: ; preds = %cond_true344
99 br label %cond_next387
101 cond_next387: ; preds = %cond_false381, %cond_true351
102 br label %cond_next401
104 cond_false398: ; preds = %cond_next336, %cond_true301
105 br label %cond_next401
107 cond_next401: ; preds = %cond_false398, %cond_next387
108 br i1 false, label %cond_next475, label %cond_true453
110 bb420: ; preds = %cond_next434, %bb420.preheader
111 br i1 false, label %cond_next434, label %cond_true428
113 cond_true428: ; preds = %bb420
114 br label %cond_next434
116 cond_next434: ; preds = %cond_true428, %bb420
117 br i1 false, label %bb420, label %cond_next446.loopexit1
119 cond_next446.loopexit: ; preds = %cond_next285
120 br label %cond_next446
122 cond_next446.loopexit1: ; preds = %cond_next434
123 br label %cond_next446
125 cond_next446: ; preds = %cond_next446.loopexit1, %cond_next446.loopexit
126 br i1 false, label %cond_next475, label %cond_true453
128 cond_true453: ; preds = %cond_next446, %cond_next401
129 br i1 false, label %cond_true458, label %cond_next475
131 cond_true458: ; preds = %cond_true453
132 br label %cond_next475
134 cond_next475: ; preds = %cond_true458, %cond_true453, %cond_next446, %cond_next401
135 br i1 false, label %bb493.loopexit, label %bb148
137 bb493.loopexit: ; preds = %cond_next475
140 bb493: ; preds = %bb493.loopexit, %bb
141 br i1 false, label %cond_next499, label %bb510.loopexit
143 cond_next499: ; preds = %bb493
146 bb510.loopexit: ; preds = %bb493
149 bb510: ; preds = %bb510.loopexit, %cond_true19
150 br i1 false, label %cond_next524, label %cond_true517
152 cond_true517: ; preds = %bb510
153 br label %cond_next524
155 cond_next524: ; preds = %cond_true517, %bb510
156 br i1 false, label %cond_next540, label %cond_true533
158 cond_true533: ; preds = %cond_next524
159 br label %cond_next540
161 cond_next540: ; preds = %cond_true533, %cond_next524
162 br i1 false, label %cond_true554, label %cond_next560
164 cond_true554: ; preds = %cond_next540
165 br label %cond_next560
167 cond_next560: ; preds = %cond_true554, %cond_next540
168 br i1 false, label %cond_true566, label %cond_next572
170 cond_true566: ; preds = %cond_next560
171 br label %cond_next572
173 cond_next572: ; preds = %cond_true566, %cond_next560
174 br i1 false, label %bb608.preheader, label %bb791.preheader
176 bb608.preheader: ; preds = %cond_next797.us, %cond_next572
179 bb608: ; preds = %cond_next771, %bb608.preheader
180 br i1 false, label %cond_false627, label %cond_true613
182 cond_true613: ; preds = %bb608
183 br label %cond_next640
185 cond_false627: ; preds = %bb608
186 br label %cond_next640
188 cond_next640: ; preds = %cond_false627, %cond_true613
189 br i1 false, label %cond_true653, label %cond_next671
191 cond_true653: ; preds = %cond_next640
192 br label %cond_next671
194 cond_next671: ; preds = %cond_true653, %cond_next640
195 br i1 false, label %cond_true683, label %cond_next724
197 cond_true683: ; preds = %cond_next671
198 br i1 false, label %cond_next724, label %L1
200 cond_next724: ; preds = %cond_true683, %cond_next671
201 br i1 false, label %cond_true735, label %L1
203 cond_true735: ; preds = %cond_next724
206 L1: ; preds = %cond_true735, %cond_next724, %cond_true683
207 br i1 false, label %cond_true745, label %cond_next771
209 cond_true745: ; preds = %L1
210 br label %cond_next771
212 cond_next771: ; preds = %cond_true745, %L1
213 br i1 false, label %bb608, label %bb791.preheader.loopexit
215 bb791.preheader.loopexit: ; preds = %cond_next771
216 br label %bb791.preheader
218 bb791.preheader: ; preds = %bb791.preheader.loopexit, %cond_next572
219 br i1 false, label %cond_next797.us, label %bb809.split
221 cond_next797.us: ; preds = %bb791.preheader
222 br label %bb608.preheader
224 bb809.split: ; preds = %bb791.preheader
225 br i1 false, label %cond_next827, label %cond_true820
227 cond_true820: ; preds = %bb809.split
228 br label %cond_next827
230 cond_next827: ; preds = %cond_true820, %bb809.split
231 br i1 false, label %cond_true833, label %cond_next840
233 cond_true833: ; preds = %cond_next827
234 br label %cond_next840
236 cond_next840: ; preds = %cond_true833, %cond_next827
237 br i1 false, label %bb866, label %bb1245
239 bb866: ; preds = %bb1239, %cond_next840
240 br i1 false, label %cond_true875, label %bb911
242 cond_true875: ; preds = %bb866
243 br label %cond_next1180
245 bb911: ; preds = %bb866
246 switch i32 0, label %bb1165 [
256 bb915: ; preds = %cond_next1171, %bb911
257 br i1 false, label %cond_next1171, label %cond_next1180
259 bb932: ; preds = %cond_next1171, %bb911
262 bb941: ; preds = %cond_next1171, %bb911
265 L1970: ; preds = %bb941, %bb932
268 bb1029: ; preds = %cond_next1171, %bb911
271 bb1036: ; preds = %cond_next1171, %bb911
274 bb1069: ; preds = %cond_next1171, %bb911
275 br i1 false, label %cond_next1121, label %cond_true1108
277 L3: ; preds = %cond_next1171, %bb911
278 br i1 false, label %cond_next1121, label %cond_true1108
280 cond_true1108: ; preds = %L3, %bb1069
283 cond_next1121: ; preds = %L3, %bb1069
286 L4: ; preds = %cond_next1121, %cond_true1108, %bb1036, %bb1029
289 bb1165: ; preds = %cond_next1171, %L4, %L1970, %bb911
290 br i1 false, label %cond_next1171, label %cond_next1180
292 cond_next1171: ; preds = %bb1165, %bb915
293 switch i32 0, label %bb1165 [
303 cond_next1180: ; preds = %bb1165, %bb915, %cond_true875
306 bb1239: ; preds = %cond_next1251, %cond_next1180
307 br i1 false, label %bb866, label %bb1245
309 bb1245: ; preds = %bb1239, %cond_next840
310 br i1 false, label %cond_next1251, label %bb1257
312 cond_next1251: ; preds = %bb1245
315 bb1257: ; preds = %bb1245