Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / Transforms / LCSSA / 2006-10-31-UnreachableBlock.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -lcssa -disable-output
2 ; PR977
3
4 void %process_backlog() {
5 entry:
6         br label %loopentry.preheader
7
8 loopentry.preheader:            ; preds = %dead_block_after_break, %entry
9         %work.0.ph = phi int [ %inc, %dead_block_after_break ], [ 0, %entry ]           ; <int> [#uses=0]
10         br label %loopentry
11
12 loopentry:              ; preds = %endif.1, %loopentry.preheader
13         br bool false, label %then.i, label %loopentry.__skb_dequeue67.exit_crit_edge
14
15 loopentry.__skb_dequeue67.exit_crit_edge:               ; preds = %loopentry
16         br label %__skb_dequeue67.exit
17
18 then.i:         ; preds = %loopentry
19         br label %__skb_dequeue67.exit
20
21 __skb_dequeue67.exit:           ; preds = %then.i, %loopentry.__skb_dequeue67.exit_crit_edge
22         br bool false, label %then.0, label %__skb_dequeue67.exit.endif.0_crit_edge
23
24 __skb_dequeue67.exit.endif.0_crit_edge:         ; preds = %__skb_dequeue67.exit
25         br label %endif.0
26
27 then.0:         ; preds = %__skb_dequeue67.exit
28         br label %job_done
29
30 dead_block_after_goto:          ; No predecessors!
31         unreachable
32
33 endif.0:                ; preds = %__skb_dequeue67.exit.endif.0_crit_edge
34         br bool false, label %then.0.i, label %endif.0.endif.0.i_crit_edge
35
36 endif.0.endif.0.i_crit_edge:            ; preds = %endif.0
37         br label %endif.0.i
38
39 then.0.i:               ; preds = %endif.0
40         br label %endif.0.i
41
42 endif.0.i:              ; preds = %then.0.i, %endif.0.endif.0.i_crit_edge
43         br bool false, label %then.i.i, label %endif.0.i.skb_bond.exit.i_crit_edge
44
45 endif.0.i.skb_bond.exit.i_crit_edge:            ; preds = %endif.0.i
46         br label %skb_bond.exit.i
47
48 then.i.i:               ; preds = %endif.0.i
49         br label %skb_bond.exit.i
50
51 skb_bond.exit.i:                ; preds = %then.i.i, %endif.0.i.skb_bond.exit.i_crit_edge
52         br label %loopentry.0.i
53
54 loopentry.0.i:          ; preds = %loopentry.0.i.backedge, %skb_bond.exit.i
55         br bool false, label %loopentry.0.i.no_exit.0.i_crit_edge, label %loopentry.0.i.loopexit.0.i_crit_edge
56
57 loopentry.0.i.loopexit.0.i_crit_edge:           ; preds = %loopentry.0.i
58         br label %loopexit.0.i
59
60 loopentry.0.i.no_exit.0.i_crit_edge:            ; preds = %loopentry.0.i
61         br label %no_exit.0.i
62
63 no_exit.0.i:            ; preds = %then.3.i.no_exit.0.i_crit_edge, %loopentry.0.i.no_exit.0.i_crit_edge
64         br bool false, label %no_exit.0.i.shortcirc_done.0.i_crit_edge, label %shortcirc_next.0.i
65
66 no_exit.0.i.shortcirc_done.0.i_crit_edge:               ; preds = %no_exit.0.i
67         br label %shortcirc_done.0.i
68
69 shortcirc_next.0.i:             ; preds = %no_exit.0.i
70         br label %shortcirc_done.0.i
71
72 shortcirc_done.0.i:             ; preds = %shortcirc_next.0.i, %no_exit.0.i.shortcirc_done.0.i_crit_edge
73         br bool false, label %then.1.i, label %endif.1.i
74
75 then.1.i:               ; preds = %shortcirc_done.0.i
76         br bool false, label %then.2.i, label %then.1.i.endif.2.i_crit_edge
77
78 then.1.i.endif.2.i_crit_edge:           ; preds = %then.1.i
79         br label %endif.2.i
80
81 then.2.i:               ; preds = %then.1.i
82         br bool false, label %then.3.i, label %else.0.i
83
84 then.3.i:               ; preds = %then.2.i
85         br bool false, label %then.3.i.no_exit.0.i_crit_edge, label %then.3.i.loopexit.0.i_crit_edge
86
87 then.3.i.loopexit.0.i_crit_edge:                ; preds = %then.3.i
88         br label %loopexit.0.i
89
90 then.3.i.no_exit.0.i_crit_edge:         ; preds = %then.3.i
91         br label %no_exit.0.i
92
93 else.0.i:               ; preds = %then.2.i
94         br label %endif.2.i
95
96 endif.3.i:              ; No predecessors!
97         unreachable
98
99 endif.2.i:              ; preds = %else.0.i, %then.1.i.endif.2.i_crit_edge
100         br label %loopentry.0.i.backedge
101
102 endif.1.i:              ; preds = %shortcirc_done.0.i
103         br label %loopentry.0.i.backedge
104
105 loopentry.0.i.backedge:         ; preds = %endif.1.i, %endif.2.i
106         br label %loopentry.0.i
107
108 loopexit.0.i:           ; preds = %then.3.i.loopexit.0.i_crit_edge, %loopentry.0.i.loopexit.0.i_crit_edge
109         br label %loopentry.1.i
110
111 loopentry.1.i:          ; preds = %loopentry.1.i.backedge, %loopexit.0.i
112         br bool false, label %loopentry.1.i.no_exit.1.i_crit_edge, label %loopentry.1.i.loopexit.1.i_crit_edge
113
114 loopentry.1.i.loopexit.1.i_crit_edge:           ; preds = %loopentry.1.i
115         br label %loopexit.1.i
116
117 loopentry.1.i.no_exit.1.i_crit_edge:            ; preds = %loopentry.1.i
118         br label %no_exit.1.i
119
120 no_exit.1.i:            ; preds = %then.6.i.no_exit.1.i_crit_edge, %loopentry.1.i.no_exit.1.i_crit_edge
121         br bool false, label %shortcirc_next.1.i, label %no_exit.1.i.shortcirc_done.1.i_crit_edge
122
123 no_exit.1.i.shortcirc_done.1.i_crit_edge:               ; preds = %no_exit.1.i
124         br label %shortcirc_done.1.i
125
126 shortcirc_next.1.i:             ; preds = %no_exit.1.i
127         br bool false, label %shortcirc_next.1.i.shortcirc_done.2.i_crit_edge, label %shortcirc_next.2.i
128
129 shortcirc_next.1.i.shortcirc_done.2.i_crit_edge:                ; preds = %shortcirc_next.1.i
130         br label %shortcirc_done.2.i
131
132 shortcirc_next.2.i:             ; preds = %shortcirc_next.1.i
133         br label %shortcirc_done.2.i
134
135 shortcirc_done.2.i:             ; preds = %shortcirc_next.2.i, %shortcirc_next.1.i.shortcirc_done.2.i_crit_edge
136         br label %shortcirc_done.1.i
137
138 shortcirc_done.1.i:             ; preds = %shortcirc_done.2.i, %no_exit.1.i.shortcirc_done.1.i_crit_edge
139         br bool false, label %then.4.i, label %endif.4.i
140
141 then.4.i:               ; preds = %shortcirc_done.1.i
142         br bool false, label %then.5.i, label %then.4.i.endif.5.i_crit_edge
143
144 then.4.i.endif.5.i_crit_edge:           ; preds = %then.4.i
145         br label %endif.5.i
146
147 then.5.i:               ; preds = %then.4.i
148         br bool false, label %then.6.i, label %else.1.i
149
150 then.6.i:               ; preds = %then.5.i
151         br bool false, label %then.6.i.no_exit.1.i_crit_edge, label %then.6.i.loopexit.1.i_crit_edge
152
153 then.6.i.loopexit.1.i_crit_edge:                ; preds = %then.6.i
154         br label %loopexit.1.i
155
156 then.6.i.no_exit.1.i_crit_edge:         ; preds = %then.6.i
157         br label %no_exit.1.i
158
159 else.1.i:               ; preds = %then.5.i
160         br label %endif.5.i
161
162 endif.6.i:              ; No predecessors!
163         unreachable
164
165 endif.5.i:              ; preds = %else.1.i, %then.4.i.endif.5.i_crit_edge
166         br label %loopentry.1.i.backedge
167
168 endif.4.i:              ; preds = %shortcirc_done.1.i
169         br label %loopentry.1.i.backedge
170
171 loopentry.1.i.backedge:         ; preds = %endif.4.i, %endif.5.i
172         br label %loopentry.1.i
173
174 loopexit.1.i:           ; preds = %then.6.i.loopexit.1.i_crit_edge, %loopentry.1.i.loopexit.1.i_crit_edge
175         br bool false, label %then.7.i, label %else.2.i
176
177 then.7.i:               ; preds = %loopexit.1.i
178         br bool false, label %then.8.i, label %else.3.i
179
180 then.8.i:               ; preds = %then.7.i
181         br label %netif_receive_skb.exit
182
183 else.3.i:               ; preds = %then.7.i
184         br label %netif_receive_skb.exit
185
186 endif.8.i:              ; No predecessors!
187         unreachable
188
189 else.2.i:               ; preds = %loopexit.1.i
190         br bool false, label %else.2.i.shortcirc_done.i.i_crit_edge, label %shortcirc_next.i.i
191
192 else.2.i.shortcirc_done.i.i_crit_edge:          ; preds = %else.2.i
193         br label %shortcirc_done.i.i
194
195 shortcirc_next.i.i:             ; preds = %else.2.i
196         br label %shortcirc_done.i.i
197
198 shortcirc_done.i.i:             ; preds = %shortcirc_next.i.i, %else.2.i.shortcirc_done.i.i_crit_edge
199         br bool false, label %then.i1.i, label %shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge
200
201 shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge:                ; preds = %shortcirc_done.i.i
202         br label %kfree_skb65.exit.i
203
204 then.i1.i:              ; preds = %shortcirc_done.i.i
205         br label %kfree_skb65.exit.i
206
207 kfree_skb65.exit.i:             ; preds = %then.i1.i, %shortcirc_done.i.i.kfree_skb65.exit.i_crit_edge
208         br label %netif_receive_skb.exit
209
210 netif_receive_skb.exit:         ; preds = %kfree_skb65.exit.i, %else.3.i, %then.8.i
211         br bool false, label %then.i1, label %netif_receive_skb.exit.dev_put69.exit_crit_edge
212
213 netif_receive_skb.exit.dev_put69.exit_crit_edge:                ; preds = %netif_receive_skb.exit
214         br label %dev_put69.exit
215
216 then.i1:                ; preds = %netif_receive_skb.exit
217         br label %dev_put69.exit
218
219 dev_put69.exit:         ; preds = %then.i1, %netif_receive_skb.exit.dev_put69.exit_crit_edge
220         %inc = add int 0, 1             ; <int> [#uses=1]
221         br bool false, label %dev_put69.exit.shortcirc_done_crit_edge, label %shortcirc_next
222
223 dev_put69.exit.shortcirc_done_crit_edge:                ; preds = %dev_put69.exit
224         br label %shortcirc_done
225
226 shortcirc_next:         ; preds = %dev_put69.exit
227         br label %shortcirc_done
228
229 shortcirc_done:         ; preds = %shortcirc_next, %dev_put69.exit.shortcirc_done_crit_edge
230         br bool false, label %then.1, label %endif.1
231
232 then.1:         ; preds = %shortcirc_done
233         ret void
234
235 dead_block_after_break:         ; No predecessors!
236         br label %loopentry.preheader
237
238 endif.1:                ; preds = %shortcirc_done
239         br label %loopentry
240
241 loopexit:               ; No predecessors!
242         unreachable
243
244 after_ret.0:            ; No predecessors!
245         br label %job_done
246
247 job_done:               ; preds = %after_ret.0, %then.0
248         br label %loopentry.i
249
250 loopentry.i:            ; preds = %no_exit.i, %job_done
251         br bool false, label %no_exit.i, label %clear_bit62.exit
252
253 no_exit.i:              ; preds = %loopentry.i
254         br label %loopentry.i
255
256 clear_bit62.exit:               ; preds = %loopentry.i
257         br bool false, label %then.2, label %endif.2
258
259 then.2:         ; preds = %clear_bit62.exit
260         ret void
261
262 endif.2:                ; preds = %clear_bit62.exit
263         ret void
264
265 after_ret.1:            ; No predecessors!
266         ret void
267
268 return:         ; No predecessors!
269         unreachable
270 }