summaryrefslogtreecommitdiff
path: root/test/lit/passes/asyncify_enable-multivalue.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes/asyncify_enable-multivalue.wast')
-rw-r--r--test/lit/passes/asyncify_enable-multivalue.wast706
1 files changed, 433 insertions, 273 deletions
diff --git a/test/lit/passes/asyncify_enable-multivalue.wast b/test/lit/passes/asyncify_enable-multivalue.wast
index 04b0a4707..69ae2efc6 100644
--- a/test/lit/passes/asyncify_enable-multivalue.wast
+++ b/test/lit/passes/asyncify_enable-multivalue.wast
@@ -41,7 +41,7 @@
;; CHECK-NEXT: (i32.eqz
;; CHECK-NEXT: (global.get $sleeping)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (global.set $sleeping
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
@@ -49,7 +49,7 @@
;; CHECK-NEXT: (i32.const 4)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (else
;; CHECK-NEXT: (global.set $sleeping
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
@@ -60,14 +60,18 @@
(func $do_sleep
(if
(i32.eqz (global.get $sleeping))
- (block
- (global.set $sleeping (i32.const 1))
- ;; we should set up the data at address 4 around here
- (call $asyncify_start_unwind (i32.const 4))
+ (then
+ (block
+ (global.set $sleeping (i32.const 1))
+ ;; we should set up the data at address 4 around here
+ (call $asyncify_start_unwind (i32.const 4))
+ )
)
- (block
- (global.set $sleeping (i32.const 0))
- (call $asyncify_stop_rewind)
+ (else
+ (block
+ (global.set $sleeping (i32.const 0))
+ (call $asyncify_stop_rewind)
+ )
)
)
)
@@ -80,7 +84,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -91,7 +97,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -116,7 +122,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (call $stuff)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $stuff)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.or
@@ -129,15 +137,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $do_sleep)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -147,7 +157,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (call $stuff)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $stuff)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -192,7 +204,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -203,7 +217,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -233,15 +247,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $work)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -318,7 +334,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -335,7 +353,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -355,7 +375,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -372,7 +394,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -423,7 +447,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -434,7 +460,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -464,15 +490,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -520,7 +548,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -551,7 +579,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -583,7 +611,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $7
;; CHECK-NEXT: (call $import2)
;; CHECK-NEXT: )
@@ -592,11 +620,15 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (local.get $7)
+ ;; CHECK-NEXT: (else
+ ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.get $7)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -606,7 +638,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $temp
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )
@@ -684,7 +716,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -715,7 +747,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -746,7 +778,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $3
;; CHECK-NEXT: (call $import2)
;; CHECK-NEXT: )
@@ -755,11 +787,15 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (else
+ ;; CHECK-NEXT: (local.set $0
+ ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -769,8 +805,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -850,7 +888,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -881,7 +919,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -907,36 +945,38 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (loop $l
- ;; CHECK-NEXT: (local.set $3
- ;; CHECK-NEXT: (local.get $y)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (i32.add
- ;; CHECK-NEXT: (local.get $3)
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (loop $l
+ ;; CHECK-NEXT: (local.set $3
+ ;; CHECK-NEXT: (local.get $y)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $x
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $5
- ;; CHECK-NEXT: (local.get $x)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $6
- ;; CHECK-NEXT: (i32.div_s
- ;; CHECK-NEXT: (local.get $5)
- ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: (local.set $4
+ ;; CHECK-NEXT: (i32.add
+ ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $x
+ ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $5
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $6
+ ;; CHECK-NEXT: (i32.div_s
+ ;; CHECK-NEXT: (local.get $5)
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $y
+ ;; CHECK-NEXT: (local.get $6)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (local.set $7
+ ;; CHECK-NEXT: (local.get $y)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (br_if $l
+ ;; CHECK-NEXT: (local.get $7)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $y
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $7
- ;; CHECK-NEXT: (local.get $y)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br_if $l
- ;; CHECK-NEXT: (local.get $7)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -951,15 +991,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -969,7 +1011,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $8
;; CHECK-NEXT: (local.get $y)
;; CHECK-NEXT: )
@@ -1050,7 +1092,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $2
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -1061,7 +1105,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1086,8 +1130,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
@@ -1098,28 +1144,32 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.or
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (local.get $3)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (call $import)
- ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.or
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (local.get $3)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $import)
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1150,7 +1200,9 @@
;; CHECK-NEXT: )
(func $calls-import2-if (param $x i32)
(if (local.get $x)
- (call $import)
+ (then
+ (call $import)
+ )
)
)
;; CHECK: (func $calls-import2-if-else (param $x i32)
@@ -1165,7 +1217,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1196,7 +1248,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1221,8 +1273,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
@@ -1231,8 +1285,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $2
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $2
+ ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
@@ -1243,30 +1299,34 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.or
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (call $import3
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.or
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (local.get $4)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $import3
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1280,30 +1340,34 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.or
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (local.get $4)
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (call $import3
- ;; CHECK-NEXT: (i32.const 2)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.or
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (local.get $4)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $import3
+ ;; CHECK-NEXT: (i32.const 2)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1354,8 +1418,12 @@
;; CHECK-NEXT: )
(func $calls-import2-if-else (param $x i32)
(if (local.get $x)
- (call $import3 (i32.const 1))
- (call $import3 (i32.const 2))
+ (then
+ (call $import3 (i32.const 1))
+ )
+ (else
+ (call $import3 (i32.const 2))
+ )
)
)
;; CHECK: (func $calls-import2-if-else-oneside (param $x i32) (result i32)
@@ -1370,7 +1438,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $5
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -1381,7 +1451,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1408,8 +1478,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
@@ -1418,8 +1490,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $4
+ ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
@@ -1430,13 +1504,17 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (return
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (return
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1450,30 +1528,34 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.or
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (call $import3
- ;; CHECK-NEXT: (i32.const 2)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.or
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (local.get $6)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $import3
+ ;; CHECK-NEXT: (i32.const 2)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1484,8 +1566,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (return
- ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (return
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1518,8 +1602,12 @@
;; CHECK-NEXT: )
(func $calls-import2-if-else-oneside (param $x i32) (result i32)
(if (local.get $x)
- (return (i32.const 1))
- (call $import3 (i32.const 2))
+ (then
+ (return (i32.const 1))
+ )
+ (else
+ (call $import3 (i32.const 2))
+ )
)
(return (i32.const 3))
)
@@ -1537,7 +1625,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1568,7 +1656,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1595,8 +1683,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (block
@@ -1605,8 +1695,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $4
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $4
+ ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
@@ -1617,30 +1709,34 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.or
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (local.get $6)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
- ;; CHECK-NEXT: (call $import3
- ;; CHECK-NEXT: (i32.const 1)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.or
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (local.get $6)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $import3
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1654,13 +1750,17 @@
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (i32.eq
- ;; CHECK-NEXT: (global.get $__asyncify_state)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (return
- ;; CHECK-NEXT: (i32.const 2)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (if
+ ;; CHECK-NEXT: (i32.eq
+ ;; CHECK-NEXT: (global.get $__asyncify_state)
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (return
+ ;; CHECK-NEXT: (i32.const 2)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1671,8 +1771,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (return
- ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (return
+ ;; CHECK-NEXT: (i32.const 3)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1724,8 +1826,12 @@
;; CHECK-NEXT: )
(func $calls-import2-if-else-oneside2 (param $x i32) (result i32)
(if (local.get $x)
- (call $import3 (i32.const 1))
- (return (i32.const 2))
+ (then
+ (call $import3 (i32.const 1))
+ )
+ (else
+ (return (i32.const 2))
+ )
)
(return (i32.const 3))
)
@@ -1742,7 +1848,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1778,7 +1884,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1809,7 +1915,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $4
;; CHECK-NEXT: (call $import-mv)
;; CHECK-NEXT: )
@@ -1818,11 +1924,15 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: (else
+ ;; CHECK-NEXT: (local.set $1
+ ;; CHECK-NEXT: (local.get $4)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1832,8 +1942,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $x
- ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (local.set $x
+ ;; CHECK-NEXT: (local.get $1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1905,7 +2017,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1936,7 +2048,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -1967,7 +2079,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import3
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
@@ -1976,8 +2088,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -1987,7 +2101,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
@@ -2079,7 +2193,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -2110,7 +2224,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -2141,7 +2255,7 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (local.set $3
;; CHECK-NEXT: (call $import2)
;; CHECK-NEXT: )
@@ -2150,11 +2264,15 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (local.set $0
- ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: (else
+ ;; CHECK-NEXT: (local.set $0
+ ;; CHECK-NEXT: (local.get $3)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2164,8 +2282,10 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br_if $l
- ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br_if $l
+ ;; CHECK-NEXT: (local.get $0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2227,7 +2347,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -2238,7 +2360,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -2263,7 +2385,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (call $boring)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $boring)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.or
@@ -2276,15 +2400,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2294,7 +2420,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (call $boring)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $boring)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.or
@@ -2307,15 +2435,17 @@
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2363,7 +2493,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -2374,7 +2506,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -2399,7 +2531,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (call $boring-deep)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $boring-deep)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.or
@@ -2412,15 +2546,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import-deep)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2430,7 +2566,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (call $boring)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (call $boring)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.or
@@ -2443,15 +2581,17 @@
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2501,7 +2641,9 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (nop)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $__asyncify_unwind (result i32)
@@ -2512,7 +2654,7 @@
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (i32.store
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: (i32.add
@@ -2542,15 +2684,17 @@
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (then
;; CHECK-NEXT: (call $import)
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.eq
;; CHECK-NEXT: (global.get $__asyncify_state)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (br $__asyncify_unwind
- ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (br $__asyncify_unwind
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2600,7 +2744,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2617,7 +2763,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2637,7 +2785,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2654,7 +2804,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2701,7 +2853,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2718,7 +2872,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2738,7 +2894,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2755,7 +2913,9 @@
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
-;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: (then
+;; CHECK-NEXT: (unreachable)
+;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )