Debian Codegraph @

tests/snapshots/testsuite/br_if.wast/0.print

raw
1 (module
2 (type $check (;0;) (func (param i32 i32 i32) (result i32)))
3 (type (;1;) (func))
4 (type (;2;) (func (result i32)))
5 (type (;3;) (func (result i64)))
6 (type (;4;) (func (result f32)))
7 (type (;5;) (func (result f64)))
8 (type (;6;) (func (param i32) (result i32)))
9 (type (;7;) (func (param i32)))
10 (type (;8;) (func (param i32 i32)))
11 (table (;0;) 1 1 funcref)
12 (memory (;0;) 1)
13 (global $a (;0;) (mut i32) i32.const 10)
14 (export "type-i32" (func 1))
15 (export "type-i64" (func 2))
16 (export "type-f32" (func 3))
17 (export "type-f64" (func 4))
18 (export "type-i32-value" (func 5))
19 (export "type-i64-value" (func 6))
20 (export "type-f32-value" (func 7))
21 (export "type-f64-value" (func 8))
22 (export "as-block-first" (func 9))
23 (export "as-block-mid" (func 10))
24 (export "as-block-last" (func 11))
25 (export "as-block-first-value" (func 12))
26 (export "as-block-mid-value" (func 13))
27 (export "as-block-last-value" (func 14))
28 (export "as-loop-first" (func 15))
29 (export "as-loop-mid" (func 16))
30 (export "as-loop-last" (func 17))
31 (export "as-br-value" (func 18))
32 (export "as-br_if-cond" (func 19))
33 (export "as-br_if-value" (func 20))
34 (export "as-br_if-value-cond" (func 21))
35 (export "as-br_table-index" (func 22))
36 (export "as-br_table-value" (func 23))
37 (export "as-br_table-value-index" (func 24))
38 (export "as-return-value" (func 25))
39 (export "as-if-cond" (func 26))
40 (export "as-if-then" (func 27))
41 (export "as-if-else" (func 28))
42 (export "as-select-first" (func 29))
43 (export "as-select-second" (func 30))
44 (export "as-select-cond" (func 31))
45 (export "as-call-first" (func 33))
46 (export "as-call-mid" (func 34))
47 (export "as-call-last" (func 35))
48 (export "as-call_indirect-func" (func 37))
49 (export "as-call_indirect-first" (func 38))
50 (export "as-call_indirect-mid" (func 39))
51 (export "as-call_indirect-last" (func 40))
52 (export "as-local.set-value" (func 41))
53 (export "as-local.tee-value" (func 42))
54 (export "as-global.set-value" (func 43))
55 (export "as-load-address" (func 44))
56 (export "as-loadN-address" (func 45))
57 (export "as-store-address" (func 46))
58 (export "as-store-value" (func 47))
59 (export "as-storeN-address" (func 48))
60 (export "as-storeN-value" (func 49))
61 (export "as-unary-operand" (func 50))
62 (export "as-binary-left" (func 51))
63 (export "as-binary-right" (func 52))
64 (export "as-test-operand" (func 53))
65 (export "as-compare-left" (func 54))
66 (export "as-compare-right" (func 55))
67 (export "as-memory.grow-size" (func 56))
68 (export "nested-block-value" (func 57))
69 (export "nested-br-value" (func 58))
70 (export "nested-br_if-value" (func 59))
71 (export "nested-br_if-value-cond" (func 60))
72 (export "nested-br_table-value" (func 61))
73 (export "nested-br_table-value-index" (func 62))
74 (elem (;0;) (table 0) (i32.const 0) func $func)
75 (func $dummy (;0;) (type 1))
76 (func (;1;) (type 1)
77 block ;; label = @1
78 i32.const 0
79 i32.const 1
80 br_if 0 (;@1;)
81 i32.ctz
82 drop
83 end
84 )
85 (func (;2;) (type 1)
86 block ;; label = @1
87 i64.const 0
88 i32.const 1
89 br_if 0 (;@1;)
90 i64.ctz
91 drop
92 end
93 )
94 (func (;3;) (type 1)
95 block ;; label = @1
96 f32.const 0x0p+0 (;=0;)
97 i32.const 1
98 br_if 0 (;@1;)
99 f32.neg
100 drop
101 end
102 )
103 (func (;4;) (type 1)
104 block ;; label = @1
105 f64.const 0x0p+0 (;=0;)
106 i32.const 1
107 br_if 0 (;@1;)
108 f64.neg
109 drop
110 end
111 )
112 (func (;5;) (type 2) (result i32)
113 block (result i32) ;; label = @1
114 i32.const 1
115 i32.const 1
116 br_if 0 (;@1;)
117 i32.ctz
118 end
119 )
120 (func (;6;) (type 3) (result i64)
121 block (result i64) ;; label = @1
122 i64.const 2
123 i32.const 1
124 br_if 0 (;@1;)
125 i64.ctz
126 end
127 )
128 (func (;7;) (type 4) (result f32)
129 block (result f32) ;; label = @1
130 f32.const 0x1.8p+1 (;=3;)
131 i32.const 1
132 br_if 0 (;@1;)
133 f32.neg
134 end
135 )
136 (func (;8;) (type 5) (result f64)
137 block (result f64) ;; label = @1
138 f64.const 0x1p+2 (;=4;)
139 i32.const 1
140 br_if 0 (;@1;)
141 f64.neg
142 end
143 )
144 (func (;9;) (type 6) (param i32) (result i32)
145 block ;; label = @1
146 local.get 0
147 br_if 0 (;@1;)
148 i32.const 2
149 return
150 end
151 i32.const 3
152 )
153 (func (;10;) (type 6) (param i32) (result i32)
154 block ;; label = @1
155 call $dummy
156 local.get 0
157 br_if 0 (;@1;)
158 i32.const 2
159 return
160 end
161 i32.const 3
162 )
163 (func (;11;) (type 7) (param i32)
164 block ;; label = @1
165 call $dummy
166 call $dummy
167 local.get 0
168 br_if 0 (;@1;)
169 end
170 )
171 (func (;12;) (type 6) (param i32) (result i32)
172 block (result i32) ;; label = @1
173 i32.const 10
174 local.get 0
175 br_if 0 (;@1;)
176 drop
177 i32.const 11
178 return
179 end
180 )
181 (func (;13;) (type 6) (param i32) (result i32)
182 block (result i32) ;; label = @1
183 call $dummy
184 i32.const 20
185 local.get 0
186 br_if 0 (;@1;)
187 drop
188 i32.const 21
189 return
190 end
191 )
192 (func (;14;) (type 6) (param i32) (result i32)
193 block (result i32) ;; label = @1
194 call $dummy
195 call $dummy
196 i32.const 11
197 local.get 0
198 br_if 0 (;@1;)
199 end
200 )
201 (func (;15;) (type 6) (param i32) (result i32)
202 block ;; label = @1
203 loop ;; label = @2
204 local.get 0
205 br_if 1 (;@1;)
206 i32.const 2
207 return
208 end
209 end
210 i32.const 3
211 )
212 (func (;16;) (type 6) (param i32) (result i32)
213 block ;; label = @1
214 loop ;; label = @2
215 call $dummy
216 local.get 0
217 br_if 1 (;@1;)
218 i32.const 2
219 return
220 end
221 end
222 i32.const 4
223 )
224 (func (;17;) (type 7) (param i32)
225 loop ;; label = @1
226 call $dummy
227 local.get 0
228 br_if 1
229 end
230 )
231 (func (;18;) (type 2) (result i32)
232 block (result i32) ;; label = @1
233 i32.const 1
234 i32.const 2
235 br_if 0 (;@1;)
236 br 0 (;@1;)
237 end
238 )
239 (func (;19;) (type 1)
240 block ;; label = @1
241 i32.const 1
242 i32.const 1
243 br_if 0 (;@1;)
244 br_if 0 (;@1;)
245 end
246 )
247 (func (;20;) (type 2) (result i32)
248 block (result i32) ;; label = @1
249 i32.const 1
250 i32.const 2
251 br_if 0 (;@1;)
252 i32.const 3
253 br_if 0 (;@1;)
254 drop
255 i32.const 4
256 end
257 )
258 (func (;21;) (type 6) (param i32) (result i32)
259 block (result i32) ;; label = @1
260 i32.const 2
261 i32.const 1
262 local.get 0
263 br_if 0 (;@1;)
264 br_if 0 (;@1;)
265 drop
266 i32.const 4
267 end
268 )
269 (func (;22;) (type 1)
270 block ;; label = @1
271 i32.const 1
272 i32.const 2
273 br_if 0 (;@1;)
274 br_table 0 (;@1;) 0 (;@1;) 0 (;@1;)
275 end
276 )
277 (func (;23;) (type 2) (result i32)
278 block (result i32) ;; label = @1
279 i32.const 1
280 i32.const 2
281 br_if 0 (;@1;)
282 i32.const 3
283 br_table 0 (;@1;) 0 (;@1;) 0 (;@1;)
284 i32.const 4
285 end
286 )
287 (func (;24;) (type 2) (result i32)
288 block (result i32) ;; label = @1
289 i32.const 2
290 i32.const 1
291 i32.const 3
292 br_if 0 (;@1;)
293 br_table 0 (;@1;) 0 (;@1;)
294 i32.const 4
295 end
296 )
297 (func (;25;) (type 3) (result i64)
298 block (result i64) ;; label = @1
299 i64.const 1
300 i32.const 2
301 br_if 0 (;@1;)
302 return
303 end
304 )
305 (func (;26;) (type 6) (param i32) (result i32)
306 block (result i32) ;; label = @1
307 i32.const 1
308 local.get 0
309 br_if 0 (;@1;)
310 if (result i32) ;; label = @2
311 i32.const 2
312 else
313 i32.const 3
314 end
315 end
316 )
317 (func (;27;) (type 8) (param i32 i32)
318 block ;; label = @1
319 local.get 0
320 if ;; label = @2
321 local.get 1
322 br_if 1 (;@1;)
323 else
324 call $dummy
325 end
326 end
327 )
328 (func (;28;) (type 8) (param i32 i32)
329 block ;; label = @1
330 local.get 0
331 if ;; label = @2
332 call $dummy
333 else
334 local.get 1
335 br_if 1 (;@1;)
336 end
337 end
338 )
339 (func (;29;) (type 6) (param i32) (result i32)
340 block (result i32) ;; label = @1
341 i32.const 3
342 i32.const 10
343 br_if 0 (;@1;)
344 i32.const 2
345 local.get 0
346 select
347 end
348 )
349 (func (;30;) (type 6) (param i32) (result i32)
350 block (result i32) ;; label = @1
351 i32.const 1
352 i32.const 3
353 i32.const 10
354 br_if 0 (;@1;)
355 local.get 0
356 select
357 end
358 )
359 (func (;31;) (type 2) (result i32)
360 block (result i32) ;; label = @1
361 i32.const 1
362 i32.const 2
363 i32.const 3
364 i32.const 10
365 br_if 0 (;@1;)
366 select
367 end
368 )
369 (func $f (;32;) (type $check) (param i32 i32 i32) (result i32)
370 i32.const -1
371 )
372 (func (;33;) (type 2) (result i32)
373 block (result i32) ;; label = @1
374 i32.const 12
375 i32.const 1
376 br_if 0 (;@1;)
377 i32.const 2
378 i32.const 3
379 call $f
380 end
381 )
382 (func (;34;) (type 2) (result i32)
383 block (result i32) ;; label = @1
384 i32.const 1
385 i32.const 13
386 i32.const 1
387 br_if 0 (;@1;)
388 i32.const 3
389 call $f
390 end
391 )
392 (func (;35;) (type 2) (result i32)
393 block (result i32) ;; label = @1
394 i32.const 1
395 i32.const 2
396 i32.const 14
397 i32.const 1
398 br_if 0 (;@1;)
399 call $f
400 end
401 )
402 (func $func (;36;) (type $check) (param i32 i32 i32) (result i32)
403 local.get 0
404 )
405 (func (;37;) (type 2) (result i32)
406 block (result i32) ;; label = @1
407 i32.const 4
408 i32.const 10
409 br_if 0 (;@1;)
410 i32.const 1
411 i32.const 2
412 i32.const 0
413 call_indirect (type $check)
414 end
415 )
416 (func (;38;) (type 2) (result i32)
417 block (result i32) ;; label = @1
418 i32.const 1
419 i32.const 4
420 i32.const 10
421 br_if 0 (;@1;)
422 i32.const 2
423 i32.const 0
424 call_indirect (type $check)
425 end
426 )
427 (func (;39;) (type 2) (result i32)
428 block (result i32) ;; label = @1
429 i32.const 1
430 i32.const 2
431 i32.const 4
432 i32.const 10
433 br_if 0 (;@1;)
434 i32.const 0
435 call_indirect (type $check)
436 end
437 )
438 (func (;40;) (type 2) (result i32)
439 block (result i32) ;; label = @1
440 i32.const 1
441 i32.const 2
442 i32.const 3
443 i32.const 4
444 i32.const 10
445 br_if 0 (;@1;)
446 call_indirect (type $check)
447 end
448 )
449 (func (;41;) (type 6) (param i32) (result i32)
450 (local i32)
451 block (result i32) ;; label = @1
452 i32.const 17
453 local.get 0
454 br_if 0 (;@1;)
455 local.set 0
456 i32.const -1
457 end
458 )
459 (func (;42;) (type 6) (param i32) (result i32)
460 block (result i32) ;; label = @1
461 i32.const 1
462 local.get 0
463 br_if 0 (;@1;)
464 local.tee 0
465 i32.const -1
466 return
467 end
468 )
469 (func (;43;) (type 6) (param i32) (result i32)
470 block (result i32) ;; label = @1
471 i32.const 1
472 local.get 0
473 br_if 0 (;@1;)
474 global.set $a
475 i32.const -1
476 return
477 end
478 )
479 (func (;44;) (type 2) (result i32)
480 block (result i32) ;; label = @1
481 i32.const 1
482 i32.const 1
483 br_if 0 (;@1;)
484 i32.load
485 end
486 )
487 (func (;45;) (type 2) (result i32)
488 block (result i32) ;; label = @1
489 i32.const 30
490 i32.const 1
491 br_if 0 (;@1;)
492 i32.load8_s
493 end
494 )
495 (func (;46;) (type 2) (result i32)
496 block (result i32) ;; label = @1
497 i32.const 30
498 i32.const 1
499 br_if 0 (;@1;)
500 i32.const 7
501 i32.store
502 i32.const -1
503 end
504 )
505 (func (;47;) (type 2) (result i32)
506 block (result i32) ;; label = @1
507 i32.const 2
508 i32.const 31
509 i32.const 1
510 br_if 0 (;@1;)
511 i32.store
512 i32.const -1
513 end
514 )
515 (func (;48;) (type 2) (result i32)
516 block (result i32) ;; label = @1
517 i32.const 32
518 i32.const 1
519 br_if 0 (;@1;)
520 i32.const 7
521 i32.store8
522 i32.const -1
523 end
524 )
525 (func (;49;) (type 2) (result i32)
526 block (result i32) ;; label = @1
527 i32.const 2
528 i32.const 33
529 i32.const 1
530 br_if 0 (;@1;)
531 i32.store16
532 i32.const -1
533 end
534 )
535 (func (;50;) (type 5) (result f64)
536 block (result f64) ;; label = @1
537 f64.const 0x1p+0 (;=1;)
538 i32.const 1
539 br_if 0 (;@1;)
540 f64.neg
541 end
542 )
543 (func (;51;) (type 2) (result i32)
544 block (result i32) ;; label = @1
545 i32.const 1
546 i32.const 1
547 br_if 0 (;@1;)
548 i32.const 10
549 i32.add
550 end
551 )
552 (func (;52;) (type 2) (result i32)
553 block (result i32) ;; label = @1
554 i32.const 10
555 i32.const 1
556 i32.const 1
557 br_if 0 (;@1;)
558 i32.sub
559 end
560 )
561 (func (;53;) (type 2) (result i32)
562 block (result i32) ;; label = @1
563 i32.const 0
564 i32.const 1
565 br_if 0 (;@1;)
566 i32.eqz
567 end
568 )
569 (func (;54;) (type 2) (result i32)
570 block (result i32) ;; label = @1
571 i32.const 1
572 i32.const 1
573 br_if 0 (;@1;)
574 i32.const 10
575 i32.le_u
576 end
577 )
578 (func (;55;) (type 2) (result i32)
579 block (result i32) ;; label = @1
580 i32.const 10
581 i32.const 1
582 i32.const 42
583 br_if 0 (;@1;)
584 i32.ne
585 end
586 )
587 (func (;56;) (type 2) (result i32)
588 block (result i32) ;; label = @1
589 i32.const 1
590 i32.const 1
591 br_if 0 (;@1;)
592 memory.grow
593 end
594 )
595 (func (;57;) (type 6) (param i32) (result i32)
596 i32.const 1
597 block (result i32) ;; label = @1
598 i32.const 2
599 drop
600 i32.const 4
601 block (result i32) ;; label = @2
602 i32.const 8
603 local.get 0
604 br_if 1 (;@1;)
605 drop
606 i32.const 16
607 end
608 i32.add
609 end
610 i32.add
611 )
612 (func (;58;) (type 6) (param i32) (result i32)
613 i32.const 1
614 block (result i32) ;; label = @1
615 i32.const 2
616 drop
617 block (result i32) ;; label = @2
618 i32.const 8
619 local.get 0
620 br_if 1 (;@1;)
621 drop
622 i32.const 4
623 end
624 br 0 (;@1;)
625 i32.const 16
626 end
627 i32.add
628 )
629 (func (;59;) (type 6) (param i32) (result i32)
630 i32.const 1
631 block (result i32) ;; label = @1
632 i32.const 2
633 drop
634 block (result i32) ;; label = @2
635 i32.const 8
636 local.get 0
637 br_if 1 (;@1;)
638 drop
639 i32.const 4
640 end
641 i32.const 1
642 br_if 0 (;@1;)
643 drop
644 i32.const 16
645 end
646 i32.add
647 )
648 (func (;60;) (type 6) (param i32) (result i32)
649 i32.const 1
650 block (result i32) ;; label = @1
651 i32.const 2
652 drop
653 i32.const 4
654 block (result i32) ;; label = @2
655 i32.const 8
656 local.get 0
657 br_if 1 (;@1;)
658 drop
659 i32.const 1
660 end
661 br_if 0 (;@1;)
662 drop
663 i32.const 16
664 end
665 i32.add
666 )
667 (func (;61;) (type 6) (param i32) (result i32)
668 i32.const 1
669 block (result i32) ;; label = @1
670 i32.const 2
671 drop
672 block (result i32) ;; label = @2
673 i32.const 8
674 local.get 0
675 br_if 1 (;@1;)
676 drop
677 i32.const 4
678 end
679 i32.const 1
680 br_table 0 (;@1;)
681 i32.const 16
682 end
683 i32.add
684 )
685 (func (;62;) (type 6) (param i32) (result i32)
686 i32.const 1
687 block (result i32) ;; label = @1
688 i32.const 2
689 drop
690 i32.const 4
691 block (result i32) ;; label = @2
692 i32.const 8
693 local.get 0
694 br_if 1 (;@1;)
695 drop
696 i32.const 1
697 end
698 br_table 0 (;@1;)
699 i32.const 16
700 end
701 i32.add
702 )
703 )