1 ; RUN: opt < %s -lcssa -disable-output -verify-dom-info -verify-loop-info
4 declare i32 @opost_block()
6 define void @write_chan() {
8 br i1 false, label %shortcirc_next.0, label %shortcirc_done.0
9 shortcirc_next.0: ; preds = %entry
10 br label %shortcirc_done.0
11 shortcirc_done.0: ; preds = %shortcirc_next.0, %entry
12 br i1 false, label %shortcirc_next.1, label %shortcirc_done.1
13 shortcirc_next.1: ; preds = %shortcirc_done.0
14 br label %shortcirc_done.1
15 shortcirc_done.1: ; preds = %shortcirc_next.1, %shortcirc_done.0
16 br i1 false, label %then.0, label %endif.0
17 then.0: ; preds = %shortcirc_done.1
18 br i1 false, label %then.1, label %endif.1
19 then.1: ; preds = %then.0
21 after_ret.0: ; No predecessors!
23 endif.1: ; preds = %after_ret.0, %then.0
25 endif.0: ; preds = %endif.1, %shortcirc_done.1
27 loopentry.0: ; preds = %endif.12, %endif.0
28 br i1 false, label %then.2, label %endif.2
29 then.2: ; preds = %loopentry.0
31 dead_block_after_break.0: ; No predecessors!
33 endif.2: ; preds = %dead_block_after_break.0, %loopentry.0
34 br i1 false, label %shortcirc_done.2, label %shortcirc_next.2
35 shortcirc_next.2: ; preds = %endif.2
36 br i1 false, label %shortcirc_next.3, label %shortcirc_done.3
37 shortcirc_next.3: ; preds = %shortcirc_next.2
38 br label %shortcirc_done.3
39 shortcirc_done.3: ; preds = %shortcirc_next.3, %shortcirc_next.2
40 br label %shortcirc_done.2
41 shortcirc_done.2: ; preds = %shortcirc_done.3, %endif.2
42 br i1 false, label %then.3, label %endif.3
43 then.3: ; preds = %shortcirc_done.2
45 dead_block_after_break.1: ; No predecessors!
47 endif.3: ; preds = %dead_block_after_break.1, %shortcirc_done.2
48 br i1 false, label %shortcirc_next.4, label %shortcirc_done.4
49 shortcirc_next.4: ; preds = %endif.3
50 br label %shortcirc_done.4
51 shortcirc_done.4: ; preds = %shortcirc_next.4, %endif.3
52 br i1 false, label %then.4, label %else
53 then.4: ; preds = %shortcirc_done.4
55 loopentry.1: ; preds = %endif.8, %then.4
56 br i1 false, label %no_exit, label %loopexit.1
57 no_exit: ; preds = %loopentry.1
58 %tmp.94 = call i32 @opost_block( ) ; <i32> [#uses=1]
59 br i1 false, label %then.5, label %endif.5
60 then.5: ; preds = %no_exit
61 br i1 false, label %then.6, label %endif.6
62 then.6: ; preds = %then.5
64 dead_block_after_break.2: ; No predecessors!
66 endif.6: ; preds = %dead_block_after_break.2, %then.5
68 dead_block_after_goto.0: ; No predecessors!
70 endif.5: ; preds = %dead_block_after_goto.0, %no_exit
71 br i1 false, label %then.7, label %endif.7
72 then.7: ; preds = %endif.5
74 dead_block_after_break.3: ; No predecessors!
76 endif.7: ; preds = %dead_block_after_break.3, %endif.5
77 switch i32 1, label %switchexit [
82 label.0: ; preds = %endif.7
84 dead_block_after_break.4: ; No predecessors!
86 label.1: ; preds = %dead_block_after_break.4, %endif.7
88 dead_block_after_break.5: ; No predecessors!
90 label.2: ; preds = %dead_block_after_break.5, %endif.7
92 dead_block_after_break.6: ; No predecessors!
94 switchexit: ; preds = %dead_block_after_break.6, %label.2, %label.1, %label.0, %endif.7
95 br i1 false, label %then.8, label %endif.8
96 then.8: ; preds = %switchexit
98 dead_block_after_break.7: ; No predecessors!
100 endif.8: ; preds = %dead_block_after_break.7, %switchexit
101 br label %loopentry.1
102 loopexit.1: ; preds = %then.8, %then.7, %then.6, %loopentry.1
103 br i1 false, label %then.9, label %endif.9
104 then.9: ; preds = %loopexit.1
106 endif.9: ; preds = %then.9, %loopexit.1
108 else: ; preds = %shortcirc_done.4
109 br i1 false, label %then.10, label %endif.10
110 then.10: ; preds = %else
112 dead_block_after_goto.1: ; No predecessors!
114 endif.10: ; preds = %dead_block_after_goto.1, %else
116 endif.4: ; preds = %endif.10, %endif.9
117 br i1 false, label %then.11, label %endif.11
118 then.11: ; preds = %endif.4
120 dead_block_after_break.8: ; No predecessors!
122 endif.11: ; preds = %dead_block_after_break.8, %endif.4
123 br i1 false, label %then.12, label %endif.12
124 then.12: ; preds = %endif.11
126 dead_block_after_break.9: ; No predecessors!
128 endif.12: ; preds = %dead_block_after_break.9, %endif.11
129 br label %loopentry.0
130 loopexit.0: ; preds = %then.12, %then.11, %then.3, %then.2
132 break_out: ; preds = %loopexit.0, %then.10, %endif.6
133 %retval.3 = phi i32 [ 0, %loopexit.0 ], [ %tmp.94, %endif.6 ], [ 0, %then.10 ] ; <i32> [#uses=0]
134 br i1 false, label %cond_true, label %cond_false
135 cond_true: ; preds = %break_out
136 br label %cond_continue
137 cond_false: ; preds = %break_out
138 br label %cond_continue
139 cond_continue: ; preds = %cond_false, %cond_true
141 after_ret.1: ; No predecessors!
143 return: ; preds = %after_ret.1, %cond_continue, %then.1