blob: 392913702344b06533683a0141d1a61a01728664 [file] [edit]
(module
(type $none_=>_none (func))
(type $i32_=>_none (func (param i32)))
(type $none_=>_i32 (func (result i32)))
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $i32_=>_i32 (func (param i32) (result i32)))
(type $none_=>_i64 (func (result i64)))
(type $i32_i32_=>_none (func (param i32 i32)))
(type $i32_f64_i32_f64_f32_f32_=>_i32 (func (param i32 f64 i32 f64 f32 f32) (result i32)))
(type $f32_i32_f32_i32_i32_f64_f32_=>_i32 (func (param f32 i32 f32 i32 i32 f64 f32) (result i32)))
(type $i32_=>_i64 (func (param i32) (result i64)))
(type $none_=>_f32 (func (result f32)))
(type $i32_=>_f32 (func (param i32) (result f32)))
(memory $0 256 256)
(func $b0-yes (; 0 ;) (param $i1 i32)
(block $topmost
)
)
(func $b1 (; 1 ;) (param $i1 i32)
(block $topmost
(block $block
(drop
(i32.const 0)
)
)
)
)
(func $b2 (; 2 ;) (param $i1 i32)
(block $topmost
(block $inner
)
)
)
(func $b3-yes (; 3 ;) (param $i1 i32)
(block $topmost
(block $inner
)
)
)
(func $b4 (; 4 ;) (param $i1 i32)
(block $topmost
(block $inner
(block $block
(drop
(i32.const 0)
)
)
)
)
)
(func $b5 (; 5 ;) (param $i1 i32)
(block $topmost
(block $inner
(block $block
(drop
(i32.const 0)
)
)
)
)
)
(func $b6 (; 6 ;) (param $i1 i32)
(block $topmost
(br_if $topmost
(i32.const 1)
)
)
)
(func $b7 (; 7 ;) (param $i1 i32)
(block $topmost
(block $block
(drop
(i32.const 0)
)
(br_if $topmost
(i32.const 1)
)
)
)
)
(func $b8 (; 8 ;) (param $i1 i32)
(block $topmost
(block $inner
(br_if $topmost
(i32.const 1)
)
)
)
)
(func $b9 (; 9 ;) (param $i1 i32)
(block $topmost
(block $inner
(br_if $topmost
(i32.const 1)
)
)
)
)
(func $b10 (; 10 ;) (param $i1 i32)
(block $topmost
(block $inner
(block $block
(drop
(i32.const 0)
)
(br_if $topmost
(i32.const 1)
)
)
)
)
)
(func $b11 (; 11 ;) (param $i1 i32)
(block $topmost
(block $inner
(block $block
(drop
(i32.const 0)
)
(br_if $topmost
(i32.const 1)
)
)
)
)
)
(func $b12-yes (; 12 ;)
(if
(i32.const 1)
(block $topmost
(block $block1
(drop
(i32.const 12)
)
(block $block
(drop
(i32.const 1)
)
)
)
)
(block $block3
(drop
(i32.const 27)
)
(block $block0
(drop
(i32.const 2)
)
)
)
)
)
(func $b13 (; 13 ;) (result i32)
(block $topmost (result i32)
(if
(i32.const 1)
(block $block1
(drop
(i32.const 12)
)
(drop
(br_if $topmost
(i32.const 1)
(i32.const 1)
)
)
)
(block $block3
(drop
(i32.const 27)
)
(br $topmost
(i32.const 2)
)
)
)
(i32.const 3)
)
)
(func $b14 (; 14 ;) (result i32)
(select
(block $topmost (result i32)
(block $block1 (result i32)
(i32.const 12)
)
)
(block $block3 (result i32)
(i32.const 27)
)
(i32.const 1)
)
)
(func $b15 (; 15 ;)
(block $topmost
(br_if $topmost
(i32.const 17)
)
)
)
(func $b15b (; 16 ;)
(if
(i32.const 18)
(block $topmost
(block $block
(drop
(i32.const 0)
)
)
)
)
)
(func $b16 (; 17 ;)
(block $a
(block $b
(block $c
)
)
)
(block $a1
(block $b2
(block $c3
)
)
)
(block $a4
(block $b5
(block $c6
)
)
)
)
(func $b17 (; 18 ;)
(if
(i32.const 0)
(block $a
(block $block1
)
)
(block $block3
)
)
(if
(i32.const 0)
(block $a7
(drop
(i32.const 1)
)
)
(block $block6
)
)
(if
(i32.const 0)
(block $a9
(block $block8
)
)
(drop
(i32.const 1)
)
)
(if
(i32.const 0)
(block $c
(block $b
(block $block11
)
)
)
(block $block13
)
)
)
(func $ret-1 (; 19 ;)
(nop)
)
(func $ret-2 (; 20 ;)
(block $block0
(block $block1
)
)
)
(func $ret-3 (; 21 ;)
(if
(i32.const 0)
(block $block0
)
(block $block3
)
)
)
(func $ret-value (; 22 ;) (result i32)
(block $block0 (result i32)
(block $block1 (result i32)
(i32.const 1)
)
)
)
(func $no-select-but-the-last (; 23 ;)
(block $a
(if
(i32.const 0)
(drop
(i32.const 1)
)
(block $block2
(block $block
(drop
(i32.const 2)
)
(br $a)
)
(drop
(i32.const 3)
)
)
)
(if
(i32.const 0)
(block $block4
(block $block13
(drop
(i32.const 2)
)
(br $a)
)
(drop
(i32.const 3)
)
)
(drop
(i32.const 1)
)
)
(if
(block $block6 (result i32)
(block $block15
(drop
(i32.const 2)
)
(br $a)
)
(i32.const 3)
)
(drop
(i32.const 0)
)
(drop
(i32.const 1)
)
)
(if
(block $a17 (result i32)
(i32.const 0)
)
(block $a18
(block $block19
(drop
(i32.const 1)
)
)
)
(block $a20
(block $block21
(drop
(i32.const 2)
)
)
)
)
)
)
(func $side-effects-and-order (; 24 ;) (result i32)
(local $x i32)
(block $do-once$0
(if
(call $b13)
(block $block
(drop
(i32.const 0)
)
(br $do-once$0)
)
)
(drop
(i32.const 1)
)
)
(block $do-once$022
(if
(call $b13)
(block $block24
(drop
(call $b14)
)
(br $do-once$022)
)
)
(drop
(i32.const 1)
)
)
(block $do-once$025
(if
(i32.const 0)
(block $block27
(drop
(call $b14)
)
(br $do-once$025)
)
)
(drop
(i32.const 1)
)
)
(block $do-once$028 (result i32)
(if
(local.tee $x
(i32.const 1)
)
(br $do-once$028
(local.tee $x
(i32.const 2)
)
)
)
(i32.const 1)
)
)
(func $loops (; 25 ;)
(loop $in
(block $out
(br_if $in
(i32.eqz
(i32.const 0)
)
)
)
)
(loop $in30
(br $in30)
)
(loop $loop-in
(block $out31
(br_if $out31
(i32.const 0)
)
)
)
(loop $in33
(block $out34
(br_if $out34
(i32.const 0)
)
)
)
(loop $in36
(nop)
)
(loop $in37
(block $out38
)
)
(loop $in39
(if
(i32.eqz
(i32.const 0)
)
(block $out40
(nop)
(br_if $in39
(i32.const 1)
)
)
)
)
(loop $in42
(block $out43
(br_if $in42
(i32.const 0)
)
)
)
(loop $in45
(if
(i32.const 0)
(block $out46
(unreachable)
)
(br $in45)
)
)
(loop $in48
(if
(i32.const 0)
(block $out49
(block $block
(call $loops)
)
)
(br $in48)
)
)
(loop $in-todo
(if
(i32.const 0)
(block $out-todo
)
(block
(call $loops)
(br $in-todo)
)
)
)
(loop $in52
(if
(i32.const 0)
(block $out53
)
(block
(call $loops)
(br $in52)
)
)
)
(loop $in55
(if
(i32.const 0)
(block
(call $loops)
(br $in55)
)
(block $out56
)
)
)
(loop $in58
(if
(i32.const 0)
(block
(block $block61
(drop
(i32.const 1)
)
(call $loops)
)
(br $in58)
)
(block $out59
)
)
)
(loop $in62
(if
(i32.const 0)
(block $out63
)
(block
(call $loops)
(drop
(i32.const 100)
)
(br $in62)
)
)
)
(loop $in65
(if
(i32.const 0)
(block
(call $loops)
(drop
(i32.const 101)
)
(br $in65)
)
(block $out66
)
)
)
(loop $in68
(if
(i32.const 0)
(block
(block $block71
(drop
(i32.const 1)
)
(call $loops)
)
(drop
(i32.const 102)
)
(br $in68)
)
(block $out69
)
)
)
(loop $in72
(if
(i32.eqz
(i32.const 0)
)
(block $out73
(nop)
(call $loops)
(return)
(br $in72)
)
)
)
(loop $in75
(block $out76
(br_if $out76
(i32.const 0)
)
(call $loops)
(br $out76)
(br $in75)
)
)
(loop $in78
(if
(i32.const 0)
(block $out79
)
(block
(call $loops)
(drop
(block $out2 (result i32)
(i32.const 1)
)
)
(br $in78)
)
)
)
(loop $in81
(block $out82
(br_if $in81
(i32.eqz
(i32.const 0)
)
)
)
)
(loop $in-todo2
(if
(i32.const 0)
(block $out-todo2
)
(block
(call $loops)
(br $in-todo2)
)
)
)
(loop $in83
(block $out84
(br $out84)
(br $in83)
)
)
(loop $in85
(block $out86
(drop
(i32.const 0)
)
(br $in85)
)
)
(loop $in-not
(block $out-not
(br_if $out-not
(i32.const -1)
)
(br_if $out-not
(i32.const 0)
)
(call $loops)
(br $in-not)
)
)
(loop $in-todo287
(if
(i32.const 0)
(block $out-todo288
)
(block
(call $loops)
(drop
(i32.const 1)
)
(br $in-todo287)
)
)
)
)
(func $br_if_in_block (; 26 ;) (result i32)
(block $outval (result i32)
(block $in
(drop
(i32.const 1)
)
(br $in)
(drop
(i32.const 2)
)
(br_if $in
(i32.eqz
(i32.const 3)
)
)
(unreachable)
(drop
(i32.const 4)
)
(br_if $in
(i32.const 5)
)
(unreachable)
(drop
(i32.const 6)
)
)
(select
(i32.const 7)
(i32.const 8)
(i32.const 6)
)
)
)
(func $threading (; 27 ;)
(drop
(block $value-out (result i32)
(block $value-in (result i32)
(block $out
(block $in
(br_if $out
(i32.const 1)
)
(br_if $out
(i32.const 2)
)
(br $value-in
(i32.const 3)
)
)
)
(i32.const 4)
)
)
)
(block $stack1
(block $stack2
(block $stack3
(block $stack4
(br_if $stack1
(i32.const 1)
)
(unreachable)
)
)
)
)
)
(func $if-to-br_if-conflict (; 28 ;) (param $x i32) (param $y i32) (result i32)
(block $leave
(local.set $y
(block $out (result i32)
(if
(local.get $x)
(br $out
(block $block (result i32)
(local.set $x
(i32.const 0)
)
(i32.const 1)
)
)
(br_if $leave
(i32.const 1)
)
)
(unreachable)
)
)
)
(i32.add
(local.get $x)
(local.get $y)
)
)
(func $if-to-br_if-conflict2 (; 29 ;) (param $x i32) (param $y i32) (result i32)
(block $leave
(local.set $y
(block $out (result i32)
(if
(local.get $x)
(br_if $leave
(i32.const 1)
)
(br $out
(block $block (result i32)
(local.set $x
(i32.const 0)
)
(i32.const 1)
)
)
)
(unreachable)
)
)
)
(i32.add
(local.get $x)
(local.get $y)
)
)
(func $if-to-br_if-value-sideeffect (; 30 ;) (param $x i32) (param $y i32) (result i32)
(block $leave
(local.set $y
(block $out (result i32)
(if
(local.get $x)
(br $out
(block $block (result i32)
(drop
(call $if-to-br_if-value-sideeffect
(i32.const 0)
(i32.const 1)
)
)
(nop)
(i32.const 1)
)
)
)
(unreachable)
)
)
)
(i32.add
(local.get $x)
(local.get $y)
)
)
(func $fuzz (; 31 ;) (param $j i32) (param $g i32)
(loop $label$continue$d
(block $label$break$c
(block $label$break$d
(if
(i32.lt_s
(local.get $j)
(i32.const 2147483640)
)
(block $x
(block $y
(block $z
(br_if $x
(local.get $j)
)
)
)
)
(block $switch$26
)
)
(i32.store
(i32.const 5724)
(i32.const -254899267)
)
(br $label$continue$d)
)
)
)
)
(func $iffify (; 32 ;)
(if
(i32.eqz
(i32.const 0)
)
(block $yes
(nop)
(drop
(i32.const 1)
)
(drop
(i32.const 2)
)
)
)
(block $no
(br_if $no
(i32.const 0)
)
(drop
(i32.const 1)
)
(br $no)
(drop
(i32.const 2)
)
)
(block $no2
(br_if $no2
(i32.const 0)
)
)
(block $no3
(br $no3)
(drop
(i32.const 1)
)
(drop
(i32.const 2)
)
)
(block $no5
(block $no4
(br_if $no5
(i32.const 0)
)
(drop
(i32.const 1)
)
(drop
(i32.const 2)
)
)
)
)
(func $loop-if (; 33 ;) (result i32)
(loop $typed (result i32)
(block $outer (result i32)
(block (result i32)
(br_if $typed
(i32.eqz
(i32.const 2)
)
)
(block $block (result i32)
(drop
(call $loop-if)
)
(i32.const 0)
)
)
)
)
)
(func $block-break (; 34 ;) (param $0 i32)
(block $block$7$break
(block $shape$6$continue
(call $block-break
(i32.const 1)
)
)
)
)
(func $loop-break (; 35 ;) (param $0 i32)
(loop $shape$6$continue
(block $block$7$break
(block
(call $loop-break
(i32.const 1)
)
(br_if $shape$6$continue
(local.get $0)
)
(nop)
)
)
)
)
(func $untaken-brs-might-prevent-block-removal (; 36 ;) (param $0 f32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) (param $5 f64) (param $6 f32) (result i32)
(block $label$0 (result i32)
(block $label$1
(br_if $label$1
(i32.const 607395945)
)
(br_if $label$1
(i32.load offset=3 align=1
(select
(call $untaken-brs-might-prevent-block-removal
(f32.const 1.4904844647389837e-07)
(br_if $label$0
(i32.store16 offset=4 align=1
(i32.const 1900641)
(br $label$0
(i32.const 1628075109)
)
)
(i32.const 1764950569)
)
(f32.const 1.1910939690100655e-32)
(i32.const 1628057906)
(i32.const 859068982)
(f64.const 2.524518840347722e-258)
(f32.const -nan:0x40a63)
)
(i32.const 688529440)
(i32.const 1751478890)
)
)
)
)
(i32.const 1935947830)
)
)
(func $unexitable-loops-result (; 37 ;) (param $0 i32) (result i64)
(loop $label$0
(loop $label$1
(br_if $label$0
(i32.load8_s
(i32.const 201460482)
)
)
(block
(block $label$3
(br_if $label$1
(local.get $0)
)
)
(br $label$1)
)
)
)
)
(func $untaken-br-with-concrete-last-element (; 38 ;)
(block $label$8
(block $label$11
(block $label$14
(br_if $label$8
(br $label$8)
)
)
)
)
)
(func $untaken-br-with-concrete-last-element2 (; 39 ;) (result i32)
(block $label$8 (result i32)
(block $label$11 (result i32)
(block $label$14 (result i32)
(br_if $label$14
(i32.const 102)
(br $label$11
(i32.const 103)
)
)
)
)
)
)
(func $untaken-br_if-then-if (; 40 ;)
(block $label$0
(br_if $label$0
(unreachable)
)
(if
(i32.const 0)
(nop)
)
)
)
(func $unreachable-if-that-could-be-a-br_if (; 41 ;) (result i64)
(loop $label$3 (result i64)
(drop
(if (result f64)
(unreachable)
(f64.const 1)
(br $label$3)
)
)
(i64.const 1)
)
)
(func $nop-br-might-update-type (; 42 ;)
(block $label$39
(drop
(if (result i32)
(unreachable)
(if (result i32)
(i32.const 1)
(br $label$39)
(i32.const 0)
)
(i32.const 0)
)
)
)
)
(func $no-flow-through-if-without-else (; 43 ;) (result f32)
(local $0 i32)
(local $2 f32)
(if (result f32)
(local.get $0)
(block $label$0
(block $label$11
(return
(f32.const 239)
)
(if
(i32.const 0)
(return
(local.get $2)
)
)
)
)
(f32.const -9223372036854775808)
)
)
(func $unreachable-return-loop-value (; 44 ;) (result i64)
(loop $loop
(if
(i32.const 1)
(block $block
(br_if $block
(br $loop)
)
(br $loop)
)
)
(br $loop)
)
)
(func $obviously-flows-out-maybe (; 45 ;) (param $var$0 i32) (result f32)
(block $label$1 (result f32)
(br $label$1
(f32.const 1)
)
(loop $label$5
(if
(i32.const 11)
(block $label$8
(br_if $label$8
(unreachable)
)
(br $label$5)
)
)
(br $label$5)
)
)
)
(func $br-to-table (; 46 ;) (param $a i32)
(block $x
(block $y
(block $z
(nop)
(nop)
(block $tablify|0
(br_table $x $y $z $tablify|0
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-too-few (; 47 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(i32.const 0)
)
)
(br_if $x
(i32.eq
(local.get $a)
(i32.const 1)
)
)
)
)
)
)
(func $br-to-table-one-more (; 48 ;) (param $a i32)
(block $x
(block $y
(block $z
(nop)
(nop)
(nop)
(block $tablify|0
(br_table $x $y $z $x $tablify|0
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-overlap (; 49 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(local.get $a)
(i32.const 1)
)
)
(br_if $z
(i32.eq
(local.get $a)
(i32.const 1)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-overlap-start (; 50 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(local.get $a)
(i32.const 0)
)
)
(br_if $z
(i32.eq
(local.get $a)
(i32.const 1)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-offset (; 51 ;) (param $a i32)
(block $x
(block $y
(block $z
(nop)
(nop)
(block $tablify|0
(br_table $x $y $z $tablify|0
(i32.sub
(local.get $a)
(i32.const 15)
)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-RANGE-high (; 52 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(local.get $a)
(i32.const 1)
)
)
(br_if $z
(i32.eq
(local.get $a)
(i32.const 10)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-RANGE-low (; 53 ;) (param $a i32)
(block $x
(block $y
(block $z
(nop)
(nop)
(block $tablify|0
(br_table $x $tablify|0 $tablify|0 $y $tablify|0 $tablify|0 $tablify|0 $tablify|0 $tablify|0 $z $tablify|0
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-bad (; 54 ;) (param $a i32) (result i32)
(block $value (result i32)
(block $x
(block $y
(block $z
(nop)
(br $x)
(nop)
(nop)
(block $tablify|0
(br_table $x $y $z $tablify|0
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(i32.const 2000)
)
)
(func $br-to-table-bad2 (; 55 ;) (param $a i32) (result i32)
(block $value (result i32)
(block $x
(block $y
(block $z
(nop)
(drop
(br_if $value
(i32.const 1000)
(i32.eq
(local.get $a)
(i32.const 0)
)
)
)
(nop)
(nop)
(block $tablify|0
(br_table $x $y $z $tablify|0
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(i32.const 2000)
)
)
(func $br-to-table-bad3 (; 56 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(i32.const 10)
(i32.const 0)
)
)
(nop)
(nop)
(block $tablify|0
(br_table $x $y $z $tablify|0
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-multi (; 57 ;) (param $a i32)
(block $x
(block $y
(block $z
(nop)
(nop)
(block $tablify|0
(br_table $z $y $x $tablify|0
(i32.sub
(i32.const 10)
(i32.const 5)
)
)
)
(nop)
(nop)
(block $tablify|00
(br_table $x $y $z $tablify|00
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-bad4 (; 58 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.ne
(local.get $a)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(local.get $a)
(i32.const 1)
)
)
(br_if $z
(i32.eq
(local.get $a)
(i32.const 2)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-bad5 (; 59 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(local.get $a)
)
)
(br_if $y
(i32.eq
(local.get $a)
(local.get $a)
)
)
(br_if $z
(i32.eq
(local.get $a)
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-bad6 (; 60 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(call $b13)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(call $b13)
(i32.const 1)
)
)
(br_if $z
(i32.eq
(call $b13)
(i32.const 2)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-bad7 (; 61 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(i32.const -1)
)
)
(br_if $y
(i32.eq
(local.get $a)
(i32.const -1)
)
)
(br_if $z
(i32.eq
(local.get $a)
(i32.const -1)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-defaultNameOverlaps (; 62 ;) (param $a i32)
(block $x
(block $tablify|0
(block $z
(nop)
(nop)
(block $tablify|1
(br_table $x $tablify|0 $z $tablify|1
(local.get $a)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-unreach (; 63 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(unreachable)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(unreachable)
(i32.const 1)
)
)
(br_if $z
(i32.eq
(unreachable)
(i32.const 2)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $br-to-table-overlap-but-later (; 64 ;) (param $a i32)
(block $x
(block $y
(block $z
(br_if $x
(i32.eq
(local.get $a)
(i32.const 0)
)
)
(br_if $y
(i32.eq
(local.get $a)
(i32.const 1)
)
)
(nop)
(nop)
(block $tablify|0
(br_table $z $x $y $tablify|0
(i32.sub
(local.get $a)
(i32.const 1)
)
)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(unreachable)
)
(func $tiny-switch (; 65 ;)
(if
(i32.const 0)
(block $y
)
(block $x
)
)
(block $z
(block
(drop
(i32.const 0)
)
(nop)
)
)
)
(func $trim-switch (; 66 ;)
(block $A
(block $y
(br_table $A $y $A $y $A $y
(i32.sub
(i32.const 0)
(i32.const 2)
)
)
)
(call $trim-switch)
)
)
(func $same-target-br_if-and-br (; 67 ;)
(block $x
(drop
(i32.const 0)
)
(br $x)
(unreachable)
)
)
(func $simple-switch (; 68 ;) (result i32)
(block $A
(block $B
(block $y
(br_table $A $y $y $y $y $y $A $y $y $y $y $A $y
(i32.const 0)
)
(return
(i32.const 0)
)
)
(return
(i32.const 1)
)
)
(return
(i32.const 2)
)
)
(i32.const 3)
)
(func $simple-switch-2 (; 69 ;) (result i32)
(block $A
(block $B
(block $y
(br_table $A $y $y $y $y $y $y $y $y $y $y $y $A $y
(i32.const 0)
)
(return
(i32.const 0)
)
)
(return
(i32.const 1)
)
)
(return
(i32.const 2)
)
)
(i32.const 3)
)
(func $simple-switch-3 (; 70 ;) (result i32)
(block $A
(block $B
(block $y
(br_table $A $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $y $B $y
(i32.const 0)
)
(return
(i32.const 0)
)
)
(return
(i32.const 1)
)
)
(return
(i32.const 2)
)
)
(i32.const 3)
)
(func $simple-switch43 (; 71 ;) (result i32)
(local $0 i32)
(block $A
(block $B
(block $y
(br_if $A
(i32.eqz
(local.tee $0
(i32.const 0)
)
)
)
(br_if $B
(i32.eq
(local.get $0)
(i32.const 127)
)
)
(br $y)
(return
(i32.const 0)
)
)
(return
(i32.const 1)
)
)
(return
(i32.const 2)
)
)
(i32.const 3)
)
(func $simple-switch-5 (; 72 ;) (result i32)
(block $A
(block $B
(block $y
(br_table $A $y $y $y $y $y $A $y $y $y $y $y $A $y
(i32.const 0)
)
(return
(i32.const 0)
)
)
(return
(i32.const 1)
)
)
(return
(i32.const 2)
)
)
(i32.const 3)
)
(func $undo-if-return (; 73 ;) (param $p i32) (result i32)
(local $x i32)
(block $out
(block
(br_if $out
(local.get $p)
)
(local.set $x
(i32.const 1)
)
)
(block
(br_if $out
(i32.eqz
(local.get $p)
)
)
(local.set $x
(i32.const 2)
)
)
(local.set $x
(if (result i32)
(local.get $p)
(br $out)
(br $out)
)
)
)
(local.get $p)
)
(func $if-unreachable-but-declares-value (; 74 ;) (param $var$0 i32) (param $var$1 f64) (param $var$2 i32) (param $var$3 f64) (param $var$4 f32) (param $var$5 f32) (result i32)
(local $var$6 f64)
(if
(i32.const 0)
(drop
(loop $label$3 (result i64)
(block $label$4 (result i64)
(block $label$5
(block $label$6
(local.set $var$1
(if (result f64)
(unreachable)
(br $label$5)
(f64.const 1)
)
)
)
)
(i64.const 1)
)
)
)
)
(i32.const 0)
)
(func $if-flow-1 (; 75 ;) (result i32)
(select
(i32.const 1)
(i32.const 2)
(i32.const 0)
)
)
(func $if-flow-2 (; 76 ;) (result i32)
(if (result i32)
(i32.const 0)
(unreachable)
(i32.const 2)
)
)
(func $if-flow-3 (; 77 ;) (result i32)
(if (result i32)
(i32.const 0)
(i32.const 1)
(unreachable)
)
)
(func $if-flow-4 (; 78 ;) (result i32)
(if
(return
(i32.const 0)
)
(return
(i32.const 1)
)
(return
(i32.const 2)
)
)
)
(func $iff-flow-fuzz-bug (; 79 ;) (result i32)
(loop $label$1
(br_if $label$1
(i32.eqz
(i32.const 1)
)
)
(loop $label$2
(unreachable)
(if
(i32.const 0)
(nop)
(return
(i32.const 0)
)
)
)
)
)
(func $fuzz-block-unreachable-brs-with-values (; 80 ;) (result i32)
(local $0 i32)
(loop $label$1
(if
(local.get $0)
(block $label$2
(local.tee $0
(loop $label$5
(br_if $label$5
(block
(unreachable)
(drop
(i32.const 0)
)
)
)
)
)
)
(br $label$1)
)
)
)
(func $drop-restructure-if (; 81 ;) (param $x i32) (param $y i32) (result i32)
(if (result i32)
(local.get $y)
(local.get $x)
(block $label$2 (result i32)
(nop)
(i32.const 0)
)
)
)
(func $drop-restructure-if-final (; 82 ;) (param $x i32) (param $y i32) (result i32)
(if (result i32)
(local.get $y)
(local.get $x)
(block $label$2 (result i32)
(nop)
(unreachable)
)
)
)
(func $drop-restructure-if-middle (; 83 ;) (param $x i32) (param $y i32) (result i32)
(if (result i32)
(local.get $y)
(local.get $x)
(block $label$2 (result i32)
(nop)
(nop)
(i32.const 0)
)
)
)
(func $drop-restructure-if-bad (; 84 ;) (param $x i32) (param $y i32) (result i32)
(block $label$2 (result i32)
(drop
(br_if $label$2
(local.tee $y
(local.get $x)
)
(local.get $y)
)
)
(i32.const 0)
)
)
(func $drop-restructure-if-bad-2 (; 85 ;) (param $x i32) (param $y i32) (result i32)
(block $label$2 (result i32)
(drop
(br_if $label$2
(local.get $y)
(local.tee $y
(local.get $x)
)
)
)
(i32.const 0)
)
)
(func $if-block (; 86 ;)
(if
(i32.const 1)
(block $label
(block $block
(drop
(i32.const 2)
)
(drop
(i32.const 3)
)
)
)
)
)
(func $if-block-bad (; 87 ;)
(block $label
(if
(br $label)
(block $block
(drop
(i32.const 2)
)
(drop
(i32.const 3)
)
)
)
)
)
(func $if-block-br (; 88 ;)
(block $label
(br_if $label
(i32.const 1)
)
)
)
(func $if-block-br-1 (; 89 ;)
(if
(i32.const 1)
(block $label
)
(drop
(i32.const 3)
)
)
)
(func $if-block-br-2 (; 90 ;)
(if
(i32.const 1)
(block $label
(drop
(i32.const 3)
)
)
(nop)
)
)
(func $if-block-br-3 (; 91 ;)
(if
(i32.const 1)
(block $label
)
(nop)
)
)
(func $if-block-br-4-eithre (; 92 ;)
(if
(i32.const 1)
(block $label
(drop
(i32.const 2)
)
)
(drop
(i32.const 3)
)
)
)
(func $if-block-br-5-value (; 93 ;) (result i32)
(select
(block $label (result i32)
(i32.const 2)
)
(i32.const 3)
(i32.const 1)
)
)
(func $restructure-if-outerType-change (; 94 ;)
(loop $label$1
(br_if $label$1
(block $label$2
(if
(block $label$4
(unreachable)
)
(block $label$3
(br $label$3)
)
)
(unreachable)
)
)
)
)
(func $if-arm-unreachable (; 95 ;)
(if
(unreachable)
(block $label$1
(nop)
)
(unreachable)
)
)
(func $propagate-type-if-we-optimize (; 96 ;)
(if
(i32.const 1)
(nop)
(block $block
(drop
(loop $label$3 (result i64)
(br_if $label$3
(if
(i32.const 0)
(block $label$4
(unreachable)
)
(unreachable)
)
)
(i64.const -9)
)
)
(unreachable)
)
)
)
(func $switch-to-br (; 97 ;)
(block $A
(block $y
(block
(drop
(i32.const 0)
)
(br $A)
)
)
)
)
(func $switch-to-br-value (; 98 ;) (result i32)
(block $A (result i32)
(block $y (result i32)
(block
(drop
(i32.const 1)
)
(br $A
(i32.const 0)
)
)
)
)
)
(func $switch-threading-multi (; 99 ;) (param $x i32) (param $y i32) (result i32)
(block $block$5$break
(block $block$4$break
(loop $shape$1$continue
(block $block$3$break
(block $switch$2$case$5
(block $switch$2$case$4
(block $switch$2$default
(block $switch$2$case$2
(br_table $shape$1$continue $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$5$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$3$break $block$4$break $block$3$break
(local.get $x)
)
)
(br $shape$1$continue)
)
(br $block$3$break)
)
(br $block$4$break)
)
(br $block$5$break)
)
)
(unreachable)
)
(local.set $y
(i32.const 1)
)
(unreachable)
)
(local.set $y
(i32.const 2)
)
(unreachable)
)
(func $fuzz-type-changes-in-our-cycles (; 100 ;) (result i32)
(loop $label$1
(if
(i32.const 0)
(if
(i32.const 0)
(block $label$3
(block $block
)
)
(return
(i32.const -8192)
)
)
)
(br $label$1)
)
)
(func $refinalize-need-br-value (; 101 ;) (result i32)
(loop $label$3 (result i32)
(block $label$6 (result i32)
(block $label$10
(unreachable)
(block $label$503
(br_if $label$3
(block $label$530 (result i32)
(br_if $label$503
(i32.const 0)
)
(i32.const 0)
)
)
(return
(i32.const 127)
)
)
)
)
)
)
(func $selectify (; 102 ;) (param $x i32)
(drop
(if (result i32)
(i32.eq
(local.get $x)
(i32.const 1)
)
(i32.mul
(i32.const 2)
(i32.const 3)
)
(i32.mul
(i32.const 2)
(i32.const 3)
)
)
)
(drop
(select
(i32.add
(i32.const 2)
(i32.const 3)
)
(i32.add
(i32.const 2)
(i32.const 3)
)
(i32.eq
(local.get $x)
(i32.const 1)
)
)
)
)
(func $if-one-side (; 103 ;) (result i32)
(local $x i32)
(local.set $x
(select
(i32.const 2)
(local.get $x)
(i32.const 1)
)
)
(local.get $x)
)
(func $if-one-side-b (; 104 ;) (result i32)
(local $x i32)
(local.set $x
(select
(local.get $x)
(i32.const 2)
(i32.const 1)
)
)
(local.get $x)
)
(func $if-one-side-tee-etc (; 105 ;) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $x i32)
(local $y i32)
(local $z i32)
(drop
(call $if-one-side-tee-etc
(local.tee $x
(select
(i32.const -4)
(local.get $x)
(i32.const -3)
)
)
)
)
(i32.const 0)
)
(func $ifs-copies-recursive (; 106 ;) (param $20 i32) (result i32)
(if
(i32.const 1)
(local.set $20
(select
(select
(i32.const 4)
(local.get $20)
(i32.const 3)
)
(local.get $20)
(i32.const 2)
)
)
)
(local.get $20)
)
(func $if-copy1 (; 107 ;)
(local $x i32)
(local $y i32)
(loop $top
(local.set $x
(select
(local.get $x)
(local.get $y)
(i32.const 1)
)
)
(br $top)
)
)
(func $if-copy3 (; 108 ;)
(local $x i32)
(local $y i32)
(loop $top
(if
(i32.const 1)
(local.tee $x
(unreachable)
)
)
(br $top)
)
)
(func $if-copy4 (; 109 ;)
(local $x i32)
(local $y i32)
(loop $top
(local.set $x
(if (result i32)
(i32.const 1)
(unreachable)
(local.get $y)
)
)
(br $top)
)
)
(func $if-copy-tee (; 110 ;)
(local $x i32)
(local $y i32)
(loop $top
(drop
(local.tee $x
(select
(local.get $x)
(i32.const 2)
(i32.const 1)
)
)
)
(br $top)
)
)
(func $loop-end-set (; 111 ;) (param $x i32) (result i32)
(loop $loop
(nop)
(br_if $loop
(local.get $x)
)
(local.set $x
(i32.const 1)
)
)
(local.get $x)
)
(func $loop-end-value (; 112 ;) (param $x i32) (result i32)
(loop $loop (result i32)
(nop)
(br_if $loop
(local.get $x)
)
(i32.const 1)
)
)
(func $do-not-flow-values-through-unreachable-code (; 113 ;) (result i32)
(block $block
(unreachable)
(if
(i32.const 0)
(block $A
(return
(i32.const 0)
)
)
(nop)
)
)
)
(func $do-not-flow-values-through-unreachable-code-b (; 114 ;) (result i32)
(loop $loop-in
(unreachable)
(if
(i32.const 0)
(block $A
(return
(i32.const 0)
)
)
(nop)
)
)
)
(func $if_br_if (; 115 ;)
(local $0 i32)
(block $label$1
(br_if $label$1
(select
(local.tee $0
(i32.const 1024)
)
(i32.const 0)
(i32.eqz
(i32.const -4)
)
)
)
(br_if $label$1
(select
(i32.const 1025)
(i32.const 0)
(i32.eqz
(i32.const -5)
)
)
)
(br_if $label$1
(select
(local.tee $0
(i32.const 1025)
)
(i32.const 0)
(i32.eqz
(i32.const -6)
)
)
)
(if
(i32.const 1026)
(br_if $label$1
(local.tee $0
(i32.const -7)
)
)
)
(i32.store
(i32.const 1024)
(i32.add
(local.get $0)
(i32.const 1)
)
)
)
)
)