summaryrefslogtreecommitdiff
path: root/test/lit/basic/exception-handling.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/basic/exception-handling.wast')
-rw-r--r--test/lit/basic/exception-handling.wast576
1 files changed, 290 insertions, 286 deletions
diff --git a/test/lit/basic/exception-handling.wast b/test/lit/basic/exception-handling.wast
index 97be09c04..41c10f631 100644
--- a/test/lit/basic/exception-handling.wast
+++ b/test/lit/basic/exception-handling.wast
@@ -147,6 +147,7 @@
;; CHECK-BIN-NEXT: (try_table
;; CHECK-BIN-NEXT: (throw $e-empty)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $catchless-try-table
(try_table)
@@ -165,12 +166,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $simple-try-table-and-throw (type $4) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (try_table (catch $e-i32 $label$1)
+ ;; CHECK-BIN-NEXT: (block $block (result i32)
+ ;; CHECK-BIN-NEXT: (try_table (catch $e-i32 $block)
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $simple-try-table-and-throw (result i32)
@@ -194,12 +196,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-table-and-throw-ref (type $0)
;; CHECK-BIN-NEXT: (throw_ref
- ;; CHECK-BIN-NEXT: (block $label$1 (result exnref)
- ;; CHECK-BIN-NEXT: (try_table (catch_all_ref $label$1)
+ ;; CHECK-BIN-NEXT: (block $block (result exnref)
+ ;; CHECK-BIN-NEXT: (try_table (catch_all_ref $block)
;; CHECK-BIN-NEXT: (throw $e-i64
;; CHECK-BIN-NEXT: (i64.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -233,65 +236,64 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-table-multivalue-tag (type $0)
- ;; CHECK-BIN-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-BIN-NEXT: (local $1 i32)
- ;; CHECK-BIN-NEXT: (local $2 (tuple i32 i64 exnref))
- ;; CHECK-BIN-NEXT: (local $3 i64)
- ;; CHECK-BIN-NEXT: (local $4 i32)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (local.set $2
- ;; CHECK-BIN-NEXT: (block $label$2 (type $2) (result i32 i64 exnref)
- ;; CHECK-BIN-NEXT: (local.set $0
- ;; CHECK-BIN-NEXT: (block $label$3 (type $1) (result i32 i64)
- ;; CHECK-BIN-NEXT: (try_table (catch $e-i32-i64 $label$3) (catch_ref $e-i32-i64 $label$2)
- ;; CHECK-BIN-NEXT: (throw $e-i32-i64
- ;; CHECK-BIN-NEXT: (i32.const 0)
- ;; CHECK-BIN-NEXT: (i64.const 0)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $1
- ;; CHECK-BIN-NEXT: (tuple.extract 2 0
- ;; CHECK-BIN-NEXT: (local.get $0)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (tuple.extract 2 1
- ;; CHECK-BIN-NEXT: (local.get $0)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local $scratch (tuple i32 i64))
+ ;; CHECK-BIN-NEXT: (local $scratch_1 i32)
+ ;; CHECK-BIN-NEXT: (local $scratch_2 (tuple i32 i64 exnref))
+ ;; CHECK-BIN-NEXT: (local $scratch_3 i64)
+ ;; CHECK-BIN-NEXT: (local $scratch_4 i32)
+ ;; CHECK-BIN-NEXT: (block $block2
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $4
+ ;; CHECK-BIN-NEXT: (local.set $scratch_4
;; CHECK-BIN-NEXT: (tuple.extract 3 0
- ;; CHECK-BIN-NEXT: (local.get $2)
+ ;; CHECK-BIN-NEXT: (local.tee $scratch_2
+ ;; CHECK-BIN-NEXT: (block $block1 (type $2) (result i32 i64 exnref)
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (block (result i32)
+ ;; CHECK-BIN-NEXT: (local.set $scratch_1
+ ;; CHECK-BIN-NEXT: (tuple.extract 2 0
+ ;; CHECK-BIN-NEXT: (local.tee $scratch
+ ;; CHECK-BIN-NEXT: (block $block (type $1) (result i32 i64)
+ ;; CHECK-BIN-NEXT: (try_table (catch $e-i32-i64 $block) (catch_ref $e-i32-i64 $block1)
+ ;; CHECK-BIN-NEXT: (throw $e-i32-i64
+ ;; CHECK-BIN-NEXT: (i32.const 0)
+ ;; CHECK-BIN-NEXT: (i64.const 0)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (tuple.extract 2 1
+ ;; CHECK-BIN-NEXT: (local.get $scratch)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local.get $scratch_1)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (br $block2)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (block (result i64)
- ;; CHECK-BIN-NEXT: (local.set $3
+ ;; CHECK-BIN-NEXT: (local.set $scratch_3
;; CHECK-BIN-NEXT: (tuple.extract 3 1
- ;; CHECK-BIN-NEXT: (local.get $2)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (tuple.extract 3 2
- ;; CHECK-BIN-NEXT: (local.get $2)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $3)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_3)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $4)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -338,25 +340,25 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-table-all-catch-clauses-empty-tag (type $0)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (block $label$2
+ ;; CHECK-BIN-NEXT: (block $block4
+ ;; CHECK-BIN-NEXT: (block $block
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$3 (result exnref)
- ;; CHECK-BIN-NEXT: (block $label$4
+ ;; CHECK-BIN-NEXT: (block $block1 (result exnref)
+ ;; CHECK-BIN-NEXT: (block $block2
;; CHECK-BIN-NEXT: (throw_ref
- ;; CHECK-BIN-NEXT: (block $label$5 (result exnref)
- ;; CHECK-BIN-NEXT: (try_table (catch $e-empty $label$2) (catch_ref $e-empty $label$3) (catch_all $label$4) (catch_all_ref $label$5)
+ ;; CHECK-BIN-NEXT: (block $block3 (result exnref)
+ ;; CHECK-BIN-NEXT: (try_table (catch $e-empty $block) (catch_ref $e-empty $block1) (catch_all $block2) (catch_all_ref $block3)
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -415,43 +417,42 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-table-all-catch-clauses-i32-tag (type $0)
- ;; CHECK-BIN-NEXT: (local $0 (tuple i32 exnref))
- ;; CHECK-BIN-NEXT: (local $1 i32)
- ;; CHECK-BIN-NEXT: (block $label$1
+ ;; CHECK-BIN-NEXT: (local $scratch (tuple i32 exnref))
+ ;; CHECK-BIN-NEXT: (local $scratch_1 i32)
+ ;; CHECK-BIN-NEXT: (block $block4
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$2 (result i32)
- ;; CHECK-BIN-NEXT: (local.set $0
- ;; CHECK-BIN-NEXT: (block $label$3 (type $5) (result i32 exnref)
- ;; CHECK-BIN-NEXT: (block $label$4
- ;; CHECK-BIN-NEXT: (throw_ref
- ;; CHECK-BIN-NEXT: (block $label$5 (result exnref)
- ;; CHECK-BIN-NEXT: (try_table (catch $e-i32 $label$2) (catch_ref $e-i32 $label$3) (catch_all $label$4) (catch_all_ref $label$5)
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (block $block (result i32)
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $1
+ ;; CHECK-BIN-NEXT: (local.set $scratch_1
;; CHECK-BIN-NEXT: (tuple.extract 2 0
- ;; CHECK-BIN-NEXT: (local.get $0)
+ ;; CHECK-BIN-NEXT: (local.tee $scratch
+ ;; CHECK-BIN-NEXT: (block $block1 (type $5) (result i32 exnref)
+ ;; CHECK-BIN-NEXT: (block $block2
+ ;; CHECK-BIN-NEXT: (throw_ref
+ ;; CHECK-BIN-NEXT: (block $block3 (result exnref)
+ ;; CHECK-BIN-NEXT: (try_table (catch $e-i32 $block) (catch_ref $e-i32 $block1) (catch_all $block2) (catch_all_ref $block3)
+ ;; CHECK-BIN-NEXT: (call $foo)
+ ;; CHECK-BIN-NEXT: (call $foo)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (br $block4)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (br $block4)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (tuple.extract 2 1
- ;; CHECK-BIN-NEXT: (local.get $0)
+ ;; CHECK-BIN-NEXT: (local.get $scratch)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $1)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -513,71 +514,69 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-table-all-catch-clauses-multivalue-tag (type $0)
- ;; CHECK-BIN-NEXT: (local $0 (tuple i32 i64 exnref))
- ;; CHECK-BIN-NEXT: (local $1 i64)
- ;; CHECK-BIN-NEXT: (local $2 i32)
- ;; CHECK-BIN-NEXT: (local $3 (tuple i32 i64))
- ;; CHECK-BIN-NEXT: (local $4 i32)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (local.set $3
- ;; CHECK-BIN-NEXT: (block $label$2 (type $1) (result i32 i64)
- ;; CHECK-BIN-NEXT: (local.set $0
- ;; CHECK-BIN-NEXT: (block $label$3 (type $2) (result i32 i64 exnref)
- ;; CHECK-BIN-NEXT: (block $label$4
- ;; CHECK-BIN-NEXT: (throw_ref
- ;; CHECK-BIN-NEXT: (block $label$5 (result exnref)
- ;; CHECK-BIN-NEXT: (try_table (catch $e-i32-i64 $label$2) (catch_ref $e-i32-i64 $label$3) (catch_all $label$4) (catch_all_ref $label$5)
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $2
- ;; CHECK-BIN-NEXT: (tuple.extract 3 0
- ;; CHECK-BIN-NEXT: (local.get $0)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block (result i64)
- ;; CHECK-BIN-NEXT: (local.set $1
- ;; CHECK-BIN-NEXT: (tuple.extract 3 1
- ;; CHECK-BIN-NEXT: (local.get $0)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local $scratch (tuple i32 i64 exnref))
+ ;; CHECK-BIN-NEXT: (local $scratch_1 i64)
+ ;; CHECK-BIN-NEXT: (local $scratch_2 i32)
+ ;; CHECK-BIN-NEXT: (local $scratch_3 (tuple i32 i64))
+ ;; CHECK-BIN-NEXT: (local $scratch_4 i32)
+ ;; CHECK-BIN-NEXT: (block $block4
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (block (result i32)
+ ;; CHECK-BIN-NEXT: (local.set $scratch_4
+ ;; CHECK-BIN-NEXT: (tuple.extract 2 0
+ ;; CHECK-BIN-NEXT: (local.tee $scratch_3
+ ;; CHECK-BIN-NEXT: (block $block (type $1) (result i32 i64)
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (tuple.extract 3 2
- ;; CHECK-BIN-NEXT: (local.get $0)
+ ;; CHECK-BIN-NEXT: (block (result i32)
+ ;; CHECK-BIN-NEXT: (local.set $scratch_2
+ ;; CHECK-BIN-NEXT: (tuple.extract 3 0
+ ;; CHECK-BIN-NEXT: (local.tee $scratch
+ ;; CHECK-BIN-NEXT: (block $block1 (type $2) (result i32 i64 exnref)
+ ;; CHECK-BIN-NEXT: (block $block2
+ ;; CHECK-BIN-NEXT: (throw_ref
+ ;; CHECK-BIN-NEXT: (block $block3 (result exnref)
+ ;; CHECK-BIN-NEXT: (try_table (catch $e-i32-i64 $block) (catch_ref $e-i32-i64 $block1) (catch_all $block2) (catch_all_ref $block3)
+ ;; CHECK-BIN-NEXT: (call $foo)
+ ;; CHECK-BIN-NEXT: (call $foo)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (br $block4)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (br $block4)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (block (result i64)
+ ;; CHECK-BIN-NEXT: (local.set $scratch_1
+ ;; CHECK-BIN-NEXT: (tuple.extract 3 1
+ ;; CHECK-BIN-NEXT: (local.get $scratch)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (tuple.extract 3 2
+ ;; CHECK-BIN-NEXT: (local.get $scratch)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local.get $scratch_1)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $1)
+ ;; CHECK-BIN-NEXT: (br $block4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $2)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $4
- ;; CHECK-BIN-NEXT: (tuple.extract 2 0
- ;; CHECK-BIN-NEXT: (local.get $3)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (tuple.extract 2 1
- ;; CHECK-BIN-NEXT: (local.get $3)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_3)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $4)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -625,10 +624,10 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-table-with-label-and-br (type $4) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (block $label$2 (result i32)
- ;; CHECK-BIN-NEXT: (try_table (result i32) (catch $e-i32 $label$1)
- ;; CHECK-BIN-NEXT: (br $label$2
+ ;; CHECK-BIN-NEXT: (block $block (result i32)
+ ;; CHECK-BIN-NEXT: (block $block1 (result i32)
+ ;; CHECK-BIN-NEXT: (try_table (result i32) (catch $e-i32 $block)
+ ;; CHECK-BIN-NEXT: (br $block1
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -670,11 +669,11 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $nested-try-table (type $3) (result exnref)
- ;; CHECK-BIN-NEXT: (block $label$1 (result exnref)
+ ;; CHECK-BIN-NEXT: (block $block (result exnref)
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$2 (result i32)
- ;; CHECK-BIN-NEXT: (try_table (catch_all_ref $label$1)
- ;; CHECK-BIN-NEXT: (try_table (catch $e-i32 $label$2)
+ ;; CHECK-BIN-NEXT: (block $block1 (result i32)
+ ;; CHECK-BIN-NEXT: (try_table (catch_all_ref $block)
+ ;; CHECK-BIN-NEXT: (try_table (catch $e-i32 $block1)
;; CHECK-BIN-NEXT: (if
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: (then
@@ -688,8 +687,11 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (ref.null noexn)
@@ -779,238 +781,237 @@
;; CHECK-BIN-NODEBUG-NEXT: (try_table
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$4)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $3 (type $4) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$0 $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$0 $block)
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $4 (type $0)
;; CHECK-BIN-NODEBUG-NEXT: (throw_ref
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch_all_ref $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch_all_ref $block)
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$1
;; CHECK-BIN-NODEBUG-NEXT: (i64.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $5 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (local $0 (tuple i32 i64))
-;; CHECK-BIN-NODEBUG-NEXT: (local $1 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local $2 (tuple i32 i64 exnref))
-;; CHECK-BIN-NODEBUG-NEXT: (local $3 i64)
-;; CHECK-BIN-NODEBUG-NEXT: (local $4 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $2
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (type $2) (result i32 i64 exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (type $1) (result i32 i64)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$2 $label$3) (catch_ref $tag$2 $label$2)
-;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$2
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
-;; CHECK-BIN-NODEBUG-NEXT: (i64.const 0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 1
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch (tuple i32 i64))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_1 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_2 (tuple i32 i64 exnref))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_3 i64)
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_4 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $4
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_4
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch_2
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (type $2) (result i32 i64 exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_1
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (type $1) (result i32 i64)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$2 $block) (catch_ref $tag$2 $block1)
+;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$2
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
+;; CHECK-BIN-NODEBUG-NEXT: (i64.const 0)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 1
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_1)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (br $block2)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (block (result i64)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $3
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_3
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 1
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 2
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $3)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $4)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $6 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
+;; CHECK-BIN-NODEBUG-NEXT: (block $block4
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (result exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$4
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (result exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2
;; CHECK-BIN-NODEBUG-NEXT: (throw_ref
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$5 (result exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$4 $label$2) (catch_ref $tag$4 $label$3) (catch_all $label$4) (catch_all_ref $label$5)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block3 (result exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$4 $block) (catch_ref $tag$4 $block1) (catch_all $block2) (catch_all_ref $block3)
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $7 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (local $0 (tuple i32 exnref))
-;; CHECK-BIN-NODEBUG-NEXT: (local $1 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch (tuple i32 exnref))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_1 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block4
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (type $5) (result i32 exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$4
-;; CHECK-BIN-NODEBUG-NEXT: (throw_ref
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$5 (result exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$0 $label$2) (catch_ref $tag$0 $label$3) (catch_all $label$4) (catch_all_ref $label$5)
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result i32)
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_1
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (type $5) (result i32 exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2
+;; CHECK-BIN-NODEBUG-NEXT: (throw_ref
+;; CHECK-BIN-NODEBUG-NEXT: (block $block3 (result exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$0 $block) (catch_ref $tag$0 $block1) (catch_all $block2) (catch_all_ref $block3)
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 1
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $8 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (local $0 (tuple i32 i64 exnref))
-;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64)
-;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local $3 (tuple i32 i64))
-;; CHECK-BIN-NODEBUG-NEXT: (local $4 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $3
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (type $1) (result i32 i64)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (type $2) (result i32 i64 exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$4
-;; CHECK-BIN-NODEBUG-NEXT: (throw_ref
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$5 (result exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$2 $label$2) (catch_ref $tag$2 $label$3) (catch_all $label$4) (catch_all_ref $label$5)
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $2
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block (result i64)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 1
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch (tuple i32 i64 exnref))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_1 i64)
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_2 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_3 (tuple i32 i64))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_4 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block4
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_4
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch_3
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (type $1) (result i32 i64)
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 2
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_2
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 0
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (type $2) (result i32 i64 exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2
+;; CHECK-BIN-NODEBUG-NEXT: (throw_ref
+;; CHECK-BIN-NODEBUG-NEXT: (block $block3 (result exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$2 $block) (catch_ref $tag$2 $block1) (catch_all $block2) (catch_all_ref $block3)
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i64)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_1
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 1
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 2
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_1)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $4
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 1
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $3)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $4)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $9 (type $4) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (result i32) (catch $tag$0 $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$2
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (result i32) (catch $tag$0 $block)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block1
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1019,11 +1020,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $10 (type $3) (result exnref)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result exnref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result exnref)
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch_all_ref $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$0 $label$2)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch_all_ref $block)
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (catch $tag$0 $block1)
;; CHECK-BIN-NODEBUG-NEXT: (if
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: (then
@@ -1037,8 +1038,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (ref.null noexn)