3 (type $0 (func (param i32)))
5 (type $2 (func (result i32)))
6 (func $b0-yes (type $0) (param $i1 i32)
11 (func $b1 (type $0) (param $i1 i32)
21 (func $b2 (type $0) (param $i1 i32)
28 (func $b3-yes (type $0) (param $i1 i32)
35 (func $b4 (type $0) (param $i1 i32)
47 (func $b5 (type $0) (param $i1 i32)
59 (func $b6 (type $0) (param $i1 i32)
66 (func $b7 (type $0) (param $i1 i32)
78 (func $b8 (type $0) (param $i1 i32)
87 (func $b9 (type $0) (param $i1 i32)
96 (func $b10 (type $0) (param $i1 i32)
110 (func $b11 (type $0) (param $i1 i32)
124 (func $b12-yes (type $1)
153 (func $b13 (type $2) (result i32)
154 (block $topmost (result i32)
180 (func $b14 (type $2) (result i32)
181 (block $topmost (result i32)
184 (block $block1 (result i32)
187 (block $block3 (result i32)
201 (func $b15b (type $1)
291 (func $ret-1 (type $1)
294 (func $ret-2 (type $1)
301 (func $ret-3 (type $1)
312 (func $ret-value (type $2) (result i32)
321 (func $no-select-but-the-last (type $1)
358 (block $block6 (result i32)
375 (block $a (result i32)
399 (func $side-effects-and-order (type $2) (result i32)
443 (block $do-once$0 (result i32)
460 (if (i32.const 0) (br $out))
461 (br $in) ;; we can conditionalize this, and then the br out can vanish
469 (if (i32.const 0) (br $out))
475 (if (i32.const 0) (br $out))
485 (if (i32.const 0) (br $out))
486 (br_if $in (i32.const 1))
491 (if (i32.const 0) (br $in))
497 (if (i32.const 0) (unreachable))
512 (loop $in-todo ;; br_if into if
514 (if (i32.const 0) (br $out-todo))
555 (drop (i32.const 100))
565 (drop (i32.const 101))
578 (drop (i32.const 102))
609 (block $out2 (result i32)
610 (br $out2 (i32.const 1))
618 (br_if $out (i32.const 0))
622 (loop $in-todo2 ;; if-ify
624 (br_if $out-todo2 (i32.const 0))
637 (br_if $in (i32.const 0))
641 (loop $in-not ;; do NOT if-ify, the block can't be removed
643 (br_if $out-not (i32.const -1))
644 (br_if $out-not (i32.const 0))
649 (loop $in-todo2 ;; if-ify a slice with 2 things
651 (br_if $out-todo2 (i32.const 0))
658 (func $br_if_in_block (result i32)
659 (block $outval (result i32)
661 (if (i32.const 1) (br $in) (br $in))
663 (if (i32.const 3) (unreachable) (br $in))
665 (if (i32.const 5) (br $in) (unreachable))
668 (if (result i32) (i32.const 6) (br $outval (i32.const 7)) (i32.const 8))
673 (block $value-out (result i32)
674 (block $value-in (result i32)
680 (br_if $in (i32.const 2))
681 (br $value-in (i32.const 3))
705 (func $if-to-br_if-conflict (param $x i32) (param $y i32) (result i32)
708 (block $out (result i32)
713 (set_local $x (i32.const 0))
717 (br_if $leave (i32.const 1))
723 (i32.add (get_local $x) (get_local $y))
725 (func $if-to-br_if-conflict2 (param $x i32) (param $y i32) (result i32)
728 (block $out (result i32)
731 (br_if $leave (i32.const 1))
734 (set_local $x (i32.const 0))
743 (i32.add (get_local $x) (get_local $y))
745 (func $if-to-br_if-value-sideeffect (param $x i32) (param $y i32) (result i32)
748 (block $out (result i32)
753 (drop (call $if-to-br_if-value-sideeffect (i32.const 0) (i32.const 1)))
763 (i32.add (get_local $x) (get_local $y))
765 (func $fuzz (param $j i32) (param $g i32)
766 (block $label$break$c
767 (loop $label$continue$d
768 (block $label$break$d
772 (i32.const 2147483640)
780 (br $x) ;; don't be confused by this
782 (nop) ;; get me to the store!
791 (i32.const -254899267)
793 (br $label$continue$d)
834 (func $loop-if (result i32)
835 (block $outer (result i32)
836 (loop $typed (result i32)
837 ;; we can move the br after us into our if-else, which means we are the final
838 ;; element in the block,
842 (drop (call $loop-if))
843 (br $outer (i32.const 0))
850 (func $block-break (param $0 i32)
851 (block $block$7$break
852 (block $shape$6$continue
853 (call $block-break (i32.const 1))
858 (func $loop-break (param $0 i32)
859 (block $block$7$break
860 (loop $shape$6$continue
861 (call $loop-break (i32.const 1))
862 (br_if $shape$6$continue
869 (func $untaken-brs-might-prevent-block-removal (param $0 f32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) (param $5 f64) (param $6 f32) (result i32)
870 (block $label$0 (result i32)
871 (block $label$1 ;; this block has no taken brs, but we can't remove it without removing them first
873 (i32.const 607395945)
876 (i32.load16_s offset=3 align=1
878 (call $untaken-brs-might-prevent-block-removal
879 (f32.const 1.4904844647389837e-07)
881 (i32.store16 offset=4 align=1
884 (i32.const 1628075109)
887 (i32.const 1764950569)
889 (f32.const 1.1910939690100655e-32)
890 (i32.const 1628057906)
891 (i32.const 859068982)
892 (f64.const 2.524518840347722e-258)
893 (f32.const -nan:0x40a63)
895 (i32.const 688529440)
896 (i32.const 1751478890)
901 (i32.const 1935947830)
904 (func $unexitable-loops-result (param $0 i32) (result i64)
909 (i32.const 201460482)
922 (func $untaken-br-with-concrete-last-element
934 (func $untaken-br-with-concrete-last-element2 (result i32)
935 (block $label$8 (result i32)
936 (block $label$11 (result i32)
937 (block $label$14 (result i32)
948 (func $untaken-br_if-then-if
959 (func $unreachable-if-that-could-be-a-br_if (result i64)
960 (loop $label$3 (result i64)
971 (func $nop-br-might-update-type
978 (br $label$39) ;; if we nop this, then the parent type must change
986 (func $no-flow-through-if-without-else (result f32)
1004 (f32.const -9223372036854775808)
1009 (func $unreachable-return-loop-value (result i64)
1020 (br $loop) ;; we 100% go back to the loop top, the loop is never exited. but opts move code around so that is not obvious anymore, and the loop becomes a nop, but the func has a return value
1023 (func $obviously-flows-out-maybe (param $var$0 i32) (result f32)
1024 (block $label$1 (result f32)
1031 (block $label$8 ;; this block is none - it has a break, even if not taken - and so looks like it might flow out,
1032 (br_if $label$8 ;; and so we can't move it outside to be the end of the loop's block