summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names_merge-blocks_all-features.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/remove-unused-names_merge-blocks_all-features.txt')
-rw-r--r--test/passes/remove-unused-names_merge-blocks_all-features.txt1746
1 files changed, 1746 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names_merge-blocks_all-features.txt b/test/passes/remove-unused-names_merge-blocks_all-features.txt
new file mode 100644
index 000000000..90a56d32d
--- /dev/null
+++ b/test/passes/remove-unused-names_merge-blocks_all-features.txt
@@ -0,0 +1,1746 @@
+(module
+ (type $none_=>_none (func))
+ (type $i32_=>_none (func (param i32)))
+ (type $none_=>_i32 (func (result i32)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $i32_i32_i32_=>_none (func (param i32 i32 i32)))
+ (type $none_=>_f64 (func (result f64)))
+ (memory $0 (shared 256 256))
+ (table $0 1 1 funcref)
+ (elem (i32.const 0) $call-i)
+ (func $call-i (param $0 i32)
+ (nop)
+ )
+ (func $call-ii (param $0 i32) (param $1 i32)
+ (nop)
+ )
+ (func $call-iii (param $0 i32) (param $1 i32) (param $2 i32)
+ (nop)
+ )
+ (func $b0-yes (param $i1 i32)
+ (drop
+ (i32.const 10)
+ )
+ )
+ (func $b0-no (param $i1 i32)
+ (block $topmost
+ (block $block0
+ (br $block0)
+ )
+ (br $topmost)
+ )
+ )
+ (func $b0-br-but-ok (param $i1 i32)
+ (block $topmost
+ (br $topmost)
+ )
+ )
+ (func $b1-yes (param $i1 i32)
+ (drop
+ (i32.const 10)
+ )
+ )
+ (func $b2-yes (param $i1 i32)
+ (drop
+ (i32.const 5)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 15)
+ )
+ )
+ (func $b3-yes (param $i1 i32)
+ (drop
+ (i32.const 3)
+ )
+ (drop
+ (i32.const 6)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 15)
+ )
+ (drop
+ (i32.const 20)
+ )
+ )
+ (func $b4 (param $i1 i32)
+ (block $inner
+ (drop
+ (i32.const 10)
+ )
+ (br $inner)
+ )
+ )
+ (func $b5 (param $i1 i32)
+ (block $middle
+ (drop
+ (i32.const 10)
+ )
+ (block $inner
+ (br $inner)
+ )
+ (br $middle)
+ )
+ )
+ (func $b6 (param $i1 i32)
+ (drop
+ (i32.const 5)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (block $inner
+ (br $inner)
+ )
+ (drop
+ (i32.const 15)
+ )
+ )
+ (func $b7 (param $i1 i32)
+ (drop
+ (i32.const 3)
+ )
+ (drop
+ (i32.const 6)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (block $inner
+ (br $inner)
+ )
+ (drop
+ (i32.const 15)
+ )
+ (block $middle
+ (br $middle)
+ )
+ (drop
+ (i32.const 20)
+ )
+ )
+ (func $unary
+ (local $x i32)
+ (drop
+ (i32.eqz
+ (block (result i32)
+ (i32.const 10)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.eqz
+ (i32.const 20)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.eqz
+ (i32.const 30)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (local.set $x
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.load
+ (i32.const 20)
+ )
+ )
+ (return
+ (block
+ (drop
+ (i32.const 10)
+ )
+ (unreachable)
+ )
+ )
+ )
+ (func $binary
+ (drop
+ (i32.add
+ (block (result i32)
+ (i32.const 10)
+ )
+ (i32.const 20)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.add
+ (i32.const 20)
+ (i32.const 30)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.add
+ (i32.const 30)
+ (i32.const 40)
+ )
+ )
+ (drop
+ (i32.add
+ (i32.const 10)
+ (block (result i32)
+ (i32.const 20)
+ )
+ )
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.add
+ (i32.const 10)
+ (i32.const 30)
+ )
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (i32.add
+ (i32.const 10)
+ (i32.const 40)
+ )
+ )
+ (drop
+ (i32.add
+ (block (result i32)
+ (i32.const 10)
+ )
+ (block (result i32)
+ (i32.const 20)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (i32.add
+ (i32.const 20)
+ (i32.const 40)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 40)
+ )
+ (drop
+ (i32.const 50)
+ )
+ (drop
+ (i32.add
+ (i32.const 30)
+ (i32.const 60)
+ )
+ )
+ (drop
+ (i32.const 20)
+ )
+ (i32.store
+ (i32.const 10)
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (i32.store
+ (i32.const 20)
+ (i32.const 30)
+ )
+ (drop
+ (block
+ (drop
+ (i32.const 10)
+ )
+ (i32.add
+ (unreachable)
+ (i32.const 20)
+ )
+ )
+ )
+ (drop
+ (block (result i32)
+ (unreachable)
+ (drop
+ (i32.const 20)
+ )
+ (i32.add
+ (i32.const 10)
+ (i32.const 30)
+ )
+ )
+ )
+ )
+ (func $trinary
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 50)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (i32.const 40)
+ (i32.const 60)
+ )
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 40)
+ )
+ (drop
+ (select
+ (block (result i32)
+ (i32.const 10)
+ )
+ (i32.const 30)
+ (i32.const 50)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 40)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (block (result i32)
+ (i32.const 30)
+ )
+ (i32.const 50)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (i32.const 40)
+ (block (result i32)
+ (i32.const 50)
+ )
+ )
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (select
+ (block (result i32)
+ (i32.const 10)
+ )
+ (block (result i32)
+ (i32.const 20)
+ )
+ (i32.const 40)
+ )
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (select
+ (block (result i32)
+ (i32.const 10)
+ )
+ (i32.const 30)
+ (block (result i32)
+ (i32.const 40)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (block (result i32)
+ (i32.const 30)
+ )
+ (block (result i32)
+ (i32.const 40)
+ )
+ )
+ )
+ (drop
+ (select
+ (block (result i32)
+ (unreachable)
+ (i32.const 20)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 30)
+ )
+ (i32.const 40)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (i32.const 60)
+ )
+ )
+ )
+ (drop
+ (select
+ (block (result i32)
+ (drop
+ (i32.const 10)
+ )
+ (unreachable)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 30)
+ )
+ (i32.const 40)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (i32.const 60)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (block (result i32)
+ (unreachable)
+ (i32.const 40)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (i32.const 60)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (block (result i32)
+ (drop
+ (i32.const 30)
+ )
+ (unreachable)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (i32.const 60)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (i32.const 40)
+ (block (result i32)
+ (unreachable)
+ (i32.const 60)
+ )
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (select
+ (i32.const 20)
+ (i32.const 40)
+ (block (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (unreachable)
+ )
+ )
+ )
+ )
+ (func $breaks
+ (block $out
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 20)
+ )
+ (br $out)
+ (drop
+ (i32.const 10)
+ )
+ (br_if $out
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (br_if $out
+ (i32.const 40)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (br_table $out $out
+ (i32.const 20)
+ )
+ (drop
+ (block $out2 (result i32)
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (br_table $out2 $out2
+ (i32.const 20)
+ (i32.const 40)
+ )
+ )
+ )
+ (unreachable)
+ )
+ )
+ (func $calls
+ (call $call-i
+ (block (result i32)
+ (i32.const 10)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (call $call-i
+ (i32.const 20)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 20)
+ )
+ (call $call-i
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (call $call-ii
+ (i32.const 20)
+ (i32.const 40)
+ )
+ (call $call-ii
+ (block (result i32)
+ (unreachable)
+ (i32.const 10)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 20)
+ )
+ (i32.const 30)
+ )
+ )
+ (call $call-ii
+ (block (result i32)
+ (drop
+ (i32.const 10)
+ )
+ (unreachable)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 20)
+ )
+ (i32.const 30)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (call $call-ii
+ (i32.const 20)
+ (block (result i32)
+ (unreachable)
+ (i32.const 30)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (call $call-ii
+ (i32.const 20)
+ (block (result i32)
+ (drop
+ (i32.const 30)
+ )
+ (unreachable)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 50)
+ )
+ (call $call-iii
+ (i32.const 20)
+ (i32.const 40)
+ (i32.const 60)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 40)
+ )
+ (call $call-iii
+ (i32.const 20)
+ (i32.const 30)
+ (i32.const 50)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 50)
+ )
+ (call_indirect (type $i32_i32_=>_none)
+ (i32.const 20)
+ (i32.const 40)
+ (i32.const 60)
+ )
+ (call_indirect (type $i32_i32_=>_none)
+ (unreachable)
+ (block (result i32)
+ (drop
+ (i32.const 30)
+ )
+ (i32.const 40)
+ )
+ (block (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (i32.const 60)
+ )
+ )
+ (drop
+ (i32.const 31)
+ )
+ (call_indirect (type $i32_i32_=>_none)
+ (i32.const 41)
+ (unreachable)
+ (block (result i32)
+ (drop
+ (i32.const 51)
+ )
+ (i32.const 61)
+ )
+ )
+ (drop
+ (i32.const 32)
+ )
+ (drop
+ (i32.const 52)
+ )
+ (call_indirect (type $i32_i32_=>_none)
+ (i32.const 42)
+ (i32.const 62)
+ (unreachable)
+ )
+ )
+ (func $atomics
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 50)
+ )
+ (drop
+ (i32.atomic.rmw.cmpxchg
+ (i32.const 20)
+ (i32.const 40)
+ (i32.const 60)
+ )
+ )
+ (drop
+ (i32.const 10)
+ )
+ (drop
+ (i32.atomic.rmw.add
+ (i32.const 20)
+ (i32.const 30)
+ )
+ )
+ )
+ (func $mix-select (param $x i32)
+ (drop
+ (select
+ (local.get $x)
+ (local.get $x)
+ (block (result i32)
+ (local.set $x
+ (i32.const 1)
+ )
+ (i32.const 2)
+ )
+ )
+ )
+ )
+ (func $block-type-change
+ (local $0 f64)
+ (local $1 f64)
+ (if
+ (block (result i32)
+ (nop)
+ (f64.gt
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ (nop)
+ )
+ )
+ (func $do-reorder (param $x i32)
+ (local $y i32)
+ (if
+ (i32.const 1)
+ (block
+ (local.set $y
+ (i32.const 5)
+ )
+ (local.set $x
+ (i32.le_u
+ (local.get $x)
+ (i32.const 10)
+ )
+ )
+ )
+ )
+ )
+ (func $do-not-reorder (param $x i32)
+ (local $y i32)
+ (if
+ (i32.const 1)
+ (local.set $x
+ (i32.le_u
+ (local.get $y)
+ (block (result i32)
+ (local.set $y
+ (i32.const 5)
+ )
+ (i32.const 10)
+ )
+ )
+ )
+ )
+ )
+ (func $return-different-type (result i32)
+ (drop
+ (f64.abs
+ (block
+ (drop
+ (i32.const 2)
+ )
+ (return
+ (i32.const 1)
+ )
+ )
+ )
+ )
+ (unreachable)
+ )
+ (func $drop-unreachable (result i32)
+ (local $0 i32)
+ (drop
+ (block (result i32)
+ (unreachable)
+ )
+ )
+ (unreachable)
+ )
+ (func $concrete_finale_in_unreachable (result f64)
+ (drop
+ (block (result f64)
+ (unreachable)
+ (f64.const 6.322092475576799e-96)
+ )
+ )
+ (f64.const -1)
+ )
+ (func $dont-move-unreachable
+ (loop $label$0
+ (drop
+ (block (result i32)
+ (br $label$0)
+ (i32.const 1)
+ )
+ )
+ )
+ )
+ (func $dont-move-unreachable-last
+ (loop $label$0
+ (drop
+ (block (result i32)
+ (call $dont-move-unreachable-last)
+ (br $label$0)
+ )
+ )
+ )
+ )
+ (func $move-around-unreachable-in-middle
+ (loop $label$0
+ (nop)
+ (drop
+ (block $label$3 (result i32)
+ (drop
+ (br_if $label$3
+ (br $label$0)
+ (i32.const 0)
+ )
+ )
+ (i32.const 1)
+ )
+ )
+ )
+ )
+ (func $drop-unreachable-block-with-concrete-final
+ (drop
+ (block (result i32)
+ (drop
+ (block
+ (drop
+ (return)
+ )
+ )
+ )
+ (i32.const -452)
+ )
+ )
+ )
+ (func $merging-with-unreachable-in-middle (result i32)
+ (block (result i32)
+ (return
+ (i32.const 21536)
+ )
+ (block $label$15
+ (br $label$15)
+ )
+ (i32.const 19299)
+ )
+ )
+ (func $remove-br-after-unreachable
+ (block $label$9
+ (drop
+ (block
+ (block
+ (return)
+ (br $label$9)
+ )
+ )
+ )
+ )
+ )
+ (func $block-tails
+ (block $l1
+ (drop
+ (i32.const -2)
+ )
+ (drop
+ (i32.const -1)
+ )
+ (br $l1)
+ (drop
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 1)
+ )
+ )
+ (block $l2
+ (br_if $l2
+ (i32.const 2)
+ )
+ (drop
+ (i32.const 3)
+ )
+ )
+ (block $l3
+ (br_if $l3
+ (i32.const 4)
+ )
+ (br_if $l3
+ (i32.const 5)
+ )
+ (drop
+ (i32.const 6)
+ )
+ )
+ (block $l4
+ (br_if $l4
+ (i32.const 7)
+ )
+ (br_if $l4
+ (i32.const 8)
+ )
+ (drop
+ (i32.const 9)
+ )
+ )
+ (block $l5
+ (if
+ (i32.const 10)
+ (br_if $l5
+ (i32.const 11)
+ )
+ )
+ (drop
+ (i32.const 12)
+ )
+ )
+ (block $l8
+ (br_if $l8
+ (i32.const 13)
+ )
+ (br_if $l8
+ (i32.const 14)
+ )
+ (br_if $l8
+ (i32.const 15)
+ )
+ (drop
+ (i32.const 16)
+ )
+ )
+ (block $l11
+ (br_if $l11
+ (i32.const 17)
+ )
+ (br_if $l11
+ (i32.const 18)
+ )
+ (br_if $l11
+ (i32.const 19)
+ )
+ (drop
+ (i32.const 20)
+ )
+ )
+ (block $l12
+ (br_if $l12
+ (i32.const 21)
+ )
+ (block $l13
+ (br_if $l13
+ (i32.const 22)
+ )
+ (block $l14
+ (br_if $l14
+ (i32.const 23)
+ )
+ (drop
+ (i32.const 24)
+ )
+ )
+ (drop
+ (i32.const 25)
+ )
+ )
+ (drop
+ (i32.const 26)
+ )
+ )
+ (drop
+ (i32.const 27)
+ )
+ (block $l17
+ (br_if $l17
+ (i32.const 28)
+ )
+ (drop
+ (i32.const 29)
+ )
+ )
+ (block $l16
+ (br_if $l16
+ (i32.const 30)
+ )
+ (drop
+ (i32.const 31)
+ )
+ )
+ (block $l15
+ (br_if $l15
+ (i32.const 32)
+ )
+ (drop
+ (i32.const 33)
+ )
+ )
+ )
+ (func $loop-tails
+ (loop $l1
+ (drop
+ (i32.const -2)
+ )
+ (drop
+ (i32.const -1)
+ )
+ (br $l1)
+ (drop
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 1)
+ )
+ )
+ (loop $l2
+ (br_if $l2
+ (i32.const 2)
+ )
+ )
+ (drop
+ (i32.const 3)
+ )
+ (block $b1
+ (loop $l3
+ (br_if $b1
+ (i32.const 4)
+ )
+ (br_if $l3
+ (i32.const 5)
+ )
+ )
+ (drop
+ (i32.const 6)
+ )
+ )
+ (loop $l4
+ (br_if $l4
+ (i32.const 7)
+ )
+ )
+ (block $b2
+ (br_if $b2
+ (i32.const 8)
+ )
+ (drop
+ (i32.const 9)
+ )
+ )
+ (loop $l5
+ (if
+ (i32.const 10)
+ (br_if $l5
+ (i32.const 11)
+ )
+ )
+ )
+ (drop
+ (i32.const 12)
+ )
+ (loop $l6
+ (loop $l7
+ (loop $l8
+ (br_if $l6
+ (i32.const 13)
+ )
+ (br_if $l7
+ (i32.const 14)
+ )
+ (br_if $l8
+ (i32.const 15)
+ )
+ (drop
+ (i32.const 16)
+ )
+ )
+ )
+ )
+ (loop $l9
+ (loop $l10
+ (loop $l11
+ (br_if $l11
+ (i32.const 17)
+ )
+ (br_if $l10
+ (i32.const 18)
+ )
+ (br_if $l9
+ (i32.const 19)
+ )
+ (drop
+ (i32.const 20)
+ )
+ )
+ )
+ )
+ (loop $l12
+ (loop $l13
+ (loop $l14
+ (br_if $l12
+ (i32.const 21)
+ )
+ (br_if $l13
+ (i32.const 22)
+ )
+ (br_if $l14
+ (i32.const 23)
+ )
+ )
+ )
+ )
+ (drop
+ (i32.const 24)
+ )
+ (drop
+ (i32.const 25)
+ )
+ (drop
+ (i32.const 26)
+ )
+ (loop $l15
+ (loop $l16
+ (loop $l17
+ (drop
+ (i32.const 27)
+ )
+ (br_if $l17
+ (i32.const 28)
+ )
+ )
+ (drop
+ (i32.const 29)
+ )
+ (br_if $l16
+ (i32.const 30)
+ )
+ )
+ (drop
+ (i32.const 31)
+ )
+ (br_if $l15
+ (i32.const 32)
+ )
+ )
+ (drop
+ (i32.const 33)
+ )
+ )
+ (func $block-tail-one
+ (block $l1
+ (drop
+ (i32.const -2)
+ )
+ (drop
+ (i32.const -1)
+ )
+ (br $l1)
+ (drop
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 1)
+ )
+ )
+ (drop
+ (i32.const 2)
+ )
+ )
+ (func $loop-tail-one
+ (loop $l1
+ (drop
+ (i32.const -2)
+ )
+ (drop
+ (i32.const -1)
+ )
+ (br $l1)
+ (drop
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 1)
+ )
+ )
+ (drop
+ (i32.const 2)
+ )
+ )
+ (func $block-tail-value (result i32)
+ (block $l1 (result i32)
+ (drop
+ (i32.const -1)
+ )
+ (br $l1
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 1)
+ )
+ (i32.const 2)
+ )
+ )
+ (func $block-tail-empty
+ (block $l1
+ (drop
+ (i32.const -1)
+ )
+ (br $l1)
+ )
+ )
+ (func $loop-tail-empty
+ (loop $l1
+ (drop
+ (i32.const -1)
+ )
+ (br $l1)
+ )
+ )
+ (func $block-tail-unreachable (result i32)
+ (block $l1 (result i32)
+ (drop
+ (i32.const -1)
+ )
+ (drop
+ (br_if $l1
+ (i32.const 0)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (i32.const 1)
+ )
+ (unreachable)
+ )
+ )
+ (func $loop-tail-unreachable (result i32)
+ (loop $l1
+ (drop
+ (i32.const -1)
+ )
+ (br_if $l1
+ (i32.const 1)
+ )
+ )
+ (drop
+ (i32.const 1)
+ )
+ (unreachable)
+ )
+)
+(module
+ (type $none_=>_i32 (func (result i32)))
+ (type $f64_i32_=>_i32 (func (param f64 i32) (result i32)))
+ (func $unreachable-in-sub-block (param $0 f64) (param $1 i32) (result i32)
+ (local $2 i32)
+ (local $9 i32)
+ (loop $label$1
+ (local.set $9
+ (local.tee $2
+ (block $label$2 (result i32)
+ (drop
+ (br_if $label$2
+ (local.tee $2
+ (i32.const 0)
+ )
+ (i32.const 0)
+ )
+ )
+ (br_if $label$1
+ (i32.const 0)
+ )
+ (block
+ (unreachable)
+ (nop)
+ )
+ )
+ )
+ )
+ )
+ (nop)
+ (local.get $9)
+ )
+ (func $trivial (result i32)
+ (block
+ (unreachable)
+ (nop)
+ )
+ )
+ (func $trivial-more (result i32)
+ (block
+ (nop)
+ (unreachable)
+ (nop)
+ (nop)
+ (nop)
+ )
+ (block
+ (nop)
+ (unreachable)
+ (nop)
+ )
+ )
+)
+(module
+ (type $none_=>_none (func))
+ (func $merge-some-block
+ (drop
+ (i32.const 1)
+ )
+ (block $b1
+ (br_if $b1
+ (i32.const 0)
+ )
+ )
+ (block $b2
+ (br_if $b2
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 2)
+ )
+ )
+ (drop
+ (i32.const 3)
+ )
+ (block $b3
+ (br_if $b3
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 4)
+ )
+ )
+ (block $b3-dead-code-so-ignore
+ (drop
+ (i32.const 3)
+ )
+ (br $b3-dead-code-so-ignore)
+ (drop
+ (i32.const 4)
+ )
+ )
+ (drop
+ (i32.const 5)
+ )
+ (block $b4
+ (br_if $b4
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 6)
+ )
+ (br_if $b4
+ (i32.const 0)
+ )
+ )
+ (block $b5
+ (br_if $b5
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 7)
+ )
+ (br_if $b5
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 8)
+ )
+ )
+ (drop
+ (i32.const 9)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (block $b6
+ (br_if $b6
+ (i32.const 0)
+ )
+ )
+ )
+ (func $merge-some-loop
+ (drop
+ (i32.const 1)
+ )
+ (block $b1
+ (br_if $b1
+ (i32.const 0)
+ )
+ )
+ (block $b2
+ (br_if $b2
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 2)
+ )
+ )
+ (drop
+ (i32.const 3)
+ )
+ (block $b3
+ (br_if $b3
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 4)
+ )
+ )
+ (drop
+ (i32.const 5)
+ )
+ (block $b4
+ (br_if $b4
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 6)
+ )
+ (br_if $b4
+ (i32.const 0)
+ )
+ )
+ (block $b5
+ (br_if $b5
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 7)
+ )
+ (br_if $b5
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 8)
+ )
+ )
+ (drop
+ (i32.const 9)
+ )
+ (drop
+ (i32.const 10)
+ )
+ (block $b6
+ (br_if $b6
+ (i32.const 0)
+ )
+ )
+ )
+ (func $merge-some-loop-taken
+ (loop $l1
+ (block $b1
+ (drop
+ (i32.const 1)
+ )
+ (br_if $l1
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 2)
+ )
+ (br_if $b1
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 3)
+ )
+ )
+ )
+ (loop $l2
+ (block $b2
+ (drop
+ (i32.const 4)
+ )
+ (br_if $b2
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 5)
+ )
+ (br_if $l2
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 6)
+ )
+ )
+ )
+ (loop $l3
+ (block $b3
+ (drop
+ (i32.const 7)
+ )
+ (br_if $b3
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 8)
+ )
+ (br_if $l3
+ (i32.const 0)
+ )
+ )
+ )
+ (loop $l4
+ (block $b4
+ (br_if $l4
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 9)
+ )
+ (br_if $b4
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 10)
+ )
+ )
+ )
+ (loop $l5
+ (block $b5
+ (drop
+ (i32.const 7)
+ )
+ (br_if $b5
+ (i32.const 0)
+ )
+ (br_if $l5
+ (i32.const 0)
+ )
+ )
+ )
+ (loop $l6
+ (block $b6
+ (br_if $l6
+ (i32.const 0)
+ )
+ (br_if $b6
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 10)
+ )
+ )
+ )
+ (loop $l7
+ (block $b7
+ (drop
+ (i32.const 11)
+ )
+ (br_if $l7
+ (i32.const 0)
+ )
+ (br_if $b7
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 13)
+ )
+ )
+ )
+ (loop $l8
+ (block $b8
+ (drop
+ (i32.const 14)
+ )
+ (br_if $b8
+ (i32.const 0)
+ )
+ (br_if $l8
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 16)
+ )
+ )
+ )
+ (loop $l9
+ (drop
+ (i32.const 17)
+ )
+ (br_if $l9
+ (i32.const 0)
+ )
+ (drop
+ (i32.const 18)
+ )
+ (br_if $l9
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i32.const 19)
+ )
+ (loop $l10
+ (drop
+ (i32.const 20)
+ )
+ (br_if $l10
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i32.const 21)
+ )
+ (loop $l11
+ (br_if $l11
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i32.const 23)
+ )
+ (loop $l12
+ (drop
+ (i32.const 24)
+ )
+ (br_if $l12
+ (i32.const 0)
+ )
+ )
+ )
+)
+(module
+ (type $none_=>_none (func))
+ (type $i32_=>_none (func (param i32)))
+ (type $none_=>_i32 (func (result i32)))
+ (event $e (attr 0) (param i32))
+ (func $foo
+ (nop)
+ )
+ (func $throw
+ (nop)
+ (throw $e
+ (i32.const 3)
+ )
+ )
+ (func $rethrow
+ (local $0 exnref)
+ (call $foo)
+ (rethrow
+ (local.get $0)
+ )
+ )
+ (func $br_on_exn (result i32)
+ (local $0 exnref)
+ (block $label$0 (result i32)
+ (call $foo)
+ (drop
+ (br_on_exn $label$0 $e
+ (local.get $0)
+ )
+ )
+ (i32.const 3)
+ )
+ )
+ (func $cannot_extract_br_on_exn_exnref
+ (local $0 exnref)
+ (drop
+ (block $label$0 (result i32)
+ (drop
+ (br_on_exn $label$0 $e
+ (local.get $0)
+ )
+ )
+ (i32.const 5)
+ )
+ )
+ )
+)