llvm.org GIT mirror llvm / 43aaf66
This is the last remaining bug that I know of in the loop extractor. The loop extractor has extracted hundreds of loops from the SPEC benchmarks without crashing and without misoptimizing the programs. This testcase could be reduced substantially more by hand, but I don't have time to work on it right now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12495 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 196 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -loop-extract -disable-output
1
2 implementation ; Functions:
3
4 declare int %_IO_getc()
5
6 declare void %__errno_location()
7
8 void %yylex() {
9 entry:
10 switch uint 0, label %label.126 [
11 uint 0, label %return
12 uint 61, label %combine
13 uint 33, label %combine
14 uint 94, label %combine
15 uint 37, label %combine
16 uint 47, label %combine
17 uint 42, label %combine
18 uint 62, label %combine
19 uint 60, label %combine
20 uint 58, label %combine
21 uint 124, label %combine
22 uint 38, label %combine
23 uint 45, label %combine
24 uint 43, label %combine
25 uint 34, label %string_constant
26 uint 39, label %char_constant
27 uint 46, label %loopexit.2
28 uint 57, label %loopexit.2
29 uint 56, label %loopexit.2
30 uint 55, label %loopexit.2
31 uint 54, label %loopexit.2
32 uint 53, label %loopexit.2
33 uint 52, label %loopexit.2
34 uint 51, label %loopexit.2
35 uint 50, label %loopexit.2
36 uint 49, label %loopexit.2
37 uint 48, label %loopexit.2
38 uint 95, label %letter
39 uint 122, label %letter
40 uint 121, label %letter
41 uint 120, label %letter
42 uint 119, label %letter
43 uint 118, label %letter
44 uint 117, label %letter
45 uint 116, label %letter
46 uint 115, label %letter
47 uint 114, label %letter
48 uint 113, label %letter
49 uint 112, label %letter
50 uint 111, label %letter
51 uint 110, label %letter
52 uint 109, label %letter
53 uint 108, label %letter
54 uint 107, label %letter
55 uint 106, label %letter
56 uint 105, label %letter
57 uint 104, label %letter
58 uint 103, label %letter
59 uint 102, label %letter
60 uint 101, label %letter
61 uint 100, label %letter
62 uint 99, label %letter
63 uint 98, label %letter
64 uint 97, label %letter
65 uint 90, label %letter
66 uint 89, label %letter
67 uint 88, label %letter
68 uint 87, label %letter
69 uint 86, label %letter
70 uint 85, label %letter
71 uint 84, label %letter
72 uint 83, label %letter
73 uint 82, label %letter
74 uint 81, label %letter
75 uint 80, label %letter
76 uint 79, label %letter
77 uint 78, label %letter
78 uint 77, label %letter
79 uint 75, label %letter
80 uint 74, label %letter
81 uint 73, label %letter
82 uint 72, label %letter
83 uint 71, label %letter
84 uint 70, label %letter
85 uint 69, label %letter
86 uint 68, label %letter
87 uint 67, label %letter
88 uint 66, label %letter
89 uint 65, label %letter
90 uint 64, label %label.13
91 uint 76, label %label.12
92 uint 36, label %label.11
93 uint 4294967295, label %label.10
94 ]
95
96 label.10: ; preds = %entry
97 ret void
98
99 label.11: ; preds = %entry
100 ret void
101
102 label.12: ; preds = %entry
103 ret void
104
105 label.13: ; preds = %entry
106 ret void
107
108 letter: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
109 ret void
110
111 loopexit.2: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
112 switch int 0, label %shortcirc_next.14 [
113 int 48, label %then.20
114 int 46, label %endif.38
115 ]
116
117 then.20: ; preds = %loopexit.2
118 switch int 0, label %else.4 [
119 int 120, label %then.21
120 int 88, label %then.21
121 ]
122
123 then.21: ; preds = %then.20, %then.20
124 ret void
125
126 else.4: ; preds = %then.20
127 ret void
128
129 shortcirc_next.14: ; preds = %loopexit.2
130 ret void
131
132 endif.38: ; preds = %loopexit.2
133 br bool false, label %then.40, label %then.39
134
135 then.39: ; preds = %endif.38
136 ret void
137
138 then.40: ; preds = %endif.38
139 invoke void %__errno_location( )
140 to label %switchexit.2 unwind label %LongJmpBlkPre
141
142 loopentry.6: ; preds = %endif.52
143 switch uint 0, label %switchexit.2 [
144 uint 73, label %label.82
145 uint 105, label %label.82
146 uint 76, label %label.80
147 uint 108, label %label.80
148 uint 70, label %label.78
149 uint 102, label %label.78
150 ]
151
152 label.78: ; preds = %loopentry.6, %loopentry.6
153 ret void
154
155 label.80: ; preds = %loopentry.6, %loopentry.6
156 ret void
157
158 label.82: ; preds = %loopentry.6, %loopentry.6
159 %c.0.15.5 = phi int [ %tmp.79417, %loopentry.6 ], [ %tmp.79417, %loopentry.6 ] ; [#uses=0]
160 ret void
161
162 switchexit.2: ; preds = %then.40, %loopentry.6
163 br bool false, label %endif.51, label %loopexit.6
164
165 endif.51: ; preds = %switchexit.2
166 br bool false, label %endif.52, label %then.52
167
168 then.52: ; preds = %endif.51
169 ret void
170
171 endif.52: ; preds = %endif.51
172 %tmp.79417 = invoke int %_IO_getc( )
173 to label %loopentry.6 unwind label %LongJmpBlkPre ; [#uses=2]
174
175 loopexit.6: ; preds = %switchexit.2
176 ret void
177
178 char_constant: ; preds = %entry
179 ret void
180
181 string_constant: ; preds = %entry
182 ret void
183
184 combine: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry
185 ret void
186
187 label.126: ; preds = %entry
188 ret void
189
190 return: ; preds = %entry
191 ret void
192
193 LongJmpBlkPre: ; preds = %then.40, %endif.52
194 ret void
195 }