• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -lcssa -disable-output -verify-dom-info -verify-loop-info
2; PR977
3; END.
4declare i32 @opost_block()
5
6define void @write_chan() {
7entry:
8	br i1 false, label %shortcirc_next.0, label %shortcirc_done.0
9shortcirc_next.0:		; preds = %entry
10	br label %shortcirc_done.0
11shortcirc_done.0:		; preds = %shortcirc_next.0, %entry
12	br i1 false, label %shortcirc_next.1, label %shortcirc_done.1
13shortcirc_next.1:		; preds = %shortcirc_done.0
14	br label %shortcirc_done.1
15shortcirc_done.1:		; preds = %shortcirc_next.1, %shortcirc_done.0
16	br i1 false, label %then.0, label %endif.0
17then.0:		; preds = %shortcirc_done.1
18	br i1 false, label %then.1, label %endif.1
19then.1:		; preds = %then.0
20	br label %return
21after_ret.0:		; No predecessors!
22	br label %endif.1
23endif.1:		; preds = %after_ret.0, %then.0
24	br label %endif.0
25endif.0:		; preds = %endif.1, %shortcirc_done.1
26	br label %loopentry.0
27loopentry.0:		; preds = %endif.12, %endif.0
28	br i1 false, label %then.2, label %endif.2
29then.2:		; preds = %loopentry.0
30	br label %loopexit.0
31dead_block_after_break.0:		; No predecessors!
32	br label %endif.2
33endif.2:		; preds = %dead_block_after_break.0, %loopentry.0
34	br i1 false, label %shortcirc_done.2, label %shortcirc_next.2
35shortcirc_next.2:		; preds = %endif.2
36	br i1 false, label %shortcirc_next.3, label %shortcirc_done.3
37shortcirc_next.3:		; preds = %shortcirc_next.2
38	br label %shortcirc_done.3
39shortcirc_done.3:		; preds = %shortcirc_next.3, %shortcirc_next.2
40	br label %shortcirc_done.2
41shortcirc_done.2:		; preds = %shortcirc_done.3, %endif.2
42	br i1 false, label %then.3, label %endif.3
43then.3:		; preds = %shortcirc_done.2
44	br label %loopexit.0
45dead_block_after_break.1:		; No predecessors!
46	br label %endif.3
47endif.3:		; preds = %dead_block_after_break.1, %shortcirc_done.2
48	br i1 false, label %shortcirc_next.4, label %shortcirc_done.4
49shortcirc_next.4:		; preds = %endif.3
50	br label %shortcirc_done.4
51shortcirc_done.4:		; preds = %shortcirc_next.4, %endif.3
52	br i1 false, label %then.4, label %else
53then.4:		; preds = %shortcirc_done.4
54	br label %loopentry.1
55loopentry.1:		; preds = %endif.8, %then.4
56	br i1 false, label %no_exit, label %loopexit.1
57no_exit:		; preds = %loopentry.1
58	%tmp.94 = call i32 @opost_block( )		; <i32> [#uses=1]
59	br i1 false, label %then.5, label %endif.5
60then.5:		; preds = %no_exit
61	br i1 false, label %then.6, label %endif.6
62then.6:		; preds = %then.5
63	br label %loopexit.1
64dead_block_after_break.2:		; No predecessors!
65	br label %endif.6
66endif.6:		; preds = %dead_block_after_break.2, %then.5
67	br label %break_out
68dead_block_after_goto.0:		; No predecessors!
69	br label %endif.5
70endif.5:		; preds = %dead_block_after_goto.0, %no_exit
71	br i1 false, label %then.7, label %endif.7
72then.7:		; preds = %endif.5
73	br label %loopexit.1
74dead_block_after_break.3:		; No predecessors!
75	br label %endif.7
76endif.7:		; preds = %dead_block_after_break.3, %endif.5
77	switch i32 1, label %switchexit [
78		 i32 4, label %label.2
79		 i32 2, label %label.1
80		 i32 1, label %label.0
81	]
82label.0:		; preds = %endif.7
83	br label %switchexit
84dead_block_after_break.4:		; No predecessors!
85	br label %label.1
86label.1:		; preds = %dead_block_after_break.4, %endif.7
87	br label %switchexit
88dead_block_after_break.5:		; No predecessors!
89	br label %label.2
90label.2:		; preds = %dead_block_after_break.5, %endif.7
91	br label %switchexit
92dead_block_after_break.6:		; No predecessors!
93	br label %switchexit
94switchexit:		; preds = %dead_block_after_break.6, %label.2, %label.1, %label.0, %endif.7
95	br i1 false, label %then.8, label %endif.8
96then.8:		; preds = %switchexit
97	br label %loopexit.1
98dead_block_after_break.7:		; No predecessors!
99	br label %endif.8
100endif.8:		; preds = %dead_block_after_break.7, %switchexit
101	br label %loopentry.1
102loopexit.1:		; preds = %then.8, %then.7, %then.6, %loopentry.1
103	br i1 false, label %then.9, label %endif.9
104then.9:		; preds = %loopexit.1
105	br label %endif.9
106endif.9:		; preds = %then.9, %loopexit.1
107	br label %endif.4
108else:		; preds = %shortcirc_done.4
109	br i1 false, label %then.10, label %endif.10
110then.10:		; preds = %else
111	br label %break_out
112dead_block_after_goto.1:		; No predecessors!
113	br label %endif.10
114endif.10:		; preds = %dead_block_after_goto.1, %else
115	br label %endif.4
116endif.4:		; preds = %endif.10, %endif.9
117	br i1 false, label %then.11, label %endif.11
118then.11:		; preds = %endif.4
119	br label %loopexit.0
120dead_block_after_break.8:		; No predecessors!
121	br label %endif.11
122endif.11:		; preds = %dead_block_after_break.8, %endif.4
123	br i1 false, label %then.12, label %endif.12
124then.12:		; preds = %endif.11
125	br label %loopexit.0
126dead_block_after_break.9:		; No predecessors!
127	br label %endif.12
128endif.12:		; preds = %dead_block_after_break.9, %endif.11
129	br label %loopentry.0
130loopexit.0:		; preds = %then.12, %then.11, %then.3, %then.2
131	br label %break_out
132break_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
135cond_true:		; preds = %break_out
136	br label %cond_continue
137cond_false:		; preds = %break_out
138	br label %cond_continue
139cond_continue:		; preds = %cond_false, %cond_true
140	br label %return
141after_ret.1:		; No predecessors!
142	br label %return
143return:		; preds = %after_ret.1, %cond_continue, %then.1
144	ret void
145}
146