]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/passes/vacuum.txt
New upstream version 1.23.0+dfsg1
[rustc.git] / src / binaryen / test / passes / vacuum.txt
1 (module
2 (type $0 (func))
3 (type $1 (func (param i32)))
4 (type $2 (func (result f32)))
5 (type $3 (func (result i32)))
6 (type $4 (func (param i32 f64 i32 i32)))
7 (type $FUNCSIG$i (func (result i32)))
8 (type $6 (func (result f64)))
9 (import "env" "int" (func $int (result i32)))
10 (global $Int i32 (i32.const 0))
11 (memory $0 256 256)
12 (func $b (; 1 ;) (type $0)
13 (nop)
14 )
15 (func $l (; 2 ;) (type $0)
16 (local $x i32)
17 (local $y i32)
18 (set_local $x
19 (get_local $x)
20 )
21 (set_local $x
22 (get_local $x)
23 )
24 (set_local $x
25 (get_local $y)
26 )
27 )
28 (func $loopy (; 3 ;) (type $1) (param $0 i32)
29 (nop)
30 )
31 (func $unary (; 4 ;) (type $2) (result f32)
32 (f32.abs
33 (unreachable)
34 )
35 )
36 (func $binary (; 5 ;) (type $2) (result f32)
37 (drop
38 (f32.add
39 (unreachable)
40 (f32.const 3)
41 )
42 )
43 )
44 (func $select (; 6 ;) (type $3) (result i32)
45 (drop
46 (select
47 (unreachable)
48 (i32.const 4)
49 (i32.const 5)
50 )
51 )
52 )
53 (func $block-to-one (; 7 ;) (type $0)
54 (unreachable)
55 )
56 (func $recurse (; 8 ;) (type $0)
57 (nop)
58 )
59 (func $func-block (; 9 ;) (type $0)
60 (nop)
61 )
62 (func $Gu (; 10 ;) (type $4) (param $b i32) (param $e f64) (param $l i32) (param $d i32)
63 (if
64 (if (result i32)
65 (get_local $d)
66 (f64.ne
67 (f64.promote/f32
68 (f32.load
69 (tee_local $l
70 (i32.add
71 (get_local $b)
72 (i32.const 60)
73 )
74 )
75 )
76 )
77 (get_local $e)
78 )
79 (i32.const 0)
80 )
81 (unreachable)
82 )
83 )
84 (func $if-drop (; 11 ;) (type $3) (result i32)
85 (block $out
86 (if
87 (call $if-drop)
88 (drop
89 (call $int)
90 )
91 (br $out)
92 )
93 (if
94 (call $if-drop)
95 (br $out)
96 (drop
97 (call $int)
98 )
99 )
100 )
101 (i32.const 1)
102 )
103 (func $drop-silly (; 12 ;) (type $0)
104 (drop
105 (call $int)
106 )
107 (drop
108 (call $int)
109 )
110 (drop
111 (call $int)
112 )
113 (drop
114 (i32.add
115 (call $int)
116 (call $int)
117 )
118 )
119 )
120 (func $drop-get-global (; 13 ;) (type $0)
121 (call $drop-get-global)
122 )
123 (func $relooperJumpThreading1 (; 14 ;) (type $0)
124 (local $$vararg_ptr5 i32)
125 (local $$11 i32)
126 (nop)
127 )
128 (func $relooperJumpThreading2 (; 15 ;) (type $0)
129 (nop)
130 )
131 (func $relooperJumpThreading3 (; 16 ;) (type $0)
132 (nop)
133 )
134 (func $if2drops (; 17 ;) (type $3) (result i32)
135 (drop
136 (if (result i32)
137 (call $if2drops)
138 (call $if2drops)
139 (call $if2drops)
140 )
141 )
142 (i32.const 2)
143 )
144 (func $if2drops-different (; 18 ;) (type $3) (result i32)
145 (if
146 (call $if2drops)
147 (drop
148 (call $if2drops)
149 )
150 (drop
151 (call $unary)
152 )
153 )
154 (i32.const 2)
155 )
156 (func $if-const (; 19 ;) (type $1) (param $x i32)
157 (call $if-const
158 (i32.const 3)
159 )
160 (call $if-const
161 (i32.const 5)
162 )
163 (call $if-const
164 (i32.const 7)
165 )
166 )
167 (func $drop-if-both-unreachable (; 20 ;) (type $1) (param $0 i32)
168 (block $out
169 (drop
170 (if (result i32)
171 (get_local $0)
172 (br $out)
173 (br $out)
174 )
175 )
176 )
177 (drop
178 (if (result i32)
179 (get_local $0)
180 (unreachable)
181 (unreachable)
182 )
183 )
184 )
185 (func $if-1-block (; 21 ;) (type $1) (param $x i32)
186 (block $out
187 (if
188 (get_local $x)
189 (block $block9
190 (set_local $x
191 (get_local $x)
192 )
193 (br $out)
194 )
195 )
196 )
197 )
198 (func $block-resize-br-gone (; 22 ;) (type $0)
199 (block $out
200 (block $in
201 (call $block-resize-br-gone)
202 (br $in)
203 )
204 (return)
205 )
206 )
207 (func $block-unreachable-but-last-element-concrete (; 23 ;) (type $0)
208 (local $2 i32)
209 (nop)
210 )
211 (func $a (; 24 ;) (type $0)
212 (block $block
213 (i32.store
214 (i32.const 1)
215 (i32.const 2)
216 )
217 (f64.div
218 (f64.const -nan:0xfffffffffa361)
219 (loop $label$1
220 (br $label$1)
221 )
222 )
223 )
224 )
225 (func $leave-block-even-if-br-not-taken (; 25 ;) (type $6) (result f64)
226 (block $label$0 (result f64)
227 (f64.store align=1
228 (i32.const 879179022)
229 (br_if $label$0
230 (loop $label$9
231 (br $label$9)
232 )
233 (i32.const 677803374)
234 )
235 )
236 )
237 )
238 (func $executed-if-in-block (; 26 ;) (type $0)
239 (unreachable)
240 )
241 (func $executed-if-in-block2 (; 27 ;) (type $0)
242 (unreachable)
243 )
244 (func $executed-if-in-block3 (; 28 ;) (type $0)
245 (block $label$0
246 (br $label$0)
247 )
248 (unreachable)
249 )
250 (func $load-may-have-side-effects (; 29 ;) (type $3) (result i32)
251 (i64.ge_s
252 (block $block (result i64)
253 (drop
254 (i64.load32_s
255 (i32.const 678585719)
256 )
257 )
258 (i64.const 2912825531628789796)
259 )
260 (i64.const 0)
261 )
262 )
263 (func $unary-binary-may-trap (; 30 ;) (type $0)
264 (drop
265 (i64.div_s
266 (i64.const -1)
267 (i64.const 729618461987467893)
268 )
269 )
270 (drop
271 (i64.trunc_u/f32
272 (f32.const 70847791997969805621592064)
273 )
274 )
275 )
276 (func $unreachable-if-with-nop-arm-that-leaves-a-concrete-value-if-nop-is-removed (; 31 ;) (type $0)
277 (block $label$0
278 (loop $label$1
279 (drop
280 (br_if $label$0
281 (loop $label$9
282 (br $label$9)
283 )
284 )
285 )
286 )
287 )
288 )
289 (func $if-arm-vanishes (; 32 ;) (type $3) (result i32)
290 (block $label$0 (result i32)
291 (br $label$0
292 (i32.const 1)
293 )
294 )
295 )
296 (func $if-arm-vanishes-2 (; 33 ;) (type $3) (result i32)
297 (block $label$0 (result i32)
298 (br $label$0
299 (i32.const 1)
300 )
301 )
302 )
303 (func $nop-if-type-changes (; 34 ;) (type $0)
304 (local $0 i32)
305 (nop)
306 )
307 )