summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/basic/exception-handling-legacy.wast408
-rw-r--r--test/lit/basic/exception-handling-no-gc.wast5
-rw-r--r--test/lit/basic/exception-handling.wast576
-rw-r--r--test/lit/basic/fn_prolog_epilog.debugInfo.wast12
-rw-r--r--test/lit/basic/min.wast28
-rw-r--r--test/lit/basic/polymorphic_stack.wast82
-rw-r--r--test/lit/basic/reference-types.wast228
-rw-r--r--test/lit/basic/reg_switch.wast8
-rw-r--r--test/lit/basic/typed_continuations_resume.wast70
-rw-r--r--test/lit/basic/types-function-references.wast58
-rw-r--r--test/lit/basic/unit.wat226
-rw-r--r--test/lit/basic/unreachable-code.wast30
-rw-r--r--test/lit/basic/untaken-br_if.wast16
-rw-r--r--test/lit/binary/bad-delegate.test17
-rw-r--r--test/lit/binary/declarative-element-use-expr.test8
-rw-r--r--test/lit/binary/delegate-block.test27
-rw-r--r--test/lit/binary/delegate-block.test.wasm (renamed from test/lit/binary/bad-delegate.test.wasm)bin32 -> 32 bytes
-rw-r--r--test/lit/binary/dwarf-multivalue.test16
-rw-r--r--test/lit/binary/stacky-eh-legacy.test19
-rw-r--r--test/lit/binary/stacky-nn-tuple.test228
-rw-r--r--test/lit/blocktype.wast52
-rw-r--r--test/lit/cast-and-recast-tuple.wast381
-rw-r--r--test/lit/cast-and-recast.wast28
-rw-r--r--test/lit/cast-to-basic.wast12
-rw-r--r--test/lit/debug/source-map-stop.wast2
-rw-r--r--test/lit/downgrade-reftypes.wast16
-rw-r--r--test/lit/multivalue-stack-ir.wast6
-rw-r--r--test/lit/multivalue.wast328
-rw-r--r--test/lit/parse-double-unreachable.wast19
-rw-r--r--test/lit/passes/roundtrip-gc.wast6
-rw-r--r--test/lit/passes/roundtrip.wast27
-rw-r--r--test/lit/passes/signature-refining_gto.wat4
-rw-r--r--test/lit/passes/stack-ir-roundtrip-eh-legacy.wast6
-rw-r--r--test/lit/reftypes-without-gc.wast4
-rw-r--r--test/lit/source-map.wast9
-rw-r--r--test/lit/string.as_wtf16.wast98
36 files changed, 1458 insertions, 1602 deletions
diff --git a/test/lit/basic/exception-handling-legacy.wast b/test/lit/basic/exception-handling-legacy.wast
index 70cc3f5bc..791745b69 100644
--- a/test/lit/basic/exception-handling-legacy.wast
+++ b/test/lit/basic/exception-handling-legacy.wast
@@ -76,7 +76,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $simple-try-catch (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -124,9 +124,10 @@
;; CHECK-BIN: (func $try-catch-multivalue-tag (type $0)
;; CHECK-BIN-NEXT: (local $x i32)
;; CHECK-BIN-NEXT: (local $1 i64)
- ;; CHECK-BIN-NEXT: (local $2 (tuple i32 i64))
- ;; CHECK-BIN-NEXT: (local $3 i32)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (local $scratch (tuple i32 i64))
+ ;; CHECK-BIN-NEXT: (local $scratch_3 i32)
+ ;; CHECK-BIN-NEXT: (local $4 (tuple i32 i64))
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32-i64
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -134,26 +135,30 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch $e-i32-i64
- ;; CHECK-BIN-NEXT: (local.set $2
+ ;; CHECK-BIN-NEXT: (local.set $4
;; CHECK-BIN-NEXT: (pop (tuple i32 i64))
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.set $x
- ;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $3
- ;; CHECK-BIN-NEXT: (tuple.extract 2 0
- ;; CHECK-BIN-NEXT: (local.get $2)
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (local.set $x
+ ;; CHECK-BIN-NEXT: (block (result i32)
+ ;; CHECK-BIN-NEXT: (local.set $scratch_3
+ ;; CHECK-BIN-NEXT: (tuple.extract 2 0
+ ;; CHECK-BIN-NEXT: (local.tee $scratch
+ ;; CHECK-BIN-NEXT: (local.get $4)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.set $1
- ;; CHECK-BIN-NEXT: (tuple.extract 2 1
- ;; CHECK-BIN-NEXT: (local.get $2)
+ ;; CHECK-BIN-NEXT: (local.set $1
+ ;; 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_3)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (local.get $3)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (local.get $x)
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (local.get $x)
+ ;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -190,18 +195,19 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-with-block-label (type $0)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (try $label$4
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch $e-i32
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (pop i32)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $try-with-block-label
@@ -228,7 +234,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $empty-try-body (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch $e-i32
@@ -263,7 +269,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $multiple-insts-within-try-and-catch-bodies (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: (call $bar)
@@ -311,7 +317,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $multiple-catches (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -355,7 +361,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $catch-all (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -398,7 +404,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $catch-and-catch-all-together (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -480,9 +486,9 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $nested-try-catch (type $0)
- ;; CHECK-BIN-NEXT: (try $label$9
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (try $label$4
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -503,7 +509,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (try $label$8
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
@@ -560,13 +566,14 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $catchless-delegateless-try (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (throw $e-i32
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $catchless-delegateless-try
(try
@@ -597,21 +604,19 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $inner-delegate-target-outer-catch (type $0)
- ;; CHECK-BIN-NEXT: (try $label$9
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (try $label$4
- ;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (delegate $label$9)
+ ;; CHECK-BIN-NEXT: (try
+ ;; CHECK-BIN-NEXT: (do
+ ;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (try $label$7
- ;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (delegate $label$9)
+ ;; CHECK-BIN-NEXT: (delegate $label)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (try
+ ;; CHECK-BIN-NEXT: (do
+ ;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (delegate $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
@@ -665,26 +670,24 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $branch-and-delegate-target-same-try-label (type $0)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (try $label$10
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (block $label$2
- ;; CHECK-BIN-NEXT: (try $label$5
- ;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (br_if $label$1
- ;; CHECK-BIN-NEXT: (i32.const 1)
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (try
+ ;; CHECK-BIN-NEXT: (do
+ ;; CHECK-BIN-NEXT: (br_if $block
+ ;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (delegate $label$10)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (try $label$8
- ;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (br_if $label$1
- ;; CHECK-BIN-NEXT: (i32.const 1)
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (delegate $label)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (try
+ ;; CHECK-BIN-NEXT: (do
+ ;; CHECK-BIN-NEXT: (br_if $block
+ ;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (delegate $label$10)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (delegate $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
@@ -731,15 +734,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $inner-delegate-target-outer-delegate (type $0)
- ;; CHECK-BIN-NEXT: (try $label$6
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (try $label$4
- ;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (call $foo)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (delegate $label$6)
+ ;; CHECK-BIN-NEXT: (try
+ ;; CHECK-BIN-NEXT: (do
+ ;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (delegate $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (delegate 0)
@@ -770,7 +771,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $empty-catch-body (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch $e-empty
@@ -802,7 +803,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $try-catch-rethrow (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
@@ -810,10 +811,10 @@
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (pop i32)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (rethrow $label$3)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (rethrow $label$3)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -852,8 +853,8 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $branch-and-rethrow-target-same-try-label (type $0)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (try $label$4
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
@@ -861,10 +862,10 @@
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (pop i32)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (rethrow $label$4)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -913,12 +914,12 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $nested-rethrow (type $0)
- ;; CHECK-BIN-NEXT: (try $label$6
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (try $label$5
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
@@ -926,10 +927,10 @@
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (pop i32)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (rethrow $label$6)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (rethrow $label$6)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -986,12 +987,12 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $rnested-rethrow-with-interleaving-block (type $0)
- ;; CHECK-BIN-NEXT: (try $label$7
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (try $label$6
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
@@ -999,12 +1000,13 @@
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (pop i32)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$5
- ;; CHECK-BIN-NEXT: (rethrow $label$7)
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (rethrow $label$7)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -1068,28 +1070,28 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $rethrow-within-nested-try-part (type $0)
- ;; CHECK-BIN-NEXT: (try $label$6
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (try $label$5
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (rethrow $label$6)
+ ;; CHECK-BIN-NEXT: (rethrow $label)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (try $label$12
+ ;; CHECK-BIN-NEXT: (try $label1
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (call $foo)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
- ;; CHECK-BIN-NEXT: (try $label$11
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (rethrow $label$12)
+ ;; CHECK-BIN-NEXT: (rethrow $label1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch_all
;; CHECK-BIN-NEXT: )
@@ -1147,7 +1149,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $pop-within-if-condition (type $0)
- ;; CHECK-BIN-NEXT: (try $label$5
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch $e-i32
@@ -1197,7 +1199,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $pop-can-be-supertype (type $0)
- ;; CHECK-BIN-NEXT: (try $label$3
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (catch $e-eqref
@@ -1233,20 +1235,20 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $catchless-try-with-inner-delegate (type $0)
- ;; CHECK-BIN-NEXT: (try $label$6
+ ;; CHECK-BIN-NEXT: (try $label
;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (try $label$4
- ;; CHECK-BIN-NEXT: (do
- ;; CHECK-BIN-NEXT: (throw $e-i32
- ;; CHECK-BIN-NEXT: (i32.const 0)
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (try
+ ;; CHECK-BIN-NEXT: (do
+ ;; CHECK-BIN-NEXT: (throw $e-i32
+ ;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (delegate $label$6)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (delegate $label)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $catchless-try-with-inner-delegate
(try $label$0
@@ -1276,10 +1278,10 @@
;; CHECK-TEXT-NEXT: (nop)
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $nested-delegate-within-block (type $0)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (block $label$2
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (block
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (try $label$5
+ ;; CHECK-BIN-NEXT: (try
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (delegate 1)
@@ -1327,7 +1329,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $2 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1344,9 +1346,10 @@
;; CHECK-BIN-NODEBUG: (func $3 (type $0)
;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32)
;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64)
-;; CHECK-BIN-NODEBUG-NEXT: (local $2 (tuple i32 i64))
-;; CHECK-BIN-NODEBUG-NEXT: (local $3 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch (tuple i32 i64))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_3 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local $4 (tuple i32 i64))
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$2
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1354,49 +1357,54 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$2
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $2
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $4
;; CHECK-BIN-NODEBUG-NEXT: (pop (tuple i32 i64))
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
-;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $3
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_3
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $4)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 1
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
+;; 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_3)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $3)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $4 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$4
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (pop i32)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; 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 $5 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0
@@ -1408,7 +1416,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $6 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: (call $1)
@@ -1424,7 +1432,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $7 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1444,7 +1452,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $8 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1456,7 +1464,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $9 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1480,9 +1488,9 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $10 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$9
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$4
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1503,7 +1511,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$8
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
@@ -1522,31 +1530,30 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $11 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; 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: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $12 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$9
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$4
-;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$9)
+;; CHECK-BIN-NODEBUG-NEXT: (try
+;; CHECK-BIN-NODEBUG-NEXT: (do
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$7
-;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$9)
+;; CHECK-BIN-NODEBUG-NEXT: (delegate $label)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (try
+;; CHECK-BIN-NODEBUG-NEXT: (do
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (delegate $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
@@ -1555,26 +1562,24 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $13 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$10
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$5
-;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (try
+;; CHECK-BIN-NODEBUG-NEXT: (do
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$10)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$8
-;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (delegate $label)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (try
+;; CHECK-BIN-NODEBUG-NEXT: (do
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$10)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (delegate $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
@@ -1584,15 +1589,13 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $14 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$6
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$4
-;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (call $0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$6)
+;; CHECK-BIN-NODEBUG-NEXT: (try
+;; CHECK-BIN-NODEBUG-NEXT: (do
+;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (delegate $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (delegate 0)
@@ -1600,7 +1603,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $15 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$4
@@ -1609,7 +1612,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $16 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1617,17 +1620,17 @@
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (pop i32)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$3)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$3)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $17 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$4
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1635,22 +1638,22 @@
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (pop i32)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$4)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $18 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$6
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$5
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1658,10 +1661,10 @@
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (pop i32)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$6)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$6)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1669,12 +1672,12 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $19 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$7
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$6
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1682,12 +1685,13 @@
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (pop i32)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$5
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$7)
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$7)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1695,28 +1699,28 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $20 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$6
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$5
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$6)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$12
+;; CHECK-BIN-NODEBUG-NEXT: (try $label1
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (call $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$11
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$12)
+;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch_all
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1726,7 +1730,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $21 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$5
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0
@@ -1746,7 +1750,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $22 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$3
@@ -1758,27 +1762,27 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $23 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$6
+;; CHECK-BIN-NODEBUG-NEXT: (try $label
;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$4
-;; CHECK-BIN-NODEBUG-NEXT: (do
-;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (try
+;; CHECK-BIN-NODEBUG-NEXT: (do
+;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$6)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (delegate $label)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $24 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (block
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$5
+;; CHECK-BIN-NODEBUG-NEXT: (try
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (delegate 1)
diff --git a/test/lit/basic/exception-handling-no-gc.wast b/test/lit/basic/exception-handling-no-gc.wast
index 4ab0708c4..611853a93 100644
--- a/test/lit/basic/exception-handling-no-gc.wast
+++ b/test/lit/basic/exception-handling-no-gc.wast
@@ -7,10 +7,11 @@
(module
;; CHECK: (func $test (result exnref)
- ;; CHECK-NEXT: (block $label$1 (result exnref)
- ;; CHECK-NEXT: (try_table (catch_all_ref $label$1)
+ ;; CHECK-NEXT: (block $block (result exnref)
+ ;; CHECK-NEXT: (try_table (catch_all_ref $block)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test (result exnref)
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)
diff --git a/test/lit/basic/fn_prolog_epilog.debugInfo.wast b/test/lit/basic/fn_prolog_epilog.debugInfo.wast
index 636c3346e..511ea9ce8 100644
--- a/test/lit/basic/fn_prolog_epilog.debugInfo.wast
+++ b/test/lit/basic/fn_prolog_epilog.debugInfo.wast
@@ -45,9 +45,9 @@
;; CHECK-BIN: (func $0 (type $0)
;; CHECK-BIN-NEXT: (nop)
-;; CHECK-BIN-NEXT: (block $label$1
-;; CHECK-BIN-NEXT: (block $label$2
-;; CHECK-BIN-NEXT: (br $label$2)
+;; CHECK-BIN-NEXT: (block
+;; CHECK-BIN-NEXT: (block $block
+;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (return)
@@ -57,9 +57,9 @@
;; CHECK-BIN-NODEBUG: (func $0 (type $0)
;; CHECK-BIN-NODEBUG-NEXT: (nop)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$2)
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (return)
diff --git a/test/lit/basic/min.wast b/test/lit/basic/min.wast
index 44928cd83..e4de00185 100644
--- a/test/lit/basic/min.wast
+++ b/test/lit/basic/min.wast
@@ -76,7 +76,7 @@
;; CHECK-BIN-NEXT: (local $n f32)
;; CHECK-BIN-NEXT: (local.tee $n
;; CHECK-BIN-NEXT: (f32.neg
- ;; CHECK-BIN-NEXT: (block $label$1 (result f32)
+ ;; CHECK-BIN-NEXT: (block (result f32)
;; CHECK-BIN-NEXT: (i32.store
;; CHECK-BIN-NEXT: (local.get $k)
;; CHECK-BIN-NEXT: (local.get $p)
@@ -127,21 +127,21 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $littleswitch (type $2) (param $x i32) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (block $label$2
- ;; CHECK-BIN-NEXT: (block $label$3
- ;; CHECK-BIN-NEXT: (br_table $label$3 $label$2 $label$3
+ ;; CHECK-BIN-NEXT: (block $block2 (result i32)
+ ;; CHECK-BIN-NEXT: (block $block1
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (br_table $block $block1 $block
;; CHECK-BIN-NEXT: (i32.sub
;; CHECK-BIN-NEXT: (local.get $x)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block2
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block2
;; CHECK-BIN-NEXT: (i32.const 2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -196,7 +196,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (local $2 f32)
;; CHECK-BIN-NODEBUG-NEXT: (local.tee $2
;; CHECK-BIN-NODEBUG-NEXT: (f32.neg
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f32)
+;; CHECK-BIN-NODEBUG-NEXT: (block (result f32)
;; CHECK-BIN-NODEBUG-NEXT: (i32.store
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
@@ -210,21 +210,21 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $2 (type $2) (param $0 i32) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3
-;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$3 $label$2 $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (br_table $block $block1 $block
;; CHECK-BIN-NODEBUG-NEXT: (i32.sub
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block2
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block2
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/basic/polymorphic_stack.wast b/test/lit/basic/polymorphic_stack.wast
index fc743bf2a..2ccaa51e7 100644
--- a/test/lit/basic/polymorphic_stack.wast
+++ b/test/lit/basic/polymorphic_stack.wast
@@ -47,9 +47,7 @@
;; CHECK-BIN: (import "env" "table" (table $timport$0 9 9 funcref))
;; CHECK-BIN: (func $break-and-binary (type $0) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (unreachable)
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $break-and-binary (result i32)
(block $x (result i32)
@@ -227,15 +225,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $untaken-break-should-have-value (type $0) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (block $label$2
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (i32.const 0)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (unreachable)
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $untaken-break-should-have-value (result i32)
(block $x (result i32)
@@ -275,7 +271,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$2 (result i32)
+ ;; CHECK-BIN-NEXT: (block (result i32)
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
@@ -314,10 +310,8 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $br_table_unreachable_to_also_unreachable (type $0) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (block $label$2 (result i32)
- ;; CHECK-BIN-NEXT: (unreachable)
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (block (result i32)
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $br_table_unreachable_to_also_unreachable (result i32)
@@ -352,20 +346,19 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $untaken-br_if (type $0) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (block $label$2
- ;; CHECK-BIN-NEXT: (if
- ;; CHECK-BIN-NEXT: (i32.const 0)
- ;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (unreachable)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (else
- ;; CHECK-BIN-NEXT: (unreachable)
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (if
+ ;; CHECK-BIN-NEXT: (i32.const 0)
+ ;; CHECK-BIN-NEXT: (then
+ ;; CHECK-BIN-NEXT: (unreachable)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (else
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $untaken-br_if (result i32)
(block $label$8 (result i32)
@@ -399,9 +392,7 @@
;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 9 9 funcref))
;; CHECK-BIN-NODEBUG: (func $0 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $1 (type $1) (param $0 i32) (result i32)
@@ -428,15 +419,13 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $5 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; 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: (func $6 (type $1) (param $0 i32) (result i32)
@@ -448,7 +437,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -459,26 +448,23 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $7 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $8 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
-;; CHECK-BIN-NODEBUG-NEXT: (if
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
-;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (else
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (if
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
+;; CHECK-BIN-NODEBUG-NEXT: (then
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (else
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; 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: )
diff --git a/test/lit/basic/reference-types.wast b/test/lit/basic/reference-types.wast
index 22250c9a0..61497e612 100644
--- a/test/lit/basic/reference-types.wast
+++ b/test/lit/basic/reference-types.wast
@@ -944,25 +944,25 @@
;; CHECK-BIN-NEXT: (i32.const 3)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$1 (result eqref)
- ;; CHECK-BIN-NEXT: (br_if $label$1
+ ;; CHECK-BIN-NEXT: (block $block (result eqref)
+ ;; CHECK-BIN-NEXT: (br_if $block
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$2 (result eqref)
- ;; CHECK-BIN-NEXT: (br_if $label$2
+ ;; CHECK-BIN-NEXT: (block $block1 (result eqref)
+ ;; CHECK-BIN-NEXT: (br_if $block1
;; CHECK-BIN-NEXT: (global.get $global_eqref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$3 (result eqref)
+ ;; CHECK-BIN-NEXT: (block $block2 (result eqref)
;; CHECK-BIN-NEXT: (ref.cast nullref
- ;; CHECK-BIN-NEXT: (br_if $label$3
+ ;; CHECK-BIN-NEXT: (br_if $block2
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -970,25 +970,25 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$4 (result funcref)
- ;; CHECK-BIN-NEXT: (br_if $label$4
+ ;; CHECK-BIN-NEXT: (block $block3 (result funcref)
+ ;; CHECK-BIN-NEXT: (br_if $block3
;; CHECK-BIN-NEXT: (local.get $local_funcref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$5 (result funcref)
- ;; CHECK-BIN-NEXT: (br_if $label$5
+ ;; CHECK-BIN-NEXT: (block $block4 (result funcref)
+ ;; CHECK-BIN-NEXT: (br_if $block4
;; CHECK-BIN-NEXT: (global.get $global_funcref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$6 (result funcref)
+ ;; CHECK-BIN-NEXT: (block $block5 (result funcref)
;; CHECK-BIN-NEXT: (ref.cast nullfuncref
- ;; CHECK-BIN-NEXT: (br_if $label$6
+ ;; CHECK-BIN-NEXT: (br_if $block5
;; CHECK-BIN-NEXT: (ref.null nofunc)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -996,9 +996,9 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$7 (result funcref)
+ ;; CHECK-BIN-NEXT: (block $block6 (result funcref)
;; CHECK-BIN-NEXT: (ref.cast (ref $3)
- ;; CHECK-BIN-NEXT: (br_if $label$7
+ ;; CHECK-BIN-NEXT: (br_if $block6
;; CHECK-BIN-NEXT: (ref.func $foo)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -1006,25 +1006,25 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$8 (result anyref)
- ;; CHECK-BIN-NEXT: (br_if $label$8
+ ;; CHECK-BIN-NEXT: (block $block7 (result anyref)
+ ;; CHECK-BIN-NEXT: (br_if $block7
;; CHECK-BIN-NEXT: (local.get $local_anyref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$9 (result anyref)
- ;; CHECK-BIN-NEXT: (br_if $label$9
+ ;; CHECK-BIN-NEXT: (block $block8 (result anyref)
+ ;; CHECK-BIN-NEXT: (br_if $block8
;; CHECK-BIN-NEXT: (global.get $global_anyref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$10 (result anyref)
+ ;; CHECK-BIN-NEXT: (block $block9 (result anyref)
;; CHECK-BIN-NEXT: (ref.cast nullref
- ;; CHECK-BIN-NEXT: (br_if $label$10
+ ;; CHECK-BIN-NEXT: (br_if $block9
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -1032,9 +1032,9 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$11 (result anyref)
+ ;; CHECK-BIN-NEXT: (block $block10 (result anyref)
;; CHECK-BIN-NEXT: (ref.cast eqref
- ;; CHECK-BIN-NEXT: (br_if $label$11
+ ;; CHECK-BIN-NEXT: (br_if $block10
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -1042,9 +1042,9 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$12 (result anyref)
+ ;; CHECK-BIN-NEXT: (block $block11 (result anyref)
;; CHECK-BIN-NEXT: (ref.cast nullref
- ;; CHECK-BIN-NEXT: (br_if $label$12
+ ;; CHECK-BIN-NEXT: (br_if $block11
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -1052,67 +1052,67 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$13 (result eqref)
+ ;; CHECK-BIN-NEXT: (loop (result eqref)
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$14 (result eqref)
+ ;; CHECK-BIN-NEXT: (loop (result eqref)
;; CHECK-BIN-NEXT: (global.get $global_eqref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$15 (result eqref)
+ ;; CHECK-BIN-NEXT: (loop (result eqref)
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$16 (result funcref)
+ ;; CHECK-BIN-NEXT: (loop (result funcref)
;; CHECK-BIN-NEXT: (local.get $local_funcref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$17 (result funcref)
+ ;; CHECK-BIN-NEXT: (loop (result funcref)
;; CHECK-BIN-NEXT: (global.get $global_funcref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$18 (result funcref)
+ ;; CHECK-BIN-NEXT: (loop (result funcref)
;; CHECK-BIN-NEXT: (ref.null nofunc)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$19 (result funcref)
+ ;; CHECK-BIN-NEXT: (loop (result funcref)
;; CHECK-BIN-NEXT: (ref.func $foo)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$20 (result anyref)
+ ;; CHECK-BIN-NEXT: (loop (result anyref)
;; CHECK-BIN-NEXT: (local.get $local_anyref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$21 (result anyref)
+ ;; CHECK-BIN-NEXT: (loop (result anyref)
;; CHECK-BIN-NEXT: (global.get $global_anyref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$22 (result anyref)
+ ;; CHECK-BIN-NEXT: (loop (result anyref)
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$23 (result anyref)
+ ;; CHECK-BIN-NEXT: (loop (result anyref)
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$24 (result anyref)
+ ;; CHECK-BIN-NEXT: (loop (result anyref)
;; CHECK-BIN-NEXT: (global.get $global_eqref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (loop $label$25 (result anyref)
+ ;; CHECK-BIN-NEXT: (loop (result anyref)
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -1185,7 +1185,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (try $label$40 (result eqref)
+ ;; CHECK-BIN-NEXT: (try (result eqref)
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: )
@@ -1198,7 +1198,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (try $label$43 (result funcref)
+ ;; CHECK-BIN-NEXT: (try (result funcref)
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (ref.func $foo)
;; CHECK-BIN-NEXT: )
@@ -1211,7 +1211,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (try $label$46 (result anyref)
+ ;; CHECK-BIN-NEXT: (try (result anyref)
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: )
@@ -1224,7 +1224,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (try $label$49 (result anyref)
+ ;; CHECK-BIN-NEXT: (try (result anyref)
;; CHECK-BIN-NEXT: (do
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: )
@@ -1237,11 +1237,11 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$50 (result eqref)
+ ;; CHECK-BIN-NEXT: (block $block13 (result eqref)
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$51 (result i32)
- ;; CHECK-BIN-NEXT: (br $label$50
- ;; CHECK-BIN-NEXT: (try_table (result eqref) (catch $e-i32 $label$51)
+ ;; CHECK-BIN-NEXT: (block $block12 (result i32)
+ ;; CHECK-BIN-NEXT: (br $block13
+ ;; CHECK-BIN-NEXT: (try_table (result eqref) (catch $e-i32 $block12)
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -1251,11 +1251,11 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$53 (result funcref)
+ ;; CHECK-BIN-NEXT: (block $block15 (result funcref)
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$54 (result i32)
- ;; CHECK-BIN-NEXT: (br $label$53
- ;; CHECK-BIN-NEXT: (try_table (result funcref) (catch $e-i32 $label$54)
+ ;; CHECK-BIN-NEXT: (block $block14 (result i32)
+ ;; CHECK-BIN-NEXT: (br $block15
+ ;; CHECK-BIN-NEXT: (try_table (result funcref) (catch $e-i32 $block14)
;; CHECK-BIN-NEXT: (ref.func $foo)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -1265,11 +1265,11 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$56 (result anyref)
+ ;; CHECK-BIN-NEXT: (block $block17 (result anyref)
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$57 (result i32)
- ;; CHECK-BIN-NEXT: (br $label$56
- ;; CHECK-BIN-NEXT: (try_table (result anyref) (catch $e-i32 $label$57)
+ ;; CHECK-BIN-NEXT: (block $block16 (result i32)
+ ;; CHECK-BIN-NEXT: (br $block17
+ ;; CHECK-BIN-NEXT: (try_table (result anyref) (catch $e-i32 $block16)
;; CHECK-BIN-NEXT: (local.get $local_eqref)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -1279,11 +1279,11 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$59 (result anyref)
+ ;; CHECK-BIN-NEXT: (block $block19 (result anyref)
;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (block $label$60 (result i32)
- ;; CHECK-BIN-NEXT: (br $label$59
- ;; CHECK-BIN-NEXT: (try_table (result anyref) (catch $e-i32 $label$60)
+ ;; CHECK-BIN-NEXT: (block $block18 (result i32)
+ ;; CHECK-BIN-NEXT: (br $block19
+ ;; CHECK-BIN-NEXT: (try_table (result anyref) (catch $e-i32 $block18)
;; CHECK-BIN-NEXT: (ref.null none)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -2281,25 +2281,25 @@
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result eqref)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result eqref)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$2
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block1
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2 (result eqref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.cast nullref
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block2
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2307,25 +2307,25 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$4 (result funcref)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$4
+;; CHECK-BIN-NODEBUG-NEXT: (block $block3 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block3
;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$5 (result funcref)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$5
+;; CHECK-BIN-NODEBUG-NEXT: (block $block4 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block4
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$6 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block5 (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.cast nullfuncref
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$6
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block5
;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2333,9 +2333,9 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$7 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block6 (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.cast (ref $3)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$7
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block6
;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2343,25 +2343,25 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$8 (result anyref)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$8
+;; CHECK-BIN-NODEBUG-NEXT: (block $block7 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block7
;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$9 (result anyref)
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$9
+;; CHECK-BIN-NODEBUG-NEXT: (block $block8 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block8
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$10 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block9 (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.cast nullref
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$10
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block9
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2369,9 +2369,9 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$11 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block10 (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.cast eqref
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$11
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block10
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2379,9 +2379,9 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$12 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block11 (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.cast nullref
-;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$12
+;; CHECK-BIN-NODEBUG-NEXT: (br_if $block11
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2389,67 +2389,67 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$13 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result eqref)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$14 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result eqref)
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$15 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result eqref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$16 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$17 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$18 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$19 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$20 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$21 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$22 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$23 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$24 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$25 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2522,7 +2522,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$40 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (try (result eqref)
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2535,7 +2535,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$43 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (try (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2548,7 +2548,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$46 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (try (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2561,7 +2561,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (try $label$49 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (try (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (do
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2574,11 +2574,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$50 (result eqref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block13 (result eqref)
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$51 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$50
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (result eqref) (catch $tag$0 $label$51)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block12 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block13
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (result eqref) (catch $tag$0 $block12)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2588,11 +2588,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$53 (result funcref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block15 (result funcref)
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$54 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$53
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (result funcref) (catch $tag$0 $label$54)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block14 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block15
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (result funcref) (catch $tag$0 $block14)
;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2602,11 +2602,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$56 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block17 (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$57 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$56
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (result anyref) (catch $tag$0 $label$57)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block16 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block17
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (result anyref) (catch $tag$0 $block16)
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2616,11 +2616,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$59 (result anyref)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block19 (result anyref)
;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$60 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$59
-;; CHECK-BIN-NODEBUG-NEXT: (try_table (result anyref) (catch $tag$0 $label$60)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block18 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block19
+;; CHECK-BIN-NODEBUG-NEXT: (try_table (result anyref) (catch $tag$0 $block18)
;; CHECK-BIN-NODEBUG-NEXT: (ref.null none)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/basic/reg_switch.wast b/test/lit/basic/reg_switch.wast
index db7494511..a1d00e8aa 100644
--- a/test/lit/basic/reg_switch.wast
+++ b/test/lit/basic/reg_switch.wast
@@ -35,8 +35,8 @@
;; CHECK-BIN-NEXT: (if
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (block $label$2
- ;; CHECK-BIN-NEXT: (br_table $label$2
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (br_table $block
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -47,8 +47,8 @@
;; CHECK-BIN-NODEBUG-NEXT: (if
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: (then
- ;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
- ;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$2
+ ;; CHECK-BIN-NODEBUG-NEXT: (block $block
+ ;; CHECK-BIN-NODEBUG-NEXT: (br_table $block
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/basic/typed_continuations_resume.wast b/test/lit/basic/typed_continuations_resume.wast
index 5cd2277d3..07afb9388 100644
--- a/test/lit/basic/typed_continuations_resume.wast
+++ b/test/lit/basic/typed_continuations_resume.wast
@@ -61,31 +61,28 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $go (type $3) (param $x (ref $ct)) (result i32)
- ;; CHECK-BIN-NEXT: (local $1 (tuple i32 (ref $ct)))
- ;; CHECK-BIN-NEXT: (local $2 i32)
- ;; CHECK-BIN-NEXT: (local.set $1
- ;; CHECK-BIN-NEXT: (block $label$1 (type $2) (result i32 (ref $ct))
- ;; CHECK-BIN-NEXT: (return
- ;; CHECK-BIN-NEXT: (resume $ct (on $t $label$1)
- ;; CHECK-BIN-NEXT: (i32.const 123)
- ;; CHECK-BIN-NEXT: (local.get $x)
+ ;; CHECK-BIN-NEXT: (local $scratch (tuple i32 (ref $ct)))
+ ;; CHECK-BIN-NEXT: (local $scratch_2 i32)
+ ;; CHECK-BIN-NEXT: (local.set $scratch_2
+ ;; CHECK-BIN-NEXT: (tuple.extract 2 0
+ ;; CHECK-BIN-NEXT: (local.tee $scratch
+ ;; CHECK-BIN-NEXT: (block $block (type $2) (result i32 (ref $ct))
+ ;; CHECK-BIN-NEXT: (return
+ ;; CHECK-BIN-NEXT: (resume $ct (on $t $block)
+ ;; CHECK-BIN-NEXT: (i32.const 123)
+ ;; CHECK-BIN-NEXT: (local.get $x)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $2
- ;; CHECK-BIN-NEXT: (tuple.extract 2 0
- ;; CHECK-BIN-NEXT: (local.get $1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (tuple.extract 2 1
- ;; CHECK-BIN-NEXT: (local.get $1)
- ;; 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: (local.get $2)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NEXT: )
(func $go (param $x (ref $ct)) (result i32)
(tuple.extract 2 0
@@ -135,29 +132,26 @@
;; CHECK-BIN-NODEBUG: (tag $tag$0 (param i32) (result i32))
;; CHECK-BIN-NODEBUG: (func $0 (type $3) (param $0 (ref $1)) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local $1 (tuple i32 (ref $1)))
-;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (type $2) (result i32 (ref $1))
-;; CHECK-BIN-NODEBUG-NEXT: (return
-;; CHECK-BIN-NODEBUG-NEXT: (resume $1 (on $tag$0 $label$1)
-;; CHECK-BIN-NODEBUG-NEXT: (i32.const 123)
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch (tuple i32 (ref $1)))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_2 i32)
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_2
+;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (type $2) (result i32 (ref $1))
+;; CHECK-BIN-NODEBUG-NEXT: (return
+;; CHECK-BIN-NODEBUG-NEXT: (resume $1 (on $tag$0 $block)
+;; CHECK-BIN-NODEBUG-NEXT: (i32.const 123)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $2
-;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
-;; 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 $1)
-;; 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: (local.get $2)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/basic/types-function-references.wast b/test/lit/basic/types-function-references.wast
index 9500fa4c9..8997e1a3a 100644
--- a/test/lit/basic/types-function-references.wast
+++ b/test/lit/basic/types-function-references.wast
@@ -192,37 +192,36 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $type-only-in-tuple-block (type $void)
- ;; CHECK-BIN-NEXT: (local $0 (tuple i32 (ref null $mixed_results) f64))
- ;; CHECK-BIN-NEXT: (local $1 (ref null $mixed_results))
- ;; CHECK-BIN-NEXT: (local $2 i32)
- ;; CHECK-BIN-NEXT: (local.set $0
- ;; CHECK-BIN-NEXT: (block $label$1 (type $3) (result i32 (ref null $mixed_results) f64)
- ;; CHECK-BIN-NEXT: (unreachable)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (local $scratch (tuple i32 (ref null $mixed_results) f64))
+ ;; CHECK-BIN-NEXT: (local $scratch_1 (ref null $mixed_results))
+ ;; CHECK-BIN-NEXT: (local $scratch_2 i32)
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (block (result i32)
- ;; CHECK-BIN-NEXT: (local.set $2
+ ;; CHECK-BIN-NEXT: (local.set $scratch_2
;; CHECK-BIN-NEXT: (tuple.extract 3 0
- ;; CHECK-BIN-NEXT: (local.get $0)
+ ;; CHECK-BIN-NEXT: (local.tee $scratch
+ ;; CHECK-BIN-NEXT: (block (type $3) (result i32 (ref null $mixed_results) f64)
+ ;; CHECK-BIN-NEXT: (unreachable)
+ ;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (block (result (ref null $mixed_results))
- ;; CHECK-BIN-NEXT: (local.set $1
+ ;; CHECK-BIN-NEXT: (local.set $scratch_1
;; CHECK-BIN-NEXT: (tuple.extract 3 1
- ;; CHECK-BIN-NEXT: (local.get $0)
+ ;; 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 $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: (local.get $2)
+ ;; CHECK-BIN-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -423,37 +422,36 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $8 (type $2)
-;; CHECK-BIN-NODEBUG-NEXT: (local $0 (tuple i32 (ref null $0) f64))
-;; CHECK-BIN-NODEBUG-NEXT: (local $1 (ref null $0))
-;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (type $3) (result i32 (ref null $0) f64)
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch (tuple i32 (ref null $0) f64))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_1 (ref null $0))
+;; CHECK-BIN-NODEBUG-NEXT: (local $scratch_2 i32)
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $2
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_2
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 0
-;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
+;; CHECK-BIN-NODEBUG-NEXT: (local.tee $scratch
+;; CHECK-BIN-NODEBUG-NEXT: (block (type $3) (result i32 (ref null $0) f64)
+;; 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: (block (result (ref null $0))
-;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
+;; CHECK-BIN-NODEBUG-NEXT: (local.set $scratch_1
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 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: (drop
;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 3 2
-;; 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: (local.get $2)
+;; CHECK-BIN-NODEBUG-NEXT: (local.get $scratch_2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/basic/unit.wat b/test/lit/basic/unit.wat
index 5846febd5..43901e3bc 100644
--- a/test/lit/basic/unit.wat
+++ b/test/lit/basic/unit.wat
@@ -215,7 +215,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $importedDoubles (type $4) (result f64)
;; CHECK-BIN-NEXT: (local $temp f64)
- ;; CHECK-BIN-NEXT: (block $label$1 (result f64)
+ ;; CHECK-BIN-NEXT: (block $block (result f64)
;; CHECK-BIN-NEXT: (local.set $temp
;; CHECK-BIN-NEXT: (f64.add
;; CHECK-BIN-NEXT: (f64.add
@@ -248,7 +248,7 @@
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block
;; CHECK-BIN-NEXT: (f64.const -3.4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -261,7 +261,7 @@
;; CHECK-BIN-NEXT: (f64.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block
;; CHECK-BIN-NEXT: (f64.const 5.6)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -381,14 +381,14 @@
;; CHECK-BIN-NEXT: (local $t f64)
;; CHECK-BIN-NEXT: (local $Int f64)
;; CHECK-BIN-NEXT: (local $Double i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result f64)
+ ;; CHECK-BIN-NEXT: (block $block (result f64)
;; CHECK-BIN-NEXT: (if
;; CHECK-BIN-NEXT: (f64.gt
;; CHECK-BIN-NEXT: (local.get $x)
;; CHECK-BIN-NEXT: (f64.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block
;; CHECK-BIN-NEXT: (f64.const 1.2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -399,7 +399,7 @@
;; CHECK-BIN-NEXT: (f64.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block
;; CHECK-BIN-NEXT: (f64.const -3.4)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -410,7 +410,7 @@
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block
;; CHECK-BIN-NEXT: (f64.const 5.6)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -421,7 +421,7 @@
;; CHECK-BIN-NEXT: (local.get $y)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (then
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block
;; CHECK-BIN-NEXT: (local.get $x)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -628,13 +628,13 @@
;; CHECK-BIN-NEXT: (local $J f64)
;; CHECK-BIN-NEXT: (local.set $J
;; CHECK-BIN-NEXT: (f64.sub
- ;; CHECK-BIN-NEXT: (block $label$1 (result f64)
+ ;; CHECK-BIN-NEXT: (block (result f64)
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (f64.const 0.1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (f64.const 5.1)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$2 (result f64)
+ ;; CHECK-BIN-NEXT: (block (result f64)
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (f64.const 3.2)
;; CHECK-BIN-NEXT: )
@@ -749,77 +749,80 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $switcher (type $6) (param $x i32) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
- ;; CHECK-BIN-NEXT: (block $label$2
- ;; CHECK-BIN-NEXT: (block $label$3
- ;; CHECK-BIN-NEXT: (block $label$4
- ;; CHECK-BIN-NEXT: (block $label$5
- ;; CHECK-BIN-NEXT: (br_table $label$5 $label$4 $label$3
+ ;; CHECK-BIN-NEXT: (block $block3 (result i32)
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (block $block2
+ ;; CHECK-BIN-NEXT: (block $block1
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (br_table $block $block1 $block2
;; CHECK-BIN-NEXT: (i32.sub
;; CHECK-BIN-NEXT: (local.get $x)
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block3
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block3
;; CHECK-BIN-NEXT: (i32.const 2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (nop)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$6
- ;; CHECK-BIN-NEXT: (block $label$7
- ;; CHECK-BIN-NEXT: (block $label$8
- ;; CHECK-BIN-NEXT: (block $label$9
- ;; CHECK-BIN-NEXT: (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (block $block5
+ ;; CHECK-BIN-NEXT: (block $block4
+ ;; CHECK-BIN-NEXT: (block $block6
+ ;; CHECK-BIN-NEXT: (br_table $block4 $block5 $block5 $block5 $block5 $block5 $block5 $block6 $block5
;; CHECK-BIN-NEXT: (i32.sub
;; CHECK-BIN-NEXT: (local.get $x)
;; CHECK-BIN-NEXT: (i32.const 5)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block3
;; CHECK-BIN-NEXT: (i32.const 121)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1
+ ;; CHECK-BIN-NEXT: (br $block3
;; CHECK-BIN-NEXT: (i32.const 51)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (nop)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$10
- ;; CHECK-BIN-NEXT: (block $label$11
- ;; CHECK-BIN-NEXT: (block $label$12
- ;; CHECK-BIN-NEXT: (block $label$13
- ;; CHECK-BIN-NEXT: (block $label$14
- ;; CHECK-BIN-NEXT: (block $label$15
- ;; CHECK-BIN-NEXT: (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11
+ ;; CHECK-BIN-NEXT: (block $block12
+ ;; CHECK-BIN-NEXT: (block $block8
+ ;; CHECK-BIN-NEXT: (block $block7
+ ;; CHECK-BIN-NEXT: (block $block9
+ ;; CHECK-BIN-NEXT: (block $block10
+ ;; CHECK-BIN-NEXT: (block $block11
+ ;; CHECK-BIN-NEXT: (br_table $block7 $block8 $block8 $block9 $block8 $block8 $block8 $block8 $block10 $block8 $block11 $block8
;; CHECK-BIN-NEXT: (i32.sub
;; CHECK-BIN-NEXT: (local.get $x)
;; CHECK-BIN-NEXT: (i32.const 2)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$10)
+ ;; CHECK-BIN-NEXT: (br $block12)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$10)
+ ;; CHECK-BIN-NEXT: (br $block12)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$16
- ;; CHECK-BIN-NEXT: (loop $label$17
- ;; CHECK-BIN-NEXT: (br $label$16)
+ ;; CHECK-BIN-NEXT: (block $block13
+ ;; CHECK-BIN-NEXT: (loop
+ ;; CHECK-BIN-NEXT: (br $block13)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (block $label$18
- ;; CHECK-BIN-NEXT: (loop $label$19
- ;; CHECK-BIN-NEXT: (br $label$10)
+ ;; CHECK-BIN-NEXT: (block
+ ;; CHECK-BIN-NEXT: (loop
+ ;; CHECK-BIN-NEXT: (br $block12)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (nop)
;; CHECK-BIN-NEXT: )
@@ -918,8 +921,8 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $blocker (type $FUNCSIG$v)
- ;; CHECK-BIN-NEXT: (block $label$1
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (block $block
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $blocker (type $FUNCSIG$v)
@@ -1115,7 +1118,7 @@
;; CHECK-BIN-NEXT: (local $y f64)
;; CHECK-BIN-NEXT: (local $z f32)
;; CHECK-BIN-NEXT: (local.set $x
- ;; CHECK-BIN-NEXT: (block $label$1 (result i32)
+ ;; CHECK-BIN-NEXT: (block (result i32)
;; CHECK-BIN-NEXT: (local.set $asm2wasm_i32_temp
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
@@ -1337,11 +1340,11 @@
;; CHECK-TEXT-NEXT: (i32.const 0)
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $block_and_after (type $5) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1
+ ;; CHECK-BIN-NEXT: (block $block
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (i32.const 0)
;; CHECK-BIN-NEXT: )
@@ -1363,7 +1366,7 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $loop-roundtrip (type $7) (param $0 f64) (result f64)
- ;; CHECK-BIN-NEXT: (loop $label$1 (result f64)
+ ;; CHECK-BIN-NEXT: (loop (result f64)
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (local.get $0)
;; CHECK-BIN-NEXT: )
@@ -1514,11 +1517,11 @@
;; CHECK-TEXT-NEXT: (i32.const 1)
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $unreachable-block-with-br (type $5) (result i32)
- ;; CHECK-BIN-NEXT: (block $label$1
+ ;; CHECK-BIN-NEXT: (block $block
;; CHECK-BIN-NEXT: (drop
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
@@ -1560,6 +1563,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $unreachable-if (result i32)
(f64.abs
@@ -1603,6 +1607,7 @@
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $unreachable-if-toplevel (result i32)
(if ;; note no type - valid in binaryen IR, in wasm must be i32
@@ -1626,12 +1631,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $unreachable-loop (type $5) (result i32)
- ;; CHECK-BIN-NEXT: (loop $label$1
+ ;; CHECK-BIN-NEXT: (loop
;; CHECK-BIN-NEXT: (nop)
;; CHECK-BIN-NEXT: (return
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $unreachable-loop (result i32)
(f64.abs
@@ -1651,11 +1657,12 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $unreachable-loop0 (type $5) (result i32)
- ;; CHECK-BIN-NEXT: (loop $label$1
+ ;; CHECK-BIN-NEXT: (loop
;; CHECK-BIN-NEXT: (return
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $unreachable-loop0 (result i32)
(f64.abs
@@ -1673,12 +1680,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $unreachable-loop-toplevel (type $5) (result i32)
- ;; CHECK-BIN-NEXT: (loop $label$1
+ ;; CHECK-BIN-NEXT: (loop
;; CHECK-BIN-NEXT: (nop)
;; CHECK-BIN-NEXT: (return
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $unreachable-loop-toplevel (result i32)
(loop ;; note no type - valid in binaryen IR, in wasm must be i32
@@ -1694,11 +1702,12 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $unreachable-loop0-toplevel (type $5) (result i32)
- ;; CHECK-BIN-NEXT: (loop $label$1
+ ;; CHECK-BIN-NEXT: (loop
;; CHECK-BIN-NEXT: (return
;; CHECK-BIN-NEXT: (i32.const 1)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $unreachable-loop0-toplevel (result i32)
(loop ;; note no type - valid in binaryen IR, in wasm must be i32
@@ -1870,7 +1879,7 @@
;; CHECK-BIN-NODEBUG: (func $1 (type $3) (result f64)
;; CHECK-BIN-NODEBUG-NEXT: (local $0 f64)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f64)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result f64)
;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
;; CHECK-BIN-NODEBUG-NEXT: (f64.add
;; CHECK-BIN-NODEBUG-NEXT: (f64.add
@@ -1903,7 +1912,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block
;; CHECK-BIN-NODEBUG-NEXT: (f64.const -3.4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1916,7 +1925,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.6)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1929,14 +1938,14 @@
;; CHECK-BIN-NODEBUG-NEXT: (local $2 f64)
;; CHECK-BIN-NODEBUG-NEXT: (local $3 f64)
;; CHECK-BIN-NODEBUG-NEXT: (local $4 i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f64)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block (result f64)
;; CHECK-BIN-NODEBUG-NEXT: (if
;; CHECK-BIN-NODEBUG-NEXT: (f64.gt
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 1.2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1947,7 +1956,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block
;; CHECK-BIN-NODEBUG-NEXT: (f64.const -3.4)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1958,7 +1967,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.6)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -1969,7 +1978,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (local.get $1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (then
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2025,13 +2034,13 @@
;; CHECK-BIN-NODEBUG-NEXT: (local $0 f64)
;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
;; CHECK-BIN-NODEBUG-NEXT: (f64.sub
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f64)
+;; CHECK-BIN-NODEBUG-NEXT: (block (result f64)
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0.1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.1)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result f64)
+;; CHECK-BIN-NODEBUG-NEXT: (block (result f64)
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (f64.const 3.2)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2042,77 +2051,80 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $7 (type $6) (param $0 i32) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$4
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$5
-;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$5 $label$4 $label$3
+;; CHECK-BIN-NODEBUG-NEXT: (block $block3 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (block $block2
+;; CHECK-BIN-NODEBUG-NEXT: (block $block1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (br_table $block $block1 $block2
;; CHECK-BIN-NODEBUG-NEXT: (i32.sub
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block3
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block3
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (nop)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$6
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$7
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$8
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$9
-;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (block $block5
+;; CHECK-BIN-NODEBUG-NEXT: (block $block4
+;; CHECK-BIN-NODEBUG-NEXT: (block $block6
+;; CHECK-BIN-NODEBUG-NEXT: (br_table $block4 $block5 $block5 $block5 $block5 $block5 $block5 $block6 $block5
;; CHECK-BIN-NODEBUG-NEXT: (i32.sub
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 5)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block3
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 121)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (br $block3
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 51)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (nop)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$10
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$11
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$12
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$13
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$14
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$15
-;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11
+;; CHECK-BIN-NODEBUG-NEXT: (block $block12
+;; CHECK-BIN-NODEBUG-NEXT: (block $block8
+;; CHECK-BIN-NODEBUG-NEXT: (block $block7
+;; CHECK-BIN-NODEBUG-NEXT: (block $block9
+;; CHECK-BIN-NODEBUG-NEXT: (block $block10
+;; CHECK-BIN-NODEBUG-NEXT: (block $block11
+;; CHECK-BIN-NODEBUG-NEXT: (br_table $block7 $block8 $block8 $block9 $block8 $block8 $block8 $block8 $block10 $block8 $block11 $block8
;; CHECK-BIN-NODEBUG-NEXT: (i32.sub
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$10)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block12)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$10)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block12)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$16
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$17
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$16)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block13
+;; CHECK-BIN-NODEBUG-NEXT: (loop
+;; CHECK-BIN-NODEBUG-NEXT: (br $block13)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$18
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$19
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$10)
+;; CHECK-BIN-NODEBUG-NEXT: (block
+;; CHECK-BIN-NODEBUG-NEXT: (loop
+;; CHECK-BIN-NODEBUG-NEXT: (br $block12)
;; 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: (nop)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2121,8 +2133,8 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $8 (type $1)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2182,7 +2194,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (local $2 f64)
;; CHECK-BIN-NODEBUG-NEXT: (local $3 f32)
;; CHECK-BIN-NODEBUG-NEXT: (local.set $0
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32)
+;; CHECK-BIN-NODEBUG-NEXT: (block (result i32)
;; CHECK-BIN-NODEBUG-NEXT: (local.set $1
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2265,17 +2277,17 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $19 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $20 (type $7) (param $0 f64) (result f64)
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1 (result f64)
+;; CHECK-BIN-NODEBUG-NEXT: (loop (result f64)
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (local.get $0)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2331,11 +2343,11 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $28 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
;; CHECK-BIN-NODEBUG-NEXT: (drop
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
@@ -2354,6 +2366,7 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $30 (type $0) (result i32)
@@ -2370,40 +2383,45 @@
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $31 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (loop
;; CHECK-BIN-NODEBUG-NEXT: (nop)
;; CHECK-BIN-NODEBUG-NEXT: (return
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $32 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (loop
;; CHECK-BIN-NODEBUG-NEXT: (return
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $33 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (loop
;; CHECK-BIN-NODEBUG-NEXT: (nop)
;; CHECK-BIN-NODEBUG-NEXT: (return
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $34 (type $0) (result i32)
-;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (loop
;; CHECK-BIN-NODEBUG-NEXT: (return
;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $35 (type $1)
diff --git a/test/lit/basic/unreachable-code.wast b/test/lit/basic/unreachable-code.wast
index 0dfb00c40..baf156496 100644
--- a/test/lit/basic/unreachable-code.wast
+++ b/test/lit/basic/unreachable-code.wast
@@ -59,6 +59,7 @@
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $b
(if (i32.const 1)
@@ -118,6 +119,7 @@
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $b-block
(block
@@ -186,6 +188,7 @@
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $b-prepost
(nop)
@@ -260,6 +263,7 @@
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
(func $b-block-prepost
(nop)
@@ -289,9 +293,9 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $recurse (type $0)
;; CHECK-BIN-NEXT: (nop)
- ;; CHECK-BIN-NEXT: (block $label$1
+ ;; CHECK-BIN-NEXT: (block $block
;; CHECK-BIN-NEXT: (nop)
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (nop)
;; CHECK-BIN-NEXT: )
@@ -319,12 +323,13 @@
;; CHECK-TEXT-NEXT: )
;; CHECK-TEXT-NEXT: )
;; CHECK-BIN: (func $recurse-b (type $0)
- ;; CHECK-BIN-NEXT: (block $label$1
+ ;; CHECK-BIN-NEXT: (block $block
;; CHECK-BIN-NEXT: (nop)
- ;; CHECK-BIN-NEXT: (block $label$2
+ ;; CHECK-BIN-NEXT: (block
;; CHECK-BIN-NEXT: (nop)
- ;; CHECK-BIN-NEXT: (br $label$1)
+ ;; CHECK-BIN-NEXT: (br $block)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
(func $recurse-b
@@ -360,6 +365,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $2 (type $0)
@@ -381,6 +387,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $4 (type $0)
@@ -405,6 +412,7 @@
;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $6 (type $0)
@@ -429,23 +437,25 @@
;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $8 (type $0)
;; CHECK-BIN-NODEBUG-NEXT: (nop)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
;; CHECK-BIN-NODEBUG-NEXT: (nop)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (nop)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG: (func $9 (type $0)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$1
+;; CHECK-BIN-NODEBUG-NEXT: (block $block
;; CHECK-BIN-NODEBUG-NEXT: (nop)
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$2
+;; CHECK-BIN-NODEBUG-NEXT: (block
;; CHECK-BIN-NODEBUG-NEXT: (nop)
-;; CHECK-BIN-NODEBUG-NEXT: (br $label$1)
+;; CHECK-BIN-NODEBUG-NEXT: (br $block)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/basic/untaken-br_if.wast b/test/lit/basic/untaken-br_if.wast
index bf2ad1ce3..4d9826549 100644
--- a/test/lit/basic/untaken-br_if.wast
+++ b/test/lit/basic/untaken-br_if.wast
@@ -37,12 +37,10 @@
;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: (else
- ;; CHECK-BIN-NEXT: (block $label$3 (result f32)
- ;; CHECK-BIN-NEXT: (drop
- ;; CHECK-BIN-NEXT: (f32.const 1)
- ;; CHECK-BIN-NEXT: )
- ;; CHECK-BIN-NEXT: (unreachable)
+ ;; CHECK-BIN-NEXT: (drop
+ ;; CHECK-BIN-NEXT: (f32.const 1)
;; CHECK-BIN-NEXT: )
+ ;; CHECK-BIN-NEXT: (unreachable)
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
;; CHECK-BIN-NEXT: )
@@ -72,12 +70,10 @@
;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: (else
-;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (result f32)
-;; CHECK-BIN-NODEBUG-NEXT: (drop
-;; CHECK-BIN-NODEBUG-NEXT: (f32.const 1)
-;; CHECK-BIN-NODEBUG-NEXT: )
-;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
+;; CHECK-BIN-NODEBUG-NEXT: (drop
+;; CHECK-BIN-NODEBUG-NEXT: (f32.const 1)
;; CHECK-BIN-NODEBUG-NEXT: )
+;; CHECK-BIN-NODEBUG-NEXT: (unreachable)
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
;; CHECK-BIN-NODEBUG-NEXT: )
diff --git a/test/lit/binary/bad-delegate.test b/test/lit/binary/bad-delegate.test
deleted file mode 100644
index 8e6a011a5..000000000
--- a/test/lit/binary/bad-delegate.test
+++ /dev/null
@@ -1,17 +0,0 @@
-;; Test that we error properly on a file with a bad delegate (a delegate of an
-;; index that does not refer to a valid try-catch).
-
-;; Disassembled binary from wabt:
-;;
-;; (module
-;; (type (;0;) (func))
-;; (func (;0;) (type 0)
-;; block ;; label = @1
-;; try ;; label = @2
-;; nop
-;; delegate 0
-;; end))
-
-;; RUN: not wasm-opt -all %s.wasm 2>&1 | filecheck %s
-
-;; CHECK: exceptionTargetNames not empty - invalid delegate
diff --git a/test/lit/binary/declarative-element-use-expr.test b/test/lit/binary/declarative-element-use-expr.test
index aecdf9ebd..fa0eb965f 100644
--- a/test/lit/binary/declarative-element-use-expr.test
+++ b/test/lit/binary/declarative-element-use-expr.test
@@ -13,16 +13,14 @@
;; preserve declarative segments. This is fine, as we test that the
;; binary parser can parse it correctly.
-;; RUN: wasm-opt -all %s.wasm -all --print | filecheck %s
+;; RUN: wasm-opt -all %s.wasm -S -o - | filecheck %s
;; CHECK: (module
;; CHECK-NEXT: (type $0 (func))
;; CHECK-NEXT: (elem declare func $0)
;; CHECK-NEXT: (func $0 (type $0)
-;; CHECK-NEXT: (block $label$1
-;; CHECK-NEXT: (drop
-;; CHECK-NEXT: (ref.func $0)
-;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (ref.func $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/binary/delegate-block.test b/test/lit/binary/delegate-block.test
new file mode 100644
index 000000000..7da386cb0
--- /dev/null
+++ b/test/lit/binary/delegate-block.test
@@ -0,0 +1,27 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+
+;; Test that we can parse a binary with a delegate that targets a block instead
+;; of a try-catch.
+
+;; Disassembled binary from wabt:
+;;
+;; (module
+;; (type (;0;) (func))
+;; (func (;0;) (type 0)
+;; block ;; label = @1
+;; try ;; label = @2
+;; nop
+;; delegate 0
+;; end))
+
+;; RUN: wasm-opt -all %s.wasm -S -o - | filecheck %s
+;; CHECK: (type $0 (func))
+
+;; CHECK: (func $0 (type $0)
+;; CHECK-NEXT: (try
+;; CHECK-NEXT: (do
+;; CHECK-NEXT: (nop)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (delegate 0)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
diff --git a/test/lit/binary/bad-delegate.test.wasm b/test/lit/binary/delegate-block.test.wasm
index db9645e35..db9645e35 100644
--- a/test/lit/binary/bad-delegate.test.wasm
+++ b/test/lit/binary/delegate-block.test.wasm
Binary files differ
diff --git a/test/lit/binary/dwarf-multivalue.test b/test/lit/binary/dwarf-multivalue.test
index c803dea14..250a861bf 100644
--- a/test/lit/binary/dwarf-multivalue.test
+++ b/test/lit/binary/dwarf-multivalue.test
@@ -39,8 +39,8 @@
;; (local $10 f32)
;; If we parse this wasm file into Binaryen IR, two locals are added in the
-;; process. Here $11 is added for tuple parsing and $12 is added for stacky IR
-;; resolving during binary reading process.
+;; process. Here $scratch is added for tuple parsing and $scratch_12 is added
+;; for stacky IR resolving during binary reading process.
;; RUN: wasm-dis %s.wasm -o - | filecheck %s --check-prefix=ORIG
;; ORIG: (func $test
;; ORIG-NEXT: (local $0 i32)
@@ -54,8 +54,8 @@
;; ORIG-NEXT: (local $8 f32)
;; ORIG-NEXT: (local $9 i32)
;; ORIG-NEXT: (local $10 f32)
-;; ORIG-NEXT: (local $11 (tuple i32 f32))
-;; ORIG-NEXT: (local $12 i32)
+;; ORIG-NEXT: (local $scratch (tuple i32 f32))
+;; ORIG-NEXT: (local $scratch_12 i32)
;; If we write this IR into binary, even if this cannot be displayed in the wast
;; format, the local order of $test will look like this, because we don't
@@ -92,11 +92,11 @@
;; ROUNDTRIP-NEXT: (local $8 f32)
;; ROUNDTRIP-NEXT: (local $9 i32)
;; ROUNDTRIP-NEXT: (local $10 f32)
-;; ROUNDTRIP-NEXT: (local $11 i32)
+;; ROUNDTRIP-NEXT: (local $scratch i32)
;; ROUNDTRIP-NEXT: (local $12 f32)
-;; ROUNDTRIP-NEXT: (local $13 i32)
-;; ROUNDTRIP-NEXT: (local $14 (tuple i32 f32))
-;; ROUNDTRIP-NEXT: (local $15 i32)
+;; ROUNDTRIP-NEXT: (local $scratch_12 i32)
+;; ROUNDTRIP-NEXT: (local $scratch_14 (tuple i32 f32))
+;; ROUNDTRIP-NEXT: (local $scratch_15 i32)
;; We can see that we don't reorder the locals during the process and the
;; original list of locals, local $0~$10, is untouched, to NOT invalidate DWARF
diff --git a/test/lit/binary/stacky-eh-legacy.test b/test/lit/binary/stacky-eh-legacy.test
index c22a5165d..c77435f0b 100644
--- a/test/lit/binary/stacky-eh-legacy.test
+++ b/test/lit/binary/stacky-eh-legacy.test
@@ -1,3 +1,4 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; Verify stacky EH binary can be parsed correctly.
;;
;; stacky-eh-old.test.wasm contains below:
@@ -34,15 +35,21 @@
;; The fixup will hoist the 'pop' and create another local to store it right
;; after 'catch'.
-RUN: wasm-opt -all %s.wasm --print | filecheck %s
+;; RUN: wasm-opt -all %s.wasm -S -o - | filecheck %s
-;; CHECK: (func $0
+;; CHECK: (type $0 (func (param i32)))
+
+;; CHECK: (type $1 (func))
+
+;; CHECK: (tag $tag$0 (param i32))
+
+;; CHECK: (func $0 (type $1)
;; CHECK-NEXT: (local $0 i32)
;; CHECK-NEXT: (local $1 i32)
;; CHECK-NEXT: (local $2 i32)
-;; CHECK-NEXT: (local $3 i32)
+;; CHECK-NEXT: (local $scratch i32)
;; CHECK-NEXT: (local $4 i32)
-;; CHECK-NEXT: (try $label$3
+;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
@@ -52,13 +59,13 @@ RUN: wasm-opt -all %s.wasm --print | filecheck %s
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $2
;; CHECK-NEXT: (block (result i32)
-;; CHECK-NEXT: (local.set $3
+;; CHECK-NEXT: (local.set $scratch
;; CHECK-NEXT: (local.get $4)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
-;; CHECK-NEXT: (local.get $3)
+;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/binary/stacky-nn-tuple.test b/test/lit/binary/stacky-nn-tuple.test
index e8a0475b5..1f6b5bb59 100644
--- a/test/lit/binary/stacky-nn-tuple.test
+++ b/test/lit/binary/stacky-nn-tuple.test
@@ -1,112 +1,120 @@
-# Verify stacky non-nullable tuples binary can be parsed correctly. The wasm
-# contains code that uses pops to get a tuple and store it in a local, then
-# reads those values. The file contains this:
-#
-# (module
-# (type $A (struct (field (mut i32))))
-# (type $B (struct (field (mut i32)) (field (mut i32))))
-# (tag $tag$0 (param (ref $A) (ref $B)))
-# (func $foo
-# (local $temp ((ref null $A) (ref null $B)))
-# (try $label$3
-# (do
-# (nop)
-# )
-# (catch $tag$0
-# (local.set $temp
-# (pop (ref $A) (ref $B))
-# )
-# (drop
-# (ref.as_non_null
-# (tuple.extract 0
-# (local.get $temp)
-# )
-# )
-# )
-# (drop
-# (ref.as_non_null
-# (tuple.extract 1
-# (local.get $temp)
-# )
-# )
-# )
-# (unreachable)
-# )
-# )
-# )
-# )
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+;; Verify stacky non-nullable tuples binary can be parsed correctly. The wasm
+;; contains code that uses pops to get a tuple and store it in a local, then
+;; reads those values. The file contains this:
+;;
+;; (module
+;; (type $A (struct (field (mut i32))))
+;; (type $B (struct (field (mut i32)) (field (mut i32))))
+;; (tag $tag$0 (param (ref $A) (ref $B)))
+;; (func $foo
+;; (local $temp ((ref null $A) (ref null $B)))
+;; (try $label$3
+;; (do
+;; (nop)
+;; )
+;; (catch $tag$0
+;; (local.set $temp
+;; (pop (ref $A) (ref $B))
+;; )
+;; (drop
+;; (ref.as_non_null
+;; (tuple.extract 0
+;; (local.get $temp)
+;; )
+;; )
+;; )
+;; (drop
+;; (ref.as_non_null
+;; (tuple.extract 1
+;; (local.get $temp)
+;; )
+;; )
+;; )
+;; (unreachable)
+;; )
+;; )
+;; )
+;; )
-RUN: wasm-opt -all %s.wasm -all --print
+;; RUN: wasm-opt -all %s.wasm -all -S -o - | filecheck %s
-# CHECK: (module
-# CHECK-NEXT: (type ${mut:i32} (struct (field (mut i32))))
-# CHECK-NEXT: (type ${mut:i32_mut:i32} (struct (field (mut i32)) (field (mut i32))))
-# CHECK-NEXT: (type $ref|{mut:i32}|_ref|{mut:i32_mut:i32}|_=>_none (func (param (ref ${mut:i32}) (ref ${mut:i32_mut:i32}))))
-# CHECK-NEXT: (type $none_=>_none (func))
-# CHECK-NEXT: (tag $tag$0 (param (ref ${mut:i32}) (ref ${mut:i32_mut:i32})))
-# CHECK-NEXT: (func $0
-# CHECK-NEXT: (local $0 (ref null ${mut:i32}))
-# CHECK-NEXT: (local $1 (ref null ${mut:i32_mut:i32}))
-# CHECK-NEXT: (local $2 (ref null ${mut:i32_mut:i32}))
-# CHECK-NEXT: (local $3 ((ref ${mut:i32}) (ref ${mut:i32_mut:i32})))
-# CHECK-NEXT: (local $4 (ref ${mut:i32}))
-# CHECK-NEXT: (local $5 (ref null ${mut:i32}))
-# CHECK-NEXT: (local $6 (ref null ${mut:i32}))
-# CHECK-NEXT: (try $label$3
-# CHECK-NEXT: (do
-# CHECK-NEXT: (nop)
-# CHECK-NEXT: )
-# CHECK-NEXT: (catch $tag$0
-# CHECK-NEXT: (local.set $3
-# CHECK-NEXT: (pop (ref ${mut:i32}) (ref ${mut:i32_mut:i32}))
-# CHECK-NEXT: )
-# CHECK-NEXT: (local.set $0
-# CHECK-NEXT: (block (result (ref ${mut:i32}))
-# CHECK-NEXT: (local.set $4
-# CHECK-NEXT: (tuple.extract 0
-# CHECK-NEXT: (local.get $3)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: (local.set $1
-# CHECK-NEXT: (tuple.extract 1
-# CHECK-NEXT: (local.get $3)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: (local.get $4)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: (drop
-# CHECK-NEXT: (ref.as_non_null
-# CHECK-NEXT: (block (result (ref null ${mut:i32}))
-# CHECK-NEXT: (local.set $5
-# CHECK-NEXT: (local.get $0)
-# CHECK-NEXT: )
-# CHECK-NEXT: (drop
-# CHECK-NEXT: (local.get $1)
-# CHECK-NEXT: )
-# CHECK-NEXT: (local.get $5)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: (drop
-# CHECK-NEXT: (block (result (ref null ${mut:i32}))
-# CHECK-NEXT: (local.set $6
-# CHECK-NEXT: (local.get $0)
-# CHECK-NEXT: )
-# CHECK-NEXT: (local.set $2
-# CHECK-NEXT: (local.get $1)
-# CHECK-NEXT: )
-# CHECK-NEXT: (local.get $6)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: (drop
-# CHECK-NEXT: (ref.as_non_null
-# CHECK-NEXT: (local.get $2)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: (unreachable)
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT: )
-# CHECK-NEXT:
+;; CHECK: (type $0 (struct (field (mut i32))))
+
+;; CHECK: (type $1 (struct (field (mut i32)) (field (mut i32))))
+
+;; CHECK: (type $2 (func (param (ref null $0) (ref null $1))))
+
+;; CHECK: (type $3 (func))
+
+;; CHECK: (tag $tag$0 (param (ref null $0) (ref null $1)))
+
+;; CHECK: (func $0 (type $3)
+;; CHECK-NEXT: (local $0 (ref null $0))
+;; CHECK-NEXT: (local $1 (ref null $1))
+;; CHECK-NEXT: (local $2 (ref null $1))
+;; CHECK-NEXT: (local $scratch (tuple (ref null $0) (ref null $1)))
+;; CHECK-NEXT: (local $scratch_4 (ref null $0))
+;; CHECK-NEXT: (local $scratch_5 (ref null $0))
+;; CHECK-NEXT: (local $scratch_6 (ref null $0))
+;; CHECK-NEXT: (local $7 (tuple (ref null $0) (ref null $1)))
+;; CHECK-NEXT: (try
+;; CHECK-NEXT: (do
+;; CHECK-NEXT: (nop)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (catch $tag$0
+;; CHECK-NEXT: (local.set $7
+;; CHECK-NEXT: (pop (tuple (ref null $0) (ref null $1)))
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (block
+;; CHECK-NEXT: (local.set $0
+;; CHECK-NEXT: (block (result (ref null $0))
+;; CHECK-NEXT: (local.set $scratch_4
+;; CHECK-NEXT: (tuple.extract 2 0
+;; CHECK-NEXT: (local.tee $scratch
+;; CHECK-NEXT: (local.get $7)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (local.set $1
+;; CHECK-NEXT: (tuple.extract 2 1
+;; CHECK-NEXT: (local.get $scratch)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (local.get $scratch_4)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (ref.as_non_null
+;; CHECK-NEXT: (block (result (ref null $0))
+;; CHECK-NEXT: (local.set $scratch_5
+;; CHECK-NEXT: (local.get $0)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (local.get $1)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (local.get $scratch_5)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (block (result (ref null $0))
+;; CHECK-NEXT: (local.set $scratch_6
+;; CHECK-NEXT: (local.get $0)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (local.set $2
+;; CHECK-NEXT: (local.get $1)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (local.get $scratch_6)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (ref.as_non_null
+;; CHECK-NEXT: (local.get $2)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
diff --git a/test/lit/blocktype.wast b/test/lit/blocktype.wast
index 0150f0a37..805d5d07e 100644
--- a/test/lit/blocktype.wast
+++ b/test/lit/blocktype.wast
@@ -25,30 +25,8 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; RTRIP: (func $f1 (type $f1) (result (ref $f1) (ref $f2))
- ;; RTRIP-NEXT: (local $0 (tuple (ref $f1) (ref $f2)))
- ;; RTRIP-NEXT: (local $1 (tuple (ref $f1) (ref $f2)))
- ;; RTRIP-NEXT: (local.set $1
- ;; RTRIP-NEXT: (loop $label$1 (type $f1) (result (ref $f1) (ref $f2))
- ;; RTRIP-NEXT: (local.set $0
- ;; RTRIP-NEXT: (call $f1)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.make 2
- ;; RTRIP-NEXT: (tuple.extract 2 0
- ;; RTRIP-NEXT: (local.get $0)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.extract 2 1
- ;; RTRIP-NEXT: (local.get $0)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.make 2
- ;; RTRIP-NEXT: (tuple.extract 2 0
- ;; RTRIP-NEXT: (local.get $1)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.extract 2 1
- ;; RTRIP-NEXT: (local.get $1)
- ;; RTRIP-NEXT: )
+ ;; RTRIP-NEXT: (loop (type $f1) (result (ref $f1) (ref $f2))
+ ;; RTRIP-NEXT: (call $f1)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: )
(func $f1 (type $f1) (result (ref $f1) (ref $f2))
@@ -64,30 +42,8 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; RTRIP: (func $f2 (type $f2) (result (ref $f2) (ref $f1))
- ;; RTRIP-NEXT: (local $0 (tuple (ref $f2) (ref $f1)))
- ;; RTRIP-NEXT: (local $1 (tuple (ref $f2) (ref $f1)))
- ;; RTRIP-NEXT: (local.set $1
- ;; RTRIP-NEXT: (loop $label$1 (type $f2) (result (ref $f2) (ref $f1))
- ;; RTRIP-NEXT: (local.set $0
- ;; RTRIP-NEXT: (call $f2)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.make 2
- ;; RTRIP-NEXT: (tuple.extract 2 0
- ;; RTRIP-NEXT: (local.get $0)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.extract 2 1
- ;; RTRIP-NEXT: (local.get $0)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.make 2
- ;; RTRIP-NEXT: (tuple.extract 2 0
- ;; RTRIP-NEXT: (local.get $1)
- ;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (tuple.extract 2 1
- ;; RTRIP-NEXT: (local.get $1)
- ;; RTRIP-NEXT: )
+ ;; RTRIP-NEXT: (loop (type $f2) (result (ref $f2) (ref $f1))
+ ;; RTRIP-NEXT: (call $f2)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: )
(func $f2 (type $f2) (result (ref $f2) (ref $f1))
diff --git a/test/lit/cast-and-recast-tuple.wast b/test/lit/cast-and-recast-tuple.wast
index 3febcbff7..6ceefe7d6 100644
--- a/test/lit/cast-and-recast-tuple.wast
+++ b/test/lit/cast-and-recast-tuple.wast
@@ -16,46 +16,34 @@
(type $B (sub $A (struct)))
)
- ;; CHECK: (func $test-local-tuple-1 (type $5) (param $B (ref $B)) (param $x i32) (result anyref i32)
- ;; CHECK-NEXT: (local $2 (tuple (ref $B) i32))
- ;; CHECK-NEXT: (local $3 (ref $B))
- ;; CHECK-NEXT: (local $4 (tuple (ref $A) i32))
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (block $label$1 (type $3) (result (ref $A) i32)
- ;; CHECK-NEXT: (local.set $2
- ;; CHECK-NEXT: (br_if $label$1
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (local.get $B)
- ;; CHECK-NEXT: (i32.const 3)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $x)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $2)
+ ;; CHECK: (func $test-local-tuple-1 (type $3) (param $B (ref $B)) (param $x i32) (result anyref i32)
+ ;; CHECK-NEXT: (local $scratch (tuple (ref $B) i32))
+ ;; CHECK-NEXT: (local $scratch_3 (ref $B))
+ ;; CHECK-NEXT: (block $block (type $2) (result (ref $A) i32)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_3
+ ;; CHECK-NEXT: (tuple.extract 2 0
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (br_if $block
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (local.get $B)
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $2)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (tuple.extract 2 1
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $3)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_3)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $4)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test-local-tuple-1 (param $B (ref $B)) (param $x i32) (result anyref i32)
@@ -77,48 +65,36 @@
)
)
- ;; CHECK: (func $test-local-tuple-2 (type $9) (param $B (ref $B)) (param $x i32) (result i32 i32)
+ ;; CHECK: (func $test-local-tuple-2 (type $7) (param $B (ref $B)) (param $x i32) (result i32 i32)
;; CHECK-NEXT: (local $temp i32)
;; CHECK-NEXT: (local $3 i32)
- ;; CHECK-NEXT: (local $4 (tuple i32 i32))
- ;; CHECK-NEXT: (local $5 i32)
- ;; CHECK-NEXT: (local $6 (tuple i32 i32))
- ;; CHECK-NEXT: (local.set $6
- ;; CHECK-NEXT: (block $label$1 (type $4) (result i32 i32)
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (br_if $label$1
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (i32.const -1)
- ;; CHECK-NEXT: (i32.const 3)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $x)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $temp
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $5
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i32))
+ ;; CHECK-NEXT: (local $scratch_5 i32)
+ ;; CHECK-NEXT: (block $block (type $4) (result i32 i32)
+ ;; CHECK-NEXT: (local.set $temp
+ ;; CHECK-NEXT: (block (result i32)
+ ;; CHECK-NEXT: (local.set $scratch_5
+ ;; CHECK-NEXT: (tuple.extract 2 0
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (br_if $block
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (i32.const -1)
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (tuple.extract 2 1
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $5)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_5)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $6)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test-local-tuple-2 (param $B (ref $B)) (param $x i32) (result i32 i32)
@@ -139,48 +115,36 @@
)
)
- ;; CHECK: (func $test-local-tuple-3 (type $5) (param $B (ref $B)) (param $x i32) (result anyref i32)
+ ;; CHECK: (func $test-local-tuple-3 (type $3) (param $B (ref $B)) (param $x i32) (result anyref i32)
;; CHECK-NEXT: (local $temp (ref $B))
;; CHECK-NEXT: (local $3 i32)
- ;; CHECK-NEXT: (local $4 (tuple (ref $B) i32))
- ;; CHECK-NEXT: (local $5 (ref $B))
- ;; CHECK-NEXT: (local $6 (tuple (ref $B) i32))
- ;; CHECK-NEXT: (local.set $6
- ;; CHECK-NEXT: (block $label$1 (type $6) (result (ref $B) i32)
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (br_if $label$1
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (local.get $B)
- ;; CHECK-NEXT: (i32.const 3)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $x)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $temp
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $5
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: (local $scratch (tuple (ref $B) i32))
+ ;; CHECK-NEXT: (local $scratch_5 (ref $B))
+ ;; CHECK-NEXT: (block $block (type $5) (result (ref $B) i32)
+ ;; CHECK-NEXT: (local.set $temp
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_5
+ ;; CHECK-NEXT: (tuple.extract 2 0
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (br_if $block
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (local.get $B)
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (tuple.extract 2 1
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $5)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_5)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $6)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test-local-tuple-3 (param $B (ref $B)) (param $x i32) (result anyref i32)
@@ -201,64 +165,52 @@
)
)
- ;; CHECK: (func $test-local-tuple-4-bad (type $5) (param $B (ref $B)) (param $x i32) (result anyref i32)
+ ;; CHECK: (func $test-local-tuple-4-bad (type $3) (param $B (ref $B)) (param $x i32) (result anyref i32)
;; CHECK-NEXT: (local $temp (ref $B))
;; CHECK-NEXT: (local $3 (ref $A))
;; CHECK-NEXT: (local $4 i32)
;; CHECK-NEXT: (local $5 i32)
- ;; CHECK-NEXT: (local $6 (tuple (ref $B) i32))
- ;; CHECK-NEXT: (local $7 (ref $B))
- ;; CHECK-NEXT: (local $8 (ref $B))
- ;; CHECK-NEXT: (local $9 (tuple (ref $A) i32))
- ;; CHECK-NEXT: (local.set $9
- ;; CHECK-NEXT: (block $label$1 (type $3) (result (ref $A) i32)
- ;; CHECK-NEXT: (local.set $6
- ;; CHECK-NEXT: (br_if $label$1
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (local.get $B)
- ;; CHECK-NEXT: (i32.const 3)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $x)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $7
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $6)
+ ;; CHECK-NEXT: (local $scratch (tuple (ref $B) i32))
+ ;; CHECK-NEXT: (local $scratch_7 (ref $B))
+ ;; CHECK-NEXT: (local $scratch_8 (ref $B))
+ ;; CHECK-NEXT: (block $block (type $2) (result (ref $A) i32)
+ ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_7
+ ;; CHECK-NEXT: (tuple.extract 2 0
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (br_if $block
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (local.get $B)
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $5
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $5
+ ;; CHECK-NEXT: (tuple.extract 2 1
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $7)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_7)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $temp
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $8
- ;; CHECK-NEXT: (ref.cast (ref $B)
- ;; CHECK-NEXT: (local.get $3)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (local.get $5)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $temp
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_8
+ ;; CHECK-NEXT: (ref.cast (ref $B)
+ ;; CHECK-NEXT: (local.get $3)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $8)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $4
+ ;; CHECK-NEXT: (local.get $5)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_8)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $9)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $9)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test-local-tuple-4-bad (param $B (ref $B)) (param $x i32) (result anyref i32)
@@ -284,7 +236,7 @@
)
)
- ;; CHECK: (func $test-local-tuple-4-bad-dupes (type $10) (param $B (ref $B)) (param $x i32) (result i32 anyref i32)
+ ;; CHECK: (func $test-local-tuple-4-bad-dupes (type $8) (param $B (ref $B)) (param $x i32) (result i32 anyref i32)
;; CHECK-NEXT: (local $temp (ref $B))
;; CHECK-NEXT: (local $3 (ref $B))
;; CHECK-NEXT: (local $4 (ref $A))
@@ -293,97 +245,82 @@
;; CHECK-NEXT: (local $7 i32)
;; CHECK-NEXT: (local $8 i32)
;; CHECK-NEXT: (local $9 i32)
- ;; CHECK-NEXT: (local $10 (tuple i32 (ref $B) i32))
- ;; CHECK-NEXT: (local $11 (ref $B))
- ;; CHECK-NEXT: (local $12 i32)
- ;; CHECK-NEXT: (local $13 (ref $B))
- ;; CHECK-NEXT: (local $14 i32)
- ;; CHECK-NEXT: (local $15 (ref $B))
- ;; CHECK-NEXT: (local $16 (tuple i32 (ref $A) i32))
- ;; CHECK-NEXT: (local.set $16
- ;; CHECK-NEXT: (block $label$1 (type $7) (result i32 (ref $A) i32)
- ;; CHECK-NEXT: (local.set $10
- ;; CHECK-NEXT: (br_if $label$1
- ;; CHECK-NEXT: (tuple.make 3
- ;; CHECK-NEXT: (i32.const -3)
- ;; CHECK-NEXT: (local.get $B)
- ;; CHECK-NEXT: (i32.const 3)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $x)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $9
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $12
- ;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $10)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $11
- ;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $10)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $8
- ;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $10)
+ ;; CHECK-NEXT: (local $scratch_10 (tuple i32 (ref $B) i32))
+ ;; CHECK-NEXT: (local $scratch_11 (ref $B))
+ ;; CHECK-NEXT: (local $scratch_12 i32)
+ ;; CHECK-NEXT: (local $scratch_13 (ref $B))
+ ;; CHECK-NEXT: (local $scratch_14 i32)
+ ;; CHECK-NEXT: (local $scratch_15 (ref $B))
+ ;; CHECK-NEXT: (block $block (type $6) (result i32 (ref $A) i32)
+ ;; CHECK-NEXT: (local.set $9
+ ;; CHECK-NEXT: (block (result i32)
+ ;; CHECK-NEXT: (local.set $scratch_12
+ ;; CHECK-NEXT: (tuple.extract 3 0
+ ;; CHECK-NEXT: (local.tee $scratch_10
+ ;; CHECK-NEXT: (br_if $block
+ ;; CHECK-NEXT: (tuple.make 3
+ ;; CHECK-NEXT: (i32.const -3)
+ ;; CHECK-NEXT: (local.get $B)
+ ;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $11)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $12)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (local.tee $scratch
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $14
- ;; CHECK-NEXT: (local.get $9)
+ ;; CHECK-NEXT: (local.set $4
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_11
+ ;; CHECK-NEXT: (tuple.extract 3 1
+ ;; CHECK-NEXT: (local.get $scratch_10)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $13
- ;; CHECK-NEXT: (ref.cast (ref $B)
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $7
- ;; CHECK-NEXT: (local.get $8)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $13)
+ ;; CHECK-NEXT: (local.set $8
+ ;; CHECK-NEXT: (tuple.extract 3 2
+ ;; CHECK-NEXT: (local.get $scratch_10)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $14)
+ ;; CHECK-NEXT: (local.get $scratch_11)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_12)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $temp
- ;; CHECK-NEXT: (block (result (ref $B))
- ;; CHECK-NEXT: (local.set $15
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (block (result i32)
+ ;; CHECK-NEXT: (local.set $scratch_14
+ ;; CHECK-NEXT: (local.get $9)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $5
- ;; CHECK-NEXT: (local.get $7)
+ ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_13
+ ;; CHECK-NEXT: (ref.cast (ref $B)
+ ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $7
+ ;; CHECK-NEXT: (local.get $8)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_13)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $15)
+ ;; CHECK-NEXT: (local.get $scratch_14)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 3
- ;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $16)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $16)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $16)
+ ;; CHECK-NEXT: (local.set $temp
+ ;; CHECK-NEXT: (block (result (ref $B))
+ ;; CHECK-NEXT: (local.set $scratch_15
+ ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $5
+ ;; CHECK-NEXT: (local.get $7)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_15)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test-local-tuple-4-bad-dupes (param $B (ref $B)) (param $x i32) (result i32 anyref i32)
diff --git a/test/lit/cast-and-recast.wast b/test/lit/cast-and-recast.wast
index a2fe43711..ce2af9d98 100644
--- a/test/lit/cast-and-recast.wast
+++ b/test/lit/cast-and-recast.wast
@@ -19,9 +19,9 @@
)
;; CHECK: (func $test (type $3) (param $B (ref $B)) (param $x i32) (result anyref)
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
+ ;; CHECK-NEXT: (block $block (result (ref $A))
;; CHECK-NEXT: (ref.cast (ref $B)
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $B)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -41,9 +41,9 @@
)
;; CHECK: (func $test-cast (type $3) (param $B (ref $B)) (param $x i32) (result anyref)
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
+ ;; CHECK-NEXT: (block $block (result (ref $A))
;; CHECK-NEXT: (ref.cast (ref $B)
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $B)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -64,9 +64,9 @@
)
;; CHECK: (func $test-cast-more (type $3) (param $B (ref $B)) (param $x i32) (result anyref)
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
+ ;; CHECK-NEXT: (block $block (result (ref $A))
;; CHECK-NEXT: (ref.cast (ref $C)
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $B)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -87,9 +87,9 @@
)
;; CHECK: (func $test-cast-less (type $3) (param $B (ref $B)) (param $x i32) (result anyref)
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
+ ;; CHECK-NEXT: (block $block (result (ref $A))
;; CHECK-NEXT: (ref.cast (ref $B)
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $B)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -112,10 +112,10 @@
;; CHECK: (func $test-local (type $3) (param $B (ref $B)) (param $x i32) (result anyref)
;; CHECK-NEXT: (local $temp (ref $B))
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
+ ;; CHECK-NEXT: (block $block (result (ref $A))
;; CHECK-NEXT: (local.set $temp
;; CHECK-NEXT: (ref.cast (ref $B)
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $B)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -140,9 +140,9 @@
)
;; CHECK: (func $test-drop (type $3) (param $B (ref $B)) (param $x i32) (result anyref)
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
+ ;; CHECK-NEXT: (block $block (result (ref $A))
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $B)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -164,8 +164,8 @@
)
;; CHECK: (func $test-same (type $4) (param $A (ref $A)) (param $x i32) (result anyref)
- ;; CHECK-NEXT: (block $label$1 (result (ref $A))
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (block $block (result (ref $A))
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (local.get $A)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
diff --git a/test/lit/cast-to-basic.wast b/test/lit/cast-to-basic.wast
index 4c2e7c047..7c45cf8a3 100644
--- a/test/lit/cast-to-basic.wast
+++ b/test/lit/cast-to-basic.wast
@@ -33,9 +33,9 @@
;; CHECK: (func $br (type $0) (param $anyref anyref)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$1 (result structref)
+ ;; CHECK-NEXT: (block $block (result structref)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (br_on_cast $label$1 anyref (ref struct)
+ ;; CHECK-NEXT: (br_on_cast $block anyref (ref struct)
;; CHECK-NEXT: (local.get $anyref)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -58,9 +58,9 @@
;; CHECK: (func $br-null (type $0) (param $anyref anyref)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$1 (result structref)
+ ;; CHECK-NEXT: (block $block (result structref)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (br_on_cast $label$1 anyref structref
+ ;; CHECK-NEXT: (br_on_cast $block anyref structref
;; CHECK-NEXT: (local.get $anyref)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -83,9 +83,9 @@
;; CHECK: (func $br-fail-null (type $0) (param $anyref anyref)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$1 (result anyref)
+ ;; CHECK-NEXT: (block $block (result anyref)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (br_on_cast_fail $label$1 anyref structref
+ ;; CHECK-NEXT: (br_on_cast_fail $block anyref structref
;; CHECK-NEXT: (local.get $anyref)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/debug/source-map-stop.wast b/test/lit/debug/source-map-stop.wast
index 95545e65a..04a77d9ea 100644
--- a/test/lit/debug/source-map-stop.wast
+++ b/test/lit/debug/source-map-stop.wast
@@ -142,6 +142,8 @@
;; CHECK-NEXT: (return)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: ;;@
+ ;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
(func $foo (param $x i32) (param $y i32)
;;@ src.cpp:90:1
diff --git a/test/lit/downgrade-reftypes.wast b/test/lit/downgrade-reftypes.wast
index 76d8d9975..71d009dee 100644
--- a/test/lit/downgrade-reftypes.wast
+++ b/test/lit/downgrade-reftypes.wast
@@ -13,29 +13,29 @@
;; CHECK: (func $foo (type $f)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$1 (result funcref)
- ;; CHECK-NEXT: (br $label$1
+ ;; CHECK-NEXT: (block $block (result funcref)
+ ;; CHECK-NEXT: (br $block
;; CHECK-NEXT: (ref.func $foo)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$2 (result funcref)
- ;; CHECK-NEXT: (br $label$2
+ ;; CHECK-NEXT: (block $block1 (result funcref)
+ ;; CHECK-NEXT: (br $block1
;; CHECK-NEXT: (ref.null nofunc)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$3 (result externref)
- ;; CHECK-NEXT: (br $label$3
+ ;; CHECK-NEXT: (block $block2 (result externref)
+ ;; CHECK-NEXT: (br $block2
;; CHECK-NEXT: (ref.null noextern)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block $label$4 (result stringref)
- ;; CHECK-NEXT: (br $label$4
+ ;; CHECK-NEXT: (block $block3 (result stringref)
+ ;; CHECK-NEXT: (br $block3
;; CHECK-NEXT: (string.const "hello world")
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/multivalue-stack-ir.wast b/test/lit/multivalue-stack-ir.wast
index b4a394a05..97c353eb4 100644
--- a/test/lit/multivalue-stack-ir.wast
+++ b/test/lit/multivalue-stack-ir.wast
@@ -9,16 +9,16 @@
;; CHECK-NEXT: (local $pair f32)
;; CHECK-NEXT: (local $f32 f32)
;; CHECK-NEXT: (local $2 i32)
- ;; CHECK-NEXT: (local $3 f32)
+ ;; CHECK-NEXT: (local $scratch f32)
;; CHECK-NEXT: (local.set $pair
;; CHECK-NEXT: (block (result f32)
- ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (local.set $scratch
;; CHECK-NEXT: (f32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $f32
diff --git a/test/lit/multivalue.wast b/test/lit/multivalue.wast
index 0cfafb2a9..d9cc14e05 100644
--- a/test/lit/multivalue.wast
+++ b/test/lit/multivalue.wast
@@ -28,35 +28,32 @@
)
;; CHECK: (func $get-first (type $6) (result i32)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64 f32))
- ;; CHECK-NEXT: (local $1 i64)
- ;; CHECK-NEXT: (local $2 i32)
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (call $triple)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $2
- ;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i64 f32))
+ ;; CHECK-NEXT: (local $scratch_1 i64)
+ ;; CHECK-NEXT: (local $scratch_2 i32)
+ ;; CHECK-NEXT: (local.set $scratch_2
+ ;; CHECK-NEXT: (tuple.extract 3 0
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (call $triple)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result i64)
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (block (result i64)
+ ;; CHECK-NEXT: (local.set $scratch_1
+ ;; CHECK-NEXT: (tuple.extract 3 1
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (tuple.extract 3 2
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $2)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.get $scratch_2)
;; CHECK-NEXT: )
(func $get-first (result i32)
(tuple.extract 3 0
@@ -64,37 +61,36 @@
)
)
- ;; CHECK: (func $get-second (type $3) (result i64)
+ ;; CHECK: (func $get-second (type $2) (result i64)
;; CHECK-NEXT: (local $0 i64)
- ;; CHECK-NEXT: (local $1 (tuple i32 i64 f32))
- ;; CHECK-NEXT: (local $2 i64)
- ;; CHECK-NEXT: (local $3 i32)
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (call $triple)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i64 f32))
+ ;; CHECK-NEXT: (local $scratch_2 i64)
+ ;; CHECK-NEXT: (local $scratch_3 i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (local.set $scratch_3
;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (call $triple)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block (result i64)
- ;; CHECK-NEXT: (local.set $2
+ ;; CHECK-NEXT: (local.set $scratch_2
;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $2)
+ ;; CHECK-NEXT: (local.get $scratch_2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (local.get $scratch_3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $0)
@@ -107,35 +103,34 @@
;; CHECK: (func $get-third (type $7) (result f32)
;; CHECK-NEXT: (local $0 f32)
- ;; CHECK-NEXT: (local $1 (tuple i32 i64 f32))
- ;; CHECK-NEXT: (local $2 i64)
- ;; CHECK-NEXT: (local $3 i32)
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (call $triple)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i64 f32))
+ ;; CHECK-NEXT: (local $scratch_2 i64)
+ ;; CHECK-NEXT: (local $scratch_3 i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (local.set $scratch_3
;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (call $triple)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i64)
- ;; CHECK-NEXT: (local.set $2
+ ;; CHECK-NEXT: (local.set $scratch_2
;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $2)
+ ;; CHECK-NEXT: (local.get $scratch_2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (local.get $scratch_3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $0)
@@ -146,39 +141,38 @@
)
)
- ;; CHECK: (func $reverse (type $4) (result f32 i64 i32)
+ ;; CHECK: (func $reverse (type $3) (result f32 i64 i32)
;; CHECK-NEXT: (local $x i32)
;; CHECK-NEXT: (local $1 i64)
;; CHECK-NEXT: (local $2 f32)
- ;; CHECK-NEXT: (local $3 (tuple i32 i64 f32))
- ;; CHECK-NEXT: (local $4 i64)
- ;; CHECK-NEXT: (local $5 i32)
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (call $triple)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i64 f32))
+ ;; CHECK-NEXT: (local $scratch_4 i64)
+ ;; CHECK-NEXT: (local $scratch_5 i32)
;; CHECK-NEXT: (local.set $x
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $5
+ ;; CHECK-NEXT: (local.set $scratch_5
;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (call $triple)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (block (result i64)
- ;; CHECK-NEXT: (local.set $4
+ ;; CHECK-NEXT: (local.set $scratch_4
;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $2
;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: (local.get $scratch_4)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $5)
+ ;; CHECK-NEXT: (local.get $scratch_5)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (tuple.make 3
@@ -205,7 +199,7 @@
)
)
- ;; CHECK: (func $unreachable (type $3) (result i64)
+ ;; CHECK: (func $unreachable (type $2) (result i64)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: )
@@ -226,16 +220,16 @@
;; Test multivalue globals
;; CHECK: (func $global (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local $0 i32)
+ ;; CHECK-NEXT: (local $scratch i32)
;; CHECK-NEXT: (global.set $g1
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $0
+ ;; CHECK-NEXT: (local.set $scratch
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: (global.set $g2
;; CHECK-NEXT: (i64.const 7)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
@@ -263,24 +257,23 @@
;; Test lowering of multivalue drops
;; CHECK: (func $drop-call (type $1)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-NEXT: (local $1 i32)
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (call $pair)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i64))
+ ;; CHECK-NEXT: (local $scratch_1 i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.set $scratch_1
;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (call $pair)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch_1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -291,16 +284,16 @@
)
;; CHECK: (func $drop-tuple-make (type $1)
- ;; CHECK-NEXT: (local $0 i32)
+ ;; CHECK-NEXT: (local $scratch i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $0
+ ;; CHECK-NEXT: (local.set $scratch
;; CHECK-NEXT: (i32.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -314,29 +307,28 @@
)
;; CHECK: (func $drop-block (type $1)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-NEXT: (local $1 i32)
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (block $label$1 (type $0) (result i32 i64)
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local $scratch (tuple i32 i64))
+ ;; CHECK-NEXT: (local $scratch_1 i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.set $scratch_1
;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (block (type $0) (result i32 i64)
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch_1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -389,25 +381,14 @@
)
;; CHECK: (func $mv-block-break (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (block $label$1 (type $0) (result i32 i64)
- ;; CHECK-NEXT: (br $label$1
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (block $block (type $0) (result i32 i64)
+ ;; CHECK-NEXT: (br $block
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $mv-block-break (result i32 i64)
(block $l (result i32 i64)
@@ -421,35 +402,13 @@
)
;; CHECK: (func $mv-block-br-if (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-NEXT: (local $1 (tuple i32 i64))
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (block $label$1 (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (br_if $label$1
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (block $block (type $0) (result i32 i64)
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -465,36 +424,22 @@
)
)
- ;; CHECK: (func $mv-if (type $2) (result i32 i64 externref)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64 externref))
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (if (type $2) (result i32 i64 externref)
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: (then
- ;; CHECK-NEXT: (tuple.make 3
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: (ref.null noextern)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (else
- ;; CHECK-NEXT: (tuple.make 3
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: (ref.null noextern)
- ;; CHECK-NEXT: )
+ ;; CHECK: (func $mv-if (type $4) (result i32 i64 externref)
+ ;; CHECK-NEXT: (if (type $4) (result i32 i64 externref)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (tuple.make 3
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
+ ;; CHECK-NEXT: (ref.null noextern)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 3
- ;; CHECK-NEXT: (tuple.extract 3 0
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 3 1
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 3 2
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (else
+ ;; CHECK-NEXT: (tuple.make 3
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
+ ;; CHECK-NEXT: (ref.null noextern)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -519,21 +464,10 @@
)
;; CHECK: (func $mv-loop (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (loop $label$1 (type $0) (result i32 i64)
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (loop (type $0) (result i32 i64)
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -547,39 +481,17 @@
)
;; CHECK: (func $mv-switch (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local $0 (tuple i32 i64))
- ;; CHECK-NEXT: (local $1 (tuple i32 i64))
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (block $label$1 (type $0) (result i32 i64)
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (block $label$2 (type $0) (result i32 i64)
- ;; CHECK-NEXT: (br_table $label$1 $label$2
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (i32.const 42)
- ;; CHECK-NEXT: (i64.const 42)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (block $block (type $0) (result i32 i64)
+ ;; CHECK-NEXT: (block $block1 (type $0) (result i32 i64)
+ ;; CHECK-NEXT: (br_table $block $block1
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (i32.const 42)
+ ;; CHECK-NEXT: (i64.const 42)
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $mv-switch (result i32 i64)
(block $a (result i32 i64)
diff --git a/test/lit/parse-double-unreachable.wast b/test/lit/parse-double-unreachable.wast
index b232a40fb..9b0e8f573 100644
--- a/test/lit/parse-double-unreachable.wast
+++ b/test/lit/parse-double-unreachable.wast
@@ -15,7 +15,24 @@
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (ref.null nofunc)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (ref.null nofunc)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (block ;; (replaces unreachable ArrayGet we can't emit)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $double-unreachable (param $x (ref $array)) (result i32)
diff --git a/test/lit/passes/roundtrip-gc.wast b/test/lit/passes/roundtrip-gc.wast
index 57300def5..d2c32542c 100644
--- a/test/lit/passes/roundtrip-gc.wast
+++ b/test/lit/passes/roundtrip-gc.wast
@@ -6,14 +6,14 @@
;; CHECK: (export "export" (func $test))
(export "export" (func $test))
;; CHECK: (func $test (type $1)
- ;; CHECK-NEXT: (local $0 (ref $\7bi32\7d))
+ ;; CHECK-NEXT: (local $scratch (ref $\7bi32\7d))
;; CHECK-NEXT: (call $help
;; CHECK-NEXT: (block (result (ref $\7bi32\7d))
- ;; CHECK-NEXT: (local.set $0
+ ;; CHECK-NEXT: (local.set $scratch
;; CHECK-NEXT: (struct.new_default $\7bi32\7d)
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $other)
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/roundtrip.wast b/test/lit/passes/roundtrip.wast
index 59e303eaf..21aa1f671 100644
--- a/test/lit/passes/roundtrip.wast
+++ b/test/lit/passes/roundtrip.wast
@@ -5,29 +5,28 @@
;; CHECK: (type $none (func))
(type $none (func))
;; CHECK: (func $foo (type $none)
- ;; CHECK-NEXT: (local $0 (tuple funcref (ref $none)))
- ;; CHECK-NEXT: (local $1 funcref)
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (block $label$1 (type $1) (result funcref (ref $none))
- ;; CHECK-NEXT: (tuple.make 2
- ;; CHECK-NEXT: (ref.null nofunc)
- ;; CHECK-NEXT: (ref.func $foo)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local $scratch (tuple funcref (ref $none)))
+ ;; CHECK-NEXT: (local $scratch_1 funcref)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result funcref)
- ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.set $scratch_1
;; CHECK-NEXT: (tuple.extract 2 0
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.tee $scratch
+ ;; CHECK-NEXT: (block (type $1) (result funcref (ref $none))
+ ;; CHECK-NEXT: (tuple.make 2
+ ;; CHECK-NEXT: (ref.null nofunc)
+ ;; CHECK-NEXT: (ref.func $foo)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 2 1
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (local.get $scratch)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (local.get $scratch_1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/passes/signature-refining_gto.wat b/test/lit/passes/signature-refining_gto.wat
index ec2b517b1..c69eeb244 100644
--- a/test/lit/passes/signature-refining_gto.wat
+++ b/test/lit/passes/signature-refining_gto.wat
@@ -17,7 +17,9 @@
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $struct.get (param $0 (ref $A))
;; This function is always called with a null, so the parameter type will be
diff --git a/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast b/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast
index 439681a8f..dbaa2c601 100644
--- a/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast
+++ b/test/lit/passes/stack-ir-roundtrip-eh-legacy.wast
@@ -5,16 +5,16 @@
;; CHECK: (tag $tag (param i32))
(tag $tag (param i32))
;; CHECK: (func $delegate-child (type $1)
- ;; CHECK-NEXT: (try $label$9
+ ;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
- ;; CHECK-NEXT: (try $label$7
+ ;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch $tag
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (pop i32)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (try $label$6
+ ;; CHECK-NEXT: (try
;; CHECK-NEXT: (do
;; CHECK-NEXT: )
;; CHECK-NEXT: (delegate 2)
diff --git a/test/lit/reftypes-without-gc.wast b/test/lit/reftypes-without-gc.wast
index e71aa5269..d251d0e0b 100644
--- a/test/lit/reftypes-without-gc.wast
+++ b/test/lit/reftypes-without-gc.wast
@@ -10,8 +10,8 @@
(module
;; CHECK: (func $test (param $x i32) (result funcref)
- ;; CHECK-NEXT: (block $label$1 (result funcref)
- ;; CHECK-NEXT: (br_if $label$1
+ ;; CHECK-NEXT: (block $block (result funcref)
+ ;; CHECK-NEXT: (br_if $block
;; CHECK-NEXT: (ref.func $test)
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
diff --git a/test/lit/source-map.wast b/test/lit/source-map.wast
index b4fc55374..fe534043b 100644
--- a/test/lit/source-map.wast
+++ b/test/lit/source-map.wast
@@ -48,10 +48,7 @@
;;@ src.cpp:40:1
(local.get $y)
)
- ;; For the legacy parser
- ;;@ src.cpp:50:1
(then
- ;; For the new parser
;;@ src.cpp:50:1
(return)
)
@@ -68,10 +65,10 @@
;; CHECK: (func $nested-blocks
;; CHECK-NEXT: ;;@ src.cpp:2:1
- ;; CHECK-NEXT: (block $label$1
+ ;; CHECK-NEXT: (block
;; CHECK-NEXT: ;;@ src.cpp:2:2
- ;; CHECK-NEXT: (block $label$2
- ;; CHECK-NEXT: (br $label$2)
+ ;; CHECK-NEXT: (block $block
+ ;; CHECK-NEXT: (br $block)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: ;;@ src.cpp:3:1
diff --git a/test/lit/string.as_wtf16.wast b/test/lit/string.as_wtf16.wast
index 60bdcf5ec..74bbc97ea 100644
--- a/test/lit/string.as_wtf16.wast
+++ b/test/lit/string.as_wtf16.wast
@@ -26,33 +26,33 @@
;; CHECK-NEXT: )
;; RTRIP: (func $codeunit (type $1) (result i32)
;; RTRIP-NEXT: (local $0 i32)
- ;; RTRIP-NEXT: (local $1 (ref string))
+ ;; RTRIP-NEXT: (local $scratch (ref string))
;; RTRIP-NEXT: (stringview_wtf16.get_codeunit
;; RTRIP-NEXT: (block (result (ref string))
- ;; RTRIP-NEXT: (local.set $1
+ ;; RTRIP-NEXT: (local.set $scratch
;; RTRIP-NEXT: (string.const "abc")
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $0
;; RTRIP-NEXT: (i32.const 0)
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $1)
+ ;; RTRIP-NEXT: (local.get $scratch)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.get $0)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: )
;; RRTRP: (func $codeunit (type $1) (result i32)
;; RRTRP-NEXT: (local $0 i32)
- ;; RRTRP-NEXT: (local $1 (ref string))
- ;; RRTRP-NEXT: (local $2 (ref string))
+ ;; RRTRP-NEXT: (local $scratch (ref string))
+ ;; RRTRP-NEXT: (local $scratch_2 (ref string))
;; RRTRP-NEXT: (stringview_wtf16.get_codeunit
;; RRTRP-NEXT: (block (result (ref string))
- ;; RRTRP-NEXT: (local.set $2
+ ;; RRTRP-NEXT: (local.set $scratch_2
;; RRTRP-NEXT: (string.const "abc")
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $0
;; RRTRP-NEXT: (i32.const 0)
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $2)
+ ;; RRTRP-NEXT: (local.get $scratch_2)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.get $0)
;; RRTRP-NEXT: )
@@ -108,25 +108,25 @@
;; RTRIP: (func $slice (type $0) (result stringref)
;; RTRIP-NEXT: (local $0 i32)
;; RTRIP-NEXT: (local $1 i32)
- ;; RTRIP-NEXT: (local $2 i32)
- ;; RTRIP-NEXT: (local $3 (ref string))
+ ;; RTRIP-NEXT: (local $scratch i32)
+ ;; RTRIP-NEXT: (local $scratch_3 (ref string))
;; RTRIP-NEXT: (stringview_wtf16.slice
;; RTRIP-NEXT: (block (result (ref string))
- ;; RTRIP-NEXT: (local.set $3
+ ;; RTRIP-NEXT: (local.set $scratch_3
;; RTRIP-NEXT: (string.const "abc")
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $0
;; RTRIP-NEXT: (block (result i32)
- ;; RTRIP-NEXT: (local.set $2
+ ;; RTRIP-NEXT: (local.set $scratch
;; RTRIP-NEXT: (i32.const 1)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $1
;; RTRIP-NEXT: (i32.const 2)
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $2)
+ ;; RTRIP-NEXT: (local.get $scratch)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $3)
+ ;; RTRIP-NEXT: (local.get $scratch_3)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.get $0)
;; RTRIP-NEXT: (local.get $1)
@@ -135,27 +135,27 @@
;; RRTRP: (func $slice (type $0) (result stringref)
;; RRTRP-NEXT: (local $0 i32)
;; RRTRP-NEXT: (local $1 i32)
- ;; RRTRP-NEXT: (local $2 i32)
- ;; RRTRP-NEXT: (local $3 (ref string))
- ;; RRTRP-NEXT: (local $4 i32)
- ;; RRTRP-NEXT: (local $5 (ref string))
+ ;; RRTRP-NEXT: (local $scratch i32)
+ ;; RRTRP-NEXT: (local $scratch_3 (ref string))
+ ;; RRTRP-NEXT: (local $scratch_4 i32)
+ ;; RRTRP-NEXT: (local $scratch_5 (ref string))
;; RRTRP-NEXT: (stringview_wtf16.slice
;; RRTRP-NEXT: (block (result (ref string))
- ;; RRTRP-NEXT: (local.set $5
+ ;; RRTRP-NEXT: (local.set $scratch_5
;; RRTRP-NEXT: (string.const "abc")
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $0
;; RRTRP-NEXT: (block (result i32)
- ;; RRTRP-NEXT: (local.set $4
+ ;; RRTRP-NEXT: (local.set $scratch_4
;; RRTRP-NEXT: (i32.const 1)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $1
;; RRTRP-NEXT: (i32.const 2)
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $4)
+ ;; RRTRP-NEXT: (local.get $scratch_4)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $5)
+ ;; RRTRP-NEXT: (local.get $scratch_5)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.get $0)
;; RRTRP-NEXT: (local.get $1)
@@ -185,25 +185,25 @@
;; RTRIP-NEXT: (local $start i32)
;; RTRIP-NEXT: (local $1 i32)
;; RTRIP-NEXT: (local $2 i32)
- ;; RTRIP-NEXT: (local $3 i32)
- ;; RTRIP-NEXT: (local $4 (ref string))
+ ;; RTRIP-NEXT: (local $scratch i32)
+ ;; RTRIP-NEXT: (local $scratch_4 (ref string))
;; RTRIP-NEXT: (stringview_wtf16.slice
;; RTRIP-NEXT: (block (result (ref string))
- ;; RTRIP-NEXT: (local.set $4
+ ;; RTRIP-NEXT: (local.set $scratch_4
;; RTRIP-NEXT: (string.const "abc")
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $1
;; RTRIP-NEXT: (block (result i32)
- ;; RTRIP-NEXT: (local.set $3
+ ;; RTRIP-NEXT: (local.set $scratch
;; RTRIP-NEXT: (local.get $start)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $2
;; RTRIP-NEXT: (i32.const 2)
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $3)
+ ;; RTRIP-NEXT: (local.get $scratch)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $4)
+ ;; RTRIP-NEXT: (local.get $scratch_4)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.get $1)
;; RTRIP-NEXT: (local.get $2)
@@ -213,27 +213,27 @@
;; RRTRP-NEXT: (local $start i32)
;; RRTRP-NEXT: (local $1 i32)
;; RRTRP-NEXT: (local $2 i32)
- ;; RRTRP-NEXT: (local $3 i32)
- ;; RRTRP-NEXT: (local $4 (ref string))
- ;; RRTRP-NEXT: (local $5 i32)
- ;; RRTRP-NEXT: (local $6 (ref string))
+ ;; RRTRP-NEXT: (local $scratch i32)
+ ;; RRTRP-NEXT: (local $scratch_4 (ref string))
+ ;; RRTRP-NEXT: (local $scratch_5 i32)
+ ;; RRTRP-NEXT: (local $scratch_6 (ref string))
;; RRTRP-NEXT: (stringview_wtf16.slice
;; RRTRP-NEXT: (block (result (ref string))
- ;; RRTRP-NEXT: (local.set $6
+ ;; RRTRP-NEXT: (local.set $scratch_6
;; RRTRP-NEXT: (string.const "abc")
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $1
;; RRTRP-NEXT: (block (result i32)
- ;; RRTRP-NEXT: (local.set $5
+ ;; RRTRP-NEXT: (local.set $scratch_5
;; RRTRP-NEXT: (local.get $start)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $2
;; RRTRP-NEXT: (i32.const 2)
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $5)
+ ;; RRTRP-NEXT: (local.get $scratch_5)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $6)
+ ;; RRTRP-NEXT: (local.get $scratch_6)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.get $1)
;; RRTRP-NEXT: (local.get $2)
@@ -261,25 +261,25 @@
;; RTRIP-NEXT: (local $end i32)
;; RTRIP-NEXT: (local $1 i32)
;; RTRIP-NEXT: (local $2 i32)
- ;; RTRIP-NEXT: (local $3 i32)
- ;; RTRIP-NEXT: (local $4 (ref string))
+ ;; RTRIP-NEXT: (local $scratch i32)
+ ;; RTRIP-NEXT: (local $scratch_4 (ref string))
;; RTRIP-NEXT: (stringview_wtf16.slice
;; RTRIP-NEXT: (block (result (ref string))
- ;; RTRIP-NEXT: (local.set $4
+ ;; RTRIP-NEXT: (local.set $scratch_4
;; RTRIP-NEXT: (string.const "abc")
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $1
;; RTRIP-NEXT: (block (result i32)
- ;; RTRIP-NEXT: (local.set $3
+ ;; RTRIP-NEXT: (local.set $scratch
;; RTRIP-NEXT: (i32.const 1)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.set $2
;; RTRIP-NEXT: (local.get $end)
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $3)
+ ;; RTRIP-NEXT: (local.get $scratch)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: )
- ;; RTRIP-NEXT: (local.get $4)
+ ;; RTRIP-NEXT: (local.get $scratch_4)
;; RTRIP-NEXT: )
;; RTRIP-NEXT: (local.get $1)
;; RTRIP-NEXT: (local.get $2)
@@ -289,27 +289,27 @@
;; RRTRP-NEXT: (local $end i32)
;; RRTRP-NEXT: (local $1 i32)
;; RRTRP-NEXT: (local $2 i32)
- ;; RRTRP-NEXT: (local $3 i32)
- ;; RRTRP-NEXT: (local $4 (ref string))
- ;; RRTRP-NEXT: (local $5 i32)
- ;; RRTRP-NEXT: (local $6 (ref string))
+ ;; RRTRP-NEXT: (local $scratch i32)
+ ;; RRTRP-NEXT: (local $scratch_4 (ref string))
+ ;; RRTRP-NEXT: (local $scratch_5 i32)
+ ;; RRTRP-NEXT: (local $scratch_6 (ref string))
;; RRTRP-NEXT: (stringview_wtf16.slice
;; RRTRP-NEXT: (block (result (ref string))
- ;; RRTRP-NEXT: (local.set $6
+ ;; RRTRP-NEXT: (local.set $scratch_6
;; RRTRP-NEXT: (string.const "abc")
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $1
;; RRTRP-NEXT: (block (result i32)
- ;; RRTRP-NEXT: (local.set $5
+ ;; RRTRP-NEXT: (local.set $scratch_5
;; RRTRP-NEXT: (i32.const 1)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.set $2
;; RRTRP-NEXT: (local.get $end)
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $5)
+ ;; RRTRP-NEXT: (local.get $scratch_5)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: )
- ;; RRTRP-NEXT: (local.get $6)
+ ;; RRTRP-NEXT: (local.get $scratch_6)
;; RRTRP-NEXT: )
;; RRTRP-NEXT: (local.get $1)
;; RRTRP-NEXT: (local.get $2)