summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt16
-rw-r--r--test/break-to-return.wasm.fromBinary2
-rw-r--r--test/debugInfo.fromasm10
-rw-r--r--test/debugInfo.fromasm.clamp10
-rw-r--r--test/debugInfo.fromasm.clamp.no-opts2
-rw-r--r--test/debugInfo.fromasm.imprecise8
-rw-r--r--test/debugInfo.fromasm.no-opts2
-rw-r--r--test/dot_s/return.wast4
-rw-r--r--test/dot_s/unreachable_blocks.wast8
-rw-r--r--test/dylib.wasm.fromBinary2
-rw-r--r--test/emcc_O2_hello_world.fromasm114
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp114
-rw-r--r--test/emcc_O2_hello_world.fromasm.clamp.no-opts104
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise104
-rw-r--r--test/emcc_O2_hello_world.fromasm.imprecise.no-opts102
-rw-r--r--test/emcc_O2_hello_world.fromasm.no-opts104
-rw-r--r--test/emcc_hello_world.fromasm212
-rw-r--r--test/emcc_hello_world.fromasm.clamp218
-rw-r--r--test/emcc_hello_world.fromasm.clamp.no-opts196
-rw-r--r--test/emcc_hello_world.fromasm.imprecise198
-rw-r--r--test/emcc_hello_world.fromasm.imprecise.no-opts180
-rw-r--r--test/emcc_hello_world.fromasm.no-opts190
-rw-r--r--test/example/c-api-kitchen-sink.txt16
-rw-r--r--test/example/c-api-kitchen-sink.txt.txt8
-rw-r--r--test/kitchen_sink.wast2
-rw-r--r--test/kitchen_sink.wast.from-wast2
-rw-r--r--test/kitchen_sink.wast.fromBinary2
-rw-r--r--test/kitchen_sink.wast.fromBinary.noDebugInfo2
-rw-r--r--test/llvm_autogenerated/cfg-stackify.wast6
-rw-r--r--test/memorygrowth.fromasm82
-rw-r--r--test/memorygrowth.fromasm.clamp82
-rw-r--r--test/memorygrowth.fromasm.clamp.no-opts38
-rw-r--r--test/memorygrowth.fromasm.imprecise78
-rw-r--r--test/memorygrowth.fromasm.imprecise.no-opts36
-rw-r--r--test/memorygrowth.fromasm.no-opts38
-rw-r--r--test/merge/dylib.wasm.combined8
-rw-r--r--test/merge/dylib.wasm.combined.finalized8
-rw-r--r--test/merge/dylib.wasm.combined.finalized.opt8
-rw-r--r--test/merge/dylib.wasm.combined.opt8
-rw-r--r--test/min.fromasm.clamp.no-opts2
-rw-r--r--test/min.fromasm.imprecise.no-opts2
-rw-r--r--test/min.fromasm.no-opts2
-rw-r--r--test/min.wast6
-rw-r--r--test/min.wast.from-wast6
-rw-r--r--test/min.wast.fromBinary6
-rw-r--r--test/min.wast.fromBinary.noDebugInfo6
-rw-r--r--test/passes/O.bin.txt4
-rw-r--r--test/passes/O.txt2
-rw-r--r--test/passes/O.wast2
-rw-r--r--test/passes/Oz.wast2
-rw-r--r--test/passes/coalesce-locals.txt4
-rw-r--r--test/passes/coalesce-locals.wast10
-rw-r--r--test/passes/code-pushing_ignore-implicit-traps.txt2
-rw-r--r--test/passes/code-pushing_ignore-implicit-traps.wast2
-rw-r--r--test/passes/dce.txt16
-rw-r--r--test/passes/dce.wast54
-rw-r--r--test/passes/dce_vacuum.bin.txt2
-rw-r--r--test/passes/dce_vacuum.wast4
-rw-r--r--test/passes/duplicate-function-elimination.txt4
-rw-r--r--test/passes/duplicate-function-elimination.wast4
-rw-r--r--test/passes/flatten-control-flow.wast66
-rw-r--r--test/passes/inlining.txt10
-rw-r--r--test/passes/local-cse.txt2
-rw-r--r--test/passes/local-cse.wast2
-rw-r--r--test/passes/merge-blocks.txt2
-rw-r--r--test/passes/merge-blocks.wast10
-rw-r--r--test/passes/metrics.txt2
-rw-r--r--test/passes/metrics.wast2
-rw-r--r--test/passes/nm.txt2
-rw-r--r--test/passes/nm.wast2
-rw-r--r--test/passes/optimize-instructions.txt10
-rw-r--r--test/passes/optimize-instructions.wast10
-rw-r--r--test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt10
-rw-r--r--test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.wast6
-rw-r--r--test/passes/precompute.txt8
-rw-r--r--test/passes/precompute.wast20
-rw-r--r--test/passes/precompute_coalesce-locals_vacuum.wast4
-rw-r--r--test/passes/print-call-graph.txt48
-rw-r--r--test/passes/print-call-graph.wast48
-rw-r--r--test/passes/remove-unused-brs.txt48
-rw-r--r--test/passes/remove-unused-brs.wast42
-rw-r--r--test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt2
-rw-r--r--test/passes/remove-unused-brs_shrink-level=1.txt10
-rw-r--r--test/passes/remove-unused-brs_shrink-level=1.wast12
-rw-r--r--test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt4
-rw-r--r--test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast12
-rw-r--r--test/passes/remove-unused-names.wast2
-rw-r--r--test/passes/remove-unused-names_merge-blocks.txt48
-rw-r--r--test/passes/remove-unused-names_merge-blocks.wast196
-rw-r--r--test/passes/remove-unused-names_vacuum.txt2
-rw-r--r--test/passes/remove-unused-names_vacuum.wast2
-rw-r--r--test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt6
-rw-r--r--test/passes/simplify-locals-nostructure.txt4
-rw-r--r--test/passes/simplify-locals-nostructure.wast4
-rw-r--r--test/passes/simplify-locals-notee-nostructure.txt4
-rw-r--r--test/passes/simplify-locals-notee-nostructure.wast4
-rw-r--r--test/passes/simplify-locals-notee.txt12
-rw-r--r--test/passes/simplify-locals-notee.wast4
-rw-r--r--test/passes/simplify-locals.txt68
-rw-r--r--test/passes/simplify-locals.wast38
-rw-r--r--test/passes/vacuum.txt8
-rw-r--r--test/passes/vacuum.wast26
-rw-r--r--test/passes/vacuum_remove-unused-names_merge-blocks.wast2
-rw-r--r--test/stacky.wasm.fromBinary2
-rw-r--r--test/two_sides.fromasm2
-rw-r--r--test/two_sides.fromasm.clamp8
-rw-r--r--test/two_sides.fromasm.clamp.no-opts6
-rw-r--r--test/two_sides.fromasm.imprecise2
-rw-r--r--test/unit.fromasm14
-rw-r--r--test/unit.fromasm.clamp20
-rw-r--r--test/unit.fromasm.clamp.no-opts54
-rw-r--r--test/unit.fromasm.imprecise12
-rw-r--r--test/unit.fromasm.imprecise.no-opts46
-rw-r--r--test/unit.fromasm.no-opts48
-rw-r--r--test/unit.wast16
-rw-r--r--test/unit.wast.from-wast16
-rw-r--r--test/unit.wast.fromBinary20
-rw-r--r--test/unit.wast.fromBinary.noDebugInfo20
-rw-r--r--test/use-import-and-drop.fromasm.clamp.no-opts2
-rw-r--r--test/use-import-and-drop.fromasm.imprecise.no-opts2
-rw-r--r--test/use-import-and-drop.fromasm.no-opts2
-rw-r--r--test/wasm-only.fromasm12
-rw-r--r--test/wasm-only.fromasm.clamp12
-rw-r--r--test/wasm-only.fromasm.clamp.no-opts12
-rw-r--r--test/wasm-only.fromasm.imprecise2
-rw-r--r--test/wasm-only.fromasm.imprecise.no-opts2
-rw-r--r--test/wasm-only.fromasm.no-opts12
127 files changed, 1817 insertions, 1817 deletions
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 59cf1ab10..c70888508 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -22,10 +22,10 @@ BinaryenFloat64: 4
(start $starter)
(func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32)
(local $4 i32)
- (block $the-body i32
+ (block $the-body (result i32)
(block $the-nothing
(drop
- (block $the-value i32
+ (block $the-value (result i32)
(drop
(i32.clz
(i32.const -10)
@@ -416,12 +416,12 @@ BinaryenFloat64: 4
)
)
(drop
- (loop $in i32
+ (loop $in (result i32)
(i32.const 0)
)
)
(drop
- (loop i32
+ (loop (result i32)
(i32.const 0)
)
)
@@ -1440,10 +1440,10 @@ int main() {
(start $starter)
(func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32)
(local $4 i32)
- (block $the-body i32
+ (block $the-body (result i32)
(block $the-nothing
(drop
- (block $the-value i32
+ (block $the-value (result i32)
(drop
(i32.clz
(i32.const -10)
@@ -1834,12 +1834,12 @@ int main() {
)
)
(drop
- (loop $in i32
+ (loop $in (result i32)
(i32.const 0)
)
)
(drop
- (loop i32
+ (loop (result i32)
(i32.const 0)
)
)
diff --git a/test/break-to-return.wasm.fromBinary b/test/break-to-return.wasm.fromBinary
index 1e7a2ce4d..0bf75cc8b 100644
--- a/test/break-to-return.wasm.fromBinary
+++ b/test/break-to-return.wasm.fromBinary
@@ -3,7 +3,7 @@
(memory $0 256 256)
(export "add" (func $0))
(func $0 (type $0) (param $var$0 i32) (param $var$1 i32) (result i32)
- (block $binaryen|break-to-return i32
+ (block $binaryen|break-to-return (result i32)
(br $binaryen|break-to-return
(i32.add
(get_local $var$0)
diff --git a/test/debugInfo.fromasm b/test/debugInfo.fromasm
index 7aa584c43..f11000841 100644
--- a/test/debugInfo.fromasm
+++ b/test/debugInfo.fromasm
@@ -32,7 +32,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.rem_s
(get_local $0)
@@ -134,10 +134,10 @@
(func $switch_reach (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br $__rjto$0
- (if i32
+ (if (result i32)
(i32.lt_s
(tee_local $1
(i32.add
@@ -147,7 +147,7 @@
)
(i32.const 1369188723)
)
- (block $switch i32
+ (block $switch (result i32)
(block $switch-default
(block $switch-case
(br_table $switch-case $switch-default
@@ -161,7 +161,7 @@
)
(i32.const 0)
)
- (block $switch0 i32
+ (block $switch0 (result i32)
(block $switch-default2
(block $switch-case1
(br_table $switch-case1 $switch-default2
diff --git a/test/debugInfo.fromasm.clamp b/test/debugInfo.fromasm.clamp
index 7aa584c43..f11000841 100644
--- a/test/debugInfo.fromasm.clamp
+++ b/test/debugInfo.fromasm.clamp
@@ -32,7 +32,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.rem_s
(get_local $0)
@@ -134,10 +134,10 @@
(func $switch_reach (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br $__rjto$0
- (if i32
+ (if (result i32)
(i32.lt_s
(tee_local $1
(i32.add
@@ -147,7 +147,7 @@
)
(i32.const 1369188723)
)
- (block $switch i32
+ (block $switch (result i32)
(block $switch-default
(block $switch-case
(br_table $switch-case $switch-default
@@ -161,7 +161,7 @@
)
(i32.const 0)
)
- (block $switch0 i32
+ (block $switch0 (result i32)
(block $switch-default2
(block $switch-case1
(br_table $switch-case1 $switch-default2
diff --git a/test/debugInfo.fromasm.clamp.no-opts b/test/debugInfo.fromasm.clamp.no-opts
index 054226a3a..c56627bcb 100644
--- a/test/debugInfo.fromasm.clamp.no-opts
+++ b/test/debugInfo.fromasm.clamp.no-opts
@@ -47,7 +47,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
diff --git a/test/debugInfo.fromasm.imprecise b/test/debugInfo.fromasm.imprecise
index 638911cfc..824ade74e 100644
--- a/test/debugInfo.fromasm.imprecise
+++ b/test/debugInfo.fromasm.imprecise
@@ -123,10 +123,10 @@
(func $switch_reach (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br $__rjto$0
- (if i32
+ (if (result i32)
(i32.lt_s
(tee_local $1
(i32.add
@@ -136,7 +136,7 @@
)
(i32.const 1369188723)
)
- (block $switch i32
+ (block $switch (result i32)
(block $switch-default
(block $switch-case
(br_table $switch-case $switch-default
@@ -150,7 +150,7 @@
)
(i32.const 0)
)
- (block $switch0 i32
+ (block $switch0 (result i32)
(block $switch-default2
(block $switch-case1
(br_table $switch-case1 $switch-default2
diff --git a/test/debugInfo.fromasm.no-opts b/test/debugInfo.fromasm.no-opts
index 054226a3a..c56627bcb 100644
--- a/test/debugInfo.fromasm.no-opts
+++ b/test/debugInfo.fromasm.no-opts
@@ -47,7 +47,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
diff --git a/test/dot_s/return.wast b/test/dot_s/return.wast
index 28631d103..95a7cf989 100644
--- a/test/dot_s/return.wast
+++ b/test/dot_s/return.wast
@@ -12,8 +12,8 @@
(func $return_void
)
(func $fallthrough_return_nested_loop_i32 (result i32)
- (loop $label$0 i32
- (loop $label$1 i32
+ (loop $label$0 (result i32)
+ (loop $label$1 (result i32)
(return
(i32.const 1)
)
diff --git a/test/dot_s/unreachable_blocks.wast b/test/dot_s/unreachable_blocks.wast
index 1d0a66c06..ecaa79014 100644
--- a/test/dot_s/unreachable_blocks.wast
+++ b/test/dot_s/unreachable_blocks.wast
@@ -61,7 +61,7 @@
(return
(i32.const 7)
)
- (loop $label$0 i32
+ (loop $label$0 (result i32)
(br $label$0)
)
)
@@ -69,7 +69,7 @@
(return
(i64.const 8)
)
- (loop $label$0 i64
+ (loop $label$0 (result i64)
(br $label$0)
)
)
@@ -77,7 +77,7 @@
(return
(f32.const 9.5)
)
- (loop $label$0 f32
+ (loop $label$0 (result f32)
(br $label$0)
)
)
@@ -85,7 +85,7 @@
(return
(f64.const 10.5)
)
- (loop $label$0 f64
+ (loop $label$0 (result f64)
(br $label$0)
)
)
diff --git a/test/dylib.wasm.fromBinary b/test/dylib.wasm.fromBinary
index 308dc14a8..aff341754 100644
--- a/test/dylib.wasm.fromBinary
+++ b/test/dylib.wasm.fromBinary
@@ -16,7 +16,7 @@
(export "runPostSets" (func $1))
(export "_str" (global $global$2))
(func $0 (type $1) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(drop
(call $import$1
(get_global $import$0)
diff --git a/test/emcc_O2_hello_world.fromasm b/test/emcc_O2_hello_world.fromasm
index 67ea2824b..b0128b509 100644
--- a/test/emcc_O2_hello_world.fromasm
+++ b/test/emcc_O2_hello_world.fromasm
@@ -1395,14 +1395,14 @@
(i32.load offset=480
(i32.shl
(tee_local $9
- (if i32
+ (if (result i32)
(tee_local $10
(i32.shr_u
(get_local $1)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -1922,7 +1922,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(get_local $12)
(i32.lt_u
(get_local $3)
@@ -2422,14 +2422,14 @@
(i32.add
(i32.shl
(tee_local $10
- (if i32
+ (if (result i32)
(tee_local $11
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
@@ -3076,7 +3076,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(tee_local $10
(i32.load
(i32.const 616)
@@ -3108,8 +3108,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(select
(i32.lt_u
(get_local $3)
@@ -3118,8 +3118,8 @@
(i32.const 0)
(i32.eq
(tee_local $7
- (block $label$break$L257 i32
- (if i32
+ (block $label$break$L257 (result i32)
+ (if (result i32)
(i32.and
(i32.load
(i32.const 620)
@@ -3127,7 +3127,7 @@
(i32.const 4)
)
(i32.const 190)
- (block i32
+ (block (result i32)
(block $label$break$L259
(if
(tee_local $10
@@ -3142,7 +3142,7 @@
(loop $while-in34
(block $while-out33
(if
- (if i32
+ (if (result i32)
(i32.le_u
(tee_local $26
(i32.load
@@ -3259,7 +3259,7 @@
)
(block $do-once35
(if
- (if i32
+ (if (result i32)
(i32.eq
(get_local $7)
(i32.const 173)
@@ -3276,7 +3276,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $8
(i32.add
@@ -3404,7 +3404,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_u
(get_local $14)
@@ -3652,8 +3652,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $7)
(i32.const 203)
@@ -3757,7 +3757,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $20)
(tee_local $18
@@ -3766,7 +3766,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.const 192)
(get_local $20)
@@ -4610,15 +4610,15 @@
(i32.add
(i32.shl
(tee_local $1
- (block $do-once61 i32
- (if i32
+ (block $do-once61 (result i32)
+ (if (result i32)
(tee_local $2
(i32.shr_u
(get_local $14)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once61
(i32.const 31)
@@ -4994,7 +4994,7 @@
)
(loop $while-in66
(if
- (if i32
+ (if (result i32)
(i32.le_u
(tee_local $4
(i32.load
@@ -5348,14 +5348,14 @@
(i32.add
(i32.shl
(tee_local $1
- (if i32
+ (if (result i32)
(tee_local $18
(i32.shr_u
(get_local $4)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $4)
(i32.const 16777215)
@@ -7353,14 +7353,14 @@
(i32.add
(i32.shl
(tee_local $3
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -7834,11 +7834,11 @@
(i32.eq
(get_local $5)
(tee_local $6
- (if i32
+ (if (result i32)
(i32.load
(i32.const 8)
)
- (block i32
+ (block (result i32)
(call $_pthread_cleanup_push
(i32.const 4)
(get_local $0)
@@ -7870,7 +7870,7 @@
)
(get_local $9)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $11)
(i32.load
@@ -7936,12 +7936,12 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.eq
(get_local $3)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.add
@@ -8080,7 +8080,7 @@
)
)
(set_local $15
- (if i32
+ (if (result i32)
(i32.eq
(get_local $17)
(i32.const 2)
@@ -8361,7 +8361,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 56)
)
@@ -8391,7 +8391,7 @@
)
(loop $while-in
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -8669,7 +8669,7 @@
)
(block
(if
- (if i32
+ (if (result i32)
(i32.lt_u
(tee_local $2
(i32.load
@@ -8715,7 +8715,7 @@
)
)
(set_local $4
- (if i32
+ (if (result i32)
(i32.eq
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -8755,8 +8755,8 @@
(local $5 i32)
(local $6 i32)
(tee_local $0
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.gt_u
(i32.load
(tee_local $1
@@ -8775,7 +8775,7 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -8801,7 +8801,7 @@
(i32.const 0)
)
(i32.const -1)
- (block i32
+ (block (result i32)
(if
(i32.lt_u
(tee_local $4
@@ -9164,7 +9164,7 @@
(local $3 i32)
(local $4 i32)
(set_local $3
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(tee_local $1
@@ -9182,8 +9182,8 @@
)
)
(set_local $0
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(i32.lt_s
(call $_fputs
(get_local $0)
@@ -9192,9 +9192,9 @@
(i32.const 0)
)
(i32.const 1)
- (block i32
+ (block (result i32)
(if
- (if i32
+ (if (result i32)
(i32.ne
(i32.load8_s offset=75
(get_local $1)
@@ -9302,7 +9302,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -9312,7 +9312,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -9353,7 +9353,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.load
@@ -9362,7 +9362,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -9372,7 +9372,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -9408,7 +9408,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -9499,7 +9499,7 @@
(i32.const 5)
)
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.load
(get_local $0)
@@ -9507,7 +9507,7 @@
(i32.const 64)
)
(i32.const 0)
- (block i32
+ (block (result i32)
(i32.store
(get_local $3)
(i32.load offset=60
@@ -9582,12 +9582,12 @@
(get_local $0)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -9637,7 +9637,7 @@
(get_local $1)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 8)
)
diff --git a/test/emcc_O2_hello_world.fromasm.clamp b/test/emcc_O2_hello_world.fromasm.clamp
index 67ea2824b..b0128b509 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp
+++ b/test/emcc_O2_hello_world.fromasm.clamp
@@ -1395,14 +1395,14 @@
(i32.load offset=480
(i32.shl
(tee_local $9
- (if i32
+ (if (result i32)
(tee_local $10
(i32.shr_u
(get_local $1)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -1922,7 +1922,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(get_local $12)
(i32.lt_u
(get_local $3)
@@ -2422,14 +2422,14 @@
(i32.add
(i32.shl
(tee_local $10
- (if i32
+ (if (result i32)
(tee_local $11
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
@@ -3076,7 +3076,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(tee_local $10
(i32.load
(i32.const 616)
@@ -3108,8 +3108,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(select
(i32.lt_u
(get_local $3)
@@ -3118,8 +3118,8 @@
(i32.const 0)
(i32.eq
(tee_local $7
- (block $label$break$L257 i32
- (if i32
+ (block $label$break$L257 (result i32)
+ (if (result i32)
(i32.and
(i32.load
(i32.const 620)
@@ -3127,7 +3127,7 @@
(i32.const 4)
)
(i32.const 190)
- (block i32
+ (block (result i32)
(block $label$break$L259
(if
(tee_local $10
@@ -3142,7 +3142,7 @@
(loop $while-in34
(block $while-out33
(if
- (if i32
+ (if (result i32)
(i32.le_u
(tee_local $26
(i32.load
@@ -3259,7 +3259,7 @@
)
(block $do-once35
(if
- (if i32
+ (if (result i32)
(i32.eq
(get_local $7)
(i32.const 173)
@@ -3276,7 +3276,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $8
(i32.add
@@ -3404,7 +3404,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_u
(get_local $14)
@@ -3652,8 +3652,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $7)
(i32.const 203)
@@ -3757,7 +3757,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $20)
(tee_local $18
@@ -3766,7 +3766,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.const 192)
(get_local $20)
@@ -4610,15 +4610,15 @@
(i32.add
(i32.shl
(tee_local $1
- (block $do-once61 i32
- (if i32
+ (block $do-once61 (result i32)
+ (if (result i32)
(tee_local $2
(i32.shr_u
(get_local $14)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once61
(i32.const 31)
@@ -4994,7 +4994,7 @@
)
(loop $while-in66
(if
- (if i32
+ (if (result i32)
(i32.le_u
(tee_local $4
(i32.load
@@ -5348,14 +5348,14 @@
(i32.add
(i32.shl
(tee_local $1
- (if i32
+ (if (result i32)
(tee_local $18
(i32.shr_u
(get_local $4)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $4)
(i32.const 16777215)
@@ -7353,14 +7353,14 @@
(i32.add
(i32.shl
(tee_local $3
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -7834,11 +7834,11 @@
(i32.eq
(get_local $5)
(tee_local $6
- (if i32
+ (if (result i32)
(i32.load
(i32.const 8)
)
- (block i32
+ (block (result i32)
(call $_pthread_cleanup_push
(i32.const 4)
(get_local $0)
@@ -7870,7 +7870,7 @@
)
(get_local $9)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $11)
(i32.load
@@ -7936,12 +7936,12 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.eq
(get_local $3)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.add
@@ -8080,7 +8080,7 @@
)
)
(set_local $15
- (if i32
+ (if (result i32)
(i32.eq
(get_local $17)
(i32.const 2)
@@ -8361,7 +8361,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 56)
)
@@ -8391,7 +8391,7 @@
)
(loop $while-in
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -8669,7 +8669,7 @@
)
(block
(if
- (if i32
+ (if (result i32)
(i32.lt_u
(tee_local $2
(i32.load
@@ -8715,7 +8715,7 @@
)
)
(set_local $4
- (if i32
+ (if (result i32)
(i32.eq
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -8755,8 +8755,8 @@
(local $5 i32)
(local $6 i32)
(tee_local $0
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.gt_u
(i32.load
(tee_local $1
@@ -8775,7 +8775,7 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -8801,7 +8801,7 @@
(i32.const 0)
)
(i32.const -1)
- (block i32
+ (block (result i32)
(if
(i32.lt_u
(tee_local $4
@@ -9164,7 +9164,7 @@
(local $3 i32)
(local $4 i32)
(set_local $3
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(tee_local $1
@@ -9182,8 +9182,8 @@
)
)
(set_local $0
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(i32.lt_s
(call $_fputs
(get_local $0)
@@ -9192,9 +9192,9 @@
(i32.const 0)
)
(i32.const 1)
- (block i32
+ (block (result i32)
(if
- (if i32
+ (if (result i32)
(i32.ne
(i32.load8_s offset=75
(get_local $1)
@@ -9302,7 +9302,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -9312,7 +9312,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -9353,7 +9353,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.load
@@ -9362,7 +9362,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -9372,7 +9372,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -9408,7 +9408,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -9499,7 +9499,7 @@
(i32.const 5)
)
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.load
(get_local $0)
@@ -9507,7 +9507,7 @@
(i32.const 64)
)
(i32.const 0)
- (block i32
+ (block (result i32)
(i32.store
(get_local $3)
(i32.load offset=60
@@ -9582,12 +9582,12 @@
(get_local $0)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -9637,7 +9637,7 @@
(get_local $1)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 8)
)
diff --git a/test/emcc_O2_hello_world.fromasm.clamp.no-opts b/test/emcc_O2_hello_world.fromasm.clamp.no-opts
index 43a4f9cdb..427135b30 100644
--- a/test/emcc_O2_hello_world.fromasm.clamp.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.clamp.no-opts
@@ -180,7 +180,7 @@
)
(block
(set_local $i2
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i1)
(i32.const 11)
@@ -983,7 +983,7 @@
)
)
(set_local $i5
- (if i32
+ (if (result i32)
(get_local $i15)
(get_local $i10)
(get_local $i5)
@@ -993,7 +993,7 @@
(get_local $i23)
)
(set_local $i7
- (if i32
+ (if (result i32)
(get_local $i15)
(get_local $i23)
(get_local $i7)
@@ -1848,7 +1848,7 @@
(set_local $i7
(i32.shl
(get_local $i5)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i32)
(i32.const 31)
@@ -1958,7 +1958,7 @@
)
)
(set_local $i16
- (if i32
+ (if (result i32)
(i32.or
(i32.eq
(get_local $i9)
@@ -2248,14 +2248,14 @@
)
)
(set_local $i3
- (if i32
+ (if (result i32)
(get_local $i7)
(get_local $i8)
(get_local $i37)
)
)
(set_local $i8
- (if i32
+ (if (result i32)
(get_local $i7)
(get_local $i38)
(get_local $i39)
@@ -2325,7 +2325,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i44)
(i32.const 0)
@@ -3135,7 +3135,7 @@
(set_local $i4
(i32.shl
(get_local $i43)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i52)
(i32.const 31)
@@ -3721,18 +3721,18 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i52)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i51
(i32.load
(i32.const 608)
)
)
- (block i32
+ (block (result i32)
(set_local $i50
(i32.add
(get_local $i51)
@@ -3793,12 +3793,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.le_u
(get_local $i51)
(get_local $i52)
)
- (block i32
+ (block (result i32)
(set_local $i45
(i32.add
(get_local $i50)
@@ -3923,12 +3923,12 @@
)
(block $do-once35
(if
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 173)
)
- (block i32
+ (block (result i32)
(set_local $i52
(call $_sbrk
(i32.const 0)
@@ -4014,7 +4014,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i45)
(i32.const 0)
@@ -4087,7 +4087,7 @@
)
(block $do-once38
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_u
(get_local $i53)
@@ -4104,13 +4104,13 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $i52
(i32.load
(i32.const 656)
)
)
- (block i32
+ (block (result i32)
(set_local $i5
(i32.and
(i32.add
@@ -4204,9 +4204,9 @@
)
)
(if
- (if i32
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 190)
@@ -4217,13 +4217,13 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i63
(call $_sbrk
(get_local $i43)
)
)
- (block i32
+ (block (result i32)
(set_local $i43
(call $_sbrk
(i32.const 0)
@@ -4249,7 +4249,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i60
(i32.sub
(get_local $i43)
@@ -4382,8 +4382,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 203)
@@ -4429,7 +4429,7 @@
)
)
(set_local $i44
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -4623,7 +4623,7 @@
(set_local $i44
(i32.add
(get_local $i58)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -4651,7 +4651,7 @@
(set_local $i43
(i32.add
(get_local $i61)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -5728,7 +5728,7 @@
(set_local $i50
(i32.shl
(get_local $i79)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i82)
(i32.const 31)
@@ -5994,12 +5994,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.le_u
(get_local $i63)
(get_local $i60)
)
- (block i32
+ (block (result i32)
(set_local $i53
(i32.add
(get_local $i63)
@@ -6051,7 +6051,7 @@
(set_local $i63
(i32.add
(get_local $i44)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i53)
@@ -6077,7 +6077,7 @@
)
)
(set_local $i44
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i63)
(get_local $i53)
@@ -6099,7 +6099,7 @@
)
)
(set_local $i61
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i43)
@@ -6600,7 +6600,7 @@
(set_local $i5
(i32.shl
(get_local $i63)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i89)
(i32.const 31)
@@ -6911,7 +6911,7 @@
)
)
(set_local $i62
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i5)
@@ -8945,7 +8945,7 @@
(set_local $i31
(i32.shl
(get_local $i29)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i32)
(i32.const 31)
@@ -10464,12 +10464,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i6)
(get_local $i8)
)
- (block i32
+ (block (result i32)
(set_local $i11
(i32.and
(get_local $i2)
@@ -10567,7 +10567,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.gt_u
(i32.load
(get_local $i2)
@@ -10576,7 +10576,7 @@
(get_local $i3)
)
)
- (block i32
+ (block (result i32)
(drop
(call_indirect $FUNCSIG$iiii
(get_local $i1)
@@ -11062,7 +11062,7 @@
)
(block
(if
- (if i32
+ (if (result i32)
(i32.ne
(i32.load8_s
(i32.add
@@ -11072,14 +11072,14 @@
)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(set_local $i5
(i32.add
(get_local $i2)
(i32.const 20)
)
)
- (block i32
+ (block (result i32)
(set_local $i6
(i32.load
(get_local $i5)
@@ -11347,7 +11347,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -11461,7 +11461,7 @@
(i32.const 5)
)
(if
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(i32.load
@@ -11471,7 +11471,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $i5)
(i32.load
@@ -11481,7 +11481,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.add
(get_local $i5)
@@ -11489,7 +11489,7 @@
)
(i32.const 21505)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.add
(get_local $i5)
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise b/test/emcc_O2_hello_world.fromasm.imprecise
index 48727376b..824fcd3da 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise
+++ b/test/emcc_O2_hello_world.fromasm.imprecise
@@ -1394,14 +1394,14 @@
(i32.load offset=480
(i32.shl
(tee_local $9
- (if i32
+ (if (result i32)
(tee_local $10
(i32.shr_u
(get_local $1)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -2421,14 +2421,14 @@
(i32.add
(i32.shl
(tee_local $10
- (if i32
+ (if (result i32)
(tee_local $11
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
@@ -3075,7 +3075,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(tee_local $10
(i32.load
(i32.const 616)
@@ -3107,8 +3107,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(select
(i32.lt_u
(get_local $3)
@@ -3117,8 +3117,8 @@
(i32.const 0)
(i32.eq
(tee_local $7
- (block $label$break$L257 i32
- (if i32
+ (block $label$break$L257 (result i32)
+ (if (result i32)
(i32.and
(i32.load
(i32.const 620)
@@ -3126,7 +3126,7 @@
(i32.const 4)
)
(i32.const 190)
- (block i32
+ (block (result i32)
(block $label$break$L259
(if
(tee_local $10
@@ -3141,7 +3141,7 @@
(loop $while-in34
(block $while-out33
(if
- (if i32
+ (if (result i32)
(i32.le_u
(tee_local $26
(i32.load
@@ -3258,7 +3258,7 @@
)
(block $do-once35
(if
- (if i32
+ (if (result i32)
(i32.eq
(get_local $7)
(i32.const 173)
@@ -3275,7 +3275,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $8
(i32.add
@@ -3403,7 +3403,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_u
(get_local $14)
@@ -3756,7 +3756,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $20)
(tee_local $18
@@ -3765,7 +3765,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.const 192)
(get_local $20)
@@ -4609,15 +4609,15 @@
(i32.add
(i32.shl
(tee_local $1
- (block $do-once61 i32
- (if i32
+ (block $do-once61 (result i32)
+ (if (result i32)
(tee_local $2
(i32.shr_u
(get_local $14)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once61
(i32.const 31)
@@ -4993,7 +4993,7 @@
)
(loop $while-in66
(if
- (if i32
+ (if (result i32)
(i32.le_u
(tee_local $4
(i32.load
@@ -5347,14 +5347,14 @@
(i32.add
(i32.shl
(tee_local $1
- (if i32
+ (if (result i32)
(tee_local $18
(i32.shr_u
(get_local $4)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $4)
(i32.const 16777215)
@@ -7352,14 +7352,14 @@
(i32.add
(i32.shl
(tee_local $3
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -7833,11 +7833,11 @@
(i32.eq
(get_local $5)
(tee_local $6
- (if i32
+ (if (result i32)
(i32.load
(i32.const 8)
)
- (block i32
+ (block (result i32)
(call $_pthread_cleanup_push
(i32.const 4)
(get_local $0)
@@ -7869,7 +7869,7 @@
)
(get_local $9)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $11)
(i32.load
@@ -7935,12 +7935,12 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.eq
(get_local $3)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.add
@@ -8360,7 +8360,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 56)
)
@@ -8390,7 +8390,7 @@
)
(loop $while-in
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -8668,7 +8668,7 @@
)
(block
(if
- (if i32
+ (if (result i32)
(i32.lt_u
(tee_local $2
(i32.load
@@ -8714,7 +8714,7 @@
)
)
(set_local $4
- (if i32
+ (if (result i32)
(i32.eq
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -8754,8 +8754,8 @@
(local $5 i32)
(local $6 i32)
(tee_local $0
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.gt_u
(i32.load
(tee_local $1
@@ -8774,7 +8774,7 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -8800,7 +8800,7 @@
(i32.const 0)
)
(i32.const -1)
- (block i32
+ (block (result i32)
(if
(i32.lt_u
(tee_local $4
@@ -9163,7 +9163,7 @@
(local $3 i32)
(local $4 i32)
(set_local $3
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(tee_local $1
@@ -9181,8 +9181,8 @@
)
)
(set_local $0
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(i32.lt_s
(call $_fputs
(get_local $0)
@@ -9191,9 +9191,9 @@
(i32.const 0)
)
(i32.const 1)
- (block i32
+ (block (result i32)
(if
- (if i32
+ (if (result i32)
(i32.ne
(i32.load8_s offset=75
(get_local $1)
@@ -9301,7 +9301,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -9311,7 +9311,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -9352,7 +9352,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.load
@@ -9361,7 +9361,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -9371,7 +9371,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -9488,7 +9488,7 @@
(i32.const 5)
)
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.load
(get_local $0)
@@ -9496,7 +9496,7 @@
(i32.const 64)
)
(i32.const 0)
- (block i32
+ (block (result i32)
(i32.store
(get_local $3)
(i32.load offset=60
@@ -9571,12 +9571,12 @@
(get_local $0)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -9626,7 +9626,7 @@
(get_local $1)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 8)
)
diff --git a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
index 4ba606c86..9ae5ccea1 100644
--- a/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.imprecise.no-opts
@@ -180,7 +180,7 @@
)
(block
(set_local $i2
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i1)
(i32.const 11)
@@ -983,7 +983,7 @@
)
)
(set_local $i5
- (if i32
+ (if (result i32)
(get_local $i15)
(get_local $i10)
(get_local $i5)
@@ -993,7 +993,7 @@
(get_local $i23)
)
(set_local $i7
- (if i32
+ (if (result i32)
(get_local $i15)
(get_local $i23)
(get_local $i7)
@@ -1848,7 +1848,7 @@
(set_local $i7
(i32.shl
(get_local $i5)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i32)
(i32.const 31)
@@ -1958,7 +1958,7 @@
)
)
(set_local $i16
- (if i32
+ (if (result i32)
(i32.or
(i32.eq
(get_local $i9)
@@ -2248,14 +2248,14 @@
)
)
(set_local $i3
- (if i32
+ (if (result i32)
(get_local $i7)
(get_local $i8)
(get_local $i37)
)
)
(set_local $i8
- (if i32
+ (if (result i32)
(get_local $i7)
(get_local $i38)
(get_local $i39)
@@ -2325,7 +2325,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i44)
(i32.const 0)
@@ -3135,7 +3135,7 @@
(set_local $i4
(i32.shl
(get_local $i43)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i52)
(i32.const 31)
@@ -3721,18 +3721,18 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i52)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i51
(i32.load
(i32.const 608)
)
)
- (block i32
+ (block (result i32)
(set_local $i50
(i32.add
(get_local $i51)
@@ -3793,12 +3793,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.le_u
(get_local $i51)
(get_local $i52)
)
- (block i32
+ (block (result i32)
(set_local $i45
(i32.add
(get_local $i50)
@@ -3923,12 +3923,12 @@
)
(block $do-once35
(if
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 173)
)
- (block i32
+ (block (result i32)
(set_local $i52
(call $_sbrk
(i32.const 0)
@@ -4014,7 +4014,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i45)
(i32.const 0)
@@ -4087,7 +4087,7 @@
)
(block $do-once38
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_u
(get_local $i53)
@@ -4104,13 +4104,13 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $i52
(i32.load
(i32.const 656)
)
)
- (block i32
+ (block (result i32)
(set_local $i5
(i32.and
(i32.add
@@ -4204,9 +4204,9 @@
)
)
(if
- (if i32
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 190)
@@ -4217,13 +4217,13 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i63
(call $_sbrk
(get_local $i43)
)
)
- (block i32
+ (block (result i32)
(set_local $i43
(call $_sbrk
(i32.const 0)
@@ -4249,7 +4249,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i60
(i32.sub
(get_local $i43)
@@ -4382,8 +4382,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 203)
@@ -4429,7 +4429,7 @@
)
)
(set_local $i44
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -4623,7 +4623,7 @@
(set_local $i44
(i32.add
(get_local $i58)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -4651,7 +4651,7 @@
(set_local $i43
(i32.add
(get_local $i61)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -5728,7 +5728,7 @@
(set_local $i50
(i32.shl
(get_local $i79)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i82)
(i32.const 31)
@@ -5994,12 +5994,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.le_u
(get_local $i63)
(get_local $i60)
)
- (block i32
+ (block (result i32)
(set_local $i53
(i32.add
(get_local $i63)
@@ -6051,7 +6051,7 @@
(set_local $i63
(i32.add
(get_local $i44)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i53)
@@ -6077,7 +6077,7 @@
)
)
(set_local $i44
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i63)
(get_local $i53)
@@ -6099,7 +6099,7 @@
)
)
(set_local $i61
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i43)
@@ -6600,7 +6600,7 @@
(set_local $i5
(i32.shl
(get_local $i63)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i89)
(i32.const 31)
@@ -6911,7 +6911,7 @@
)
)
(set_local $i62
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i5)
@@ -8945,7 +8945,7 @@
(set_local $i31
(i32.shl
(get_local $i29)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i32)
(i32.const 31)
@@ -10464,12 +10464,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i6)
(get_local $i8)
)
- (block i32
+ (block (result i32)
(set_local $i11
(i32.and
(get_local $i2)
@@ -10567,7 +10567,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.gt_u
(i32.load
(get_local $i2)
@@ -10576,7 +10576,7 @@
(get_local $i3)
)
)
- (block i32
+ (block (result i32)
(drop
(call_indirect $FUNCSIG$iiii
(get_local $i1)
@@ -11062,7 +11062,7 @@
)
(block
(if
- (if i32
+ (if (result i32)
(i32.ne
(i32.load8_s
(i32.add
@@ -11072,14 +11072,14 @@
)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(set_local $i5
(i32.add
(get_local $i2)
(i32.const 20)
)
)
- (block i32
+ (block (result i32)
(set_local $i6
(i32.load
(get_local $i5)
@@ -11449,7 +11449,7 @@
(i32.const 5)
)
(if
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(i32.load
@@ -11459,7 +11459,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $i5)
(i32.load
@@ -11469,7 +11469,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.add
(get_local $i5)
@@ -11477,7 +11477,7 @@
)
(i32.const 21505)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.add
(get_local $i5)
diff --git a/test/emcc_O2_hello_world.fromasm.no-opts b/test/emcc_O2_hello_world.fromasm.no-opts
index 43a4f9cdb..427135b30 100644
--- a/test/emcc_O2_hello_world.fromasm.no-opts
+++ b/test/emcc_O2_hello_world.fromasm.no-opts
@@ -180,7 +180,7 @@
)
(block
(set_local $i2
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i1)
(i32.const 11)
@@ -983,7 +983,7 @@
)
)
(set_local $i5
- (if i32
+ (if (result i32)
(get_local $i15)
(get_local $i10)
(get_local $i5)
@@ -993,7 +993,7 @@
(get_local $i23)
)
(set_local $i7
- (if i32
+ (if (result i32)
(get_local $i15)
(get_local $i23)
(get_local $i7)
@@ -1848,7 +1848,7 @@
(set_local $i7
(i32.shl
(get_local $i5)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i32)
(i32.const 31)
@@ -1958,7 +1958,7 @@
)
)
(set_local $i16
- (if i32
+ (if (result i32)
(i32.or
(i32.eq
(get_local $i9)
@@ -2248,14 +2248,14 @@
)
)
(set_local $i3
- (if i32
+ (if (result i32)
(get_local $i7)
(get_local $i8)
(get_local $i37)
)
)
(set_local $i8
- (if i32
+ (if (result i32)
(get_local $i7)
(get_local $i38)
(get_local $i39)
@@ -2325,7 +2325,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i44)
(i32.const 0)
@@ -3135,7 +3135,7 @@
(set_local $i4
(i32.shl
(get_local $i43)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i52)
(i32.const 31)
@@ -3721,18 +3721,18 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i52)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i51
(i32.load
(i32.const 608)
)
)
- (block i32
+ (block (result i32)
(set_local $i50
(i32.add
(get_local $i51)
@@ -3793,12 +3793,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.le_u
(get_local $i51)
(get_local $i52)
)
- (block i32
+ (block (result i32)
(set_local $i45
(i32.add
(get_local $i50)
@@ -3923,12 +3923,12 @@
)
(block $do-once35
(if
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 173)
)
- (block i32
+ (block (result i32)
(set_local $i52
(call $_sbrk
(i32.const 0)
@@ -4014,7 +4014,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.ne
(get_local $i45)
(i32.const 0)
@@ -4087,7 +4087,7 @@
)
(block $do-once38
(if
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_u
(get_local $i53)
@@ -4104,13 +4104,13 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $i52
(i32.load
(i32.const 656)
)
)
- (block i32
+ (block (result i32)
(set_local $i5
(i32.and
(i32.add
@@ -4204,9 +4204,9 @@
)
)
(if
- (if i32
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 190)
@@ -4217,13 +4217,13 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i63
(call $_sbrk
(get_local $i43)
)
)
- (block i32
+ (block (result i32)
(set_local $i43
(call $_sbrk
(i32.const 0)
@@ -4249,7 +4249,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $i60
(i32.sub
(get_local $i43)
@@ -4382,8 +4382,8 @@
)
)
(if
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.eq
(get_local $i36)
(i32.const 203)
@@ -4429,7 +4429,7 @@
)
)
(set_local $i44
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -4623,7 +4623,7 @@
(set_local $i44
(i32.add
(get_local $i58)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -4651,7 +4651,7 @@
(set_local $i43
(i32.add
(get_local $i61)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i63)
@@ -5728,7 +5728,7 @@
(set_local $i50
(i32.shl
(get_local $i79)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i82)
(i32.const 31)
@@ -5994,12 +5994,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.le_u
(get_local $i63)
(get_local $i60)
)
- (block i32
+ (block (result i32)
(set_local $i53
(i32.add
(get_local $i63)
@@ -6051,7 +6051,7 @@
(set_local $i63
(i32.add
(get_local $i44)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i53)
@@ -6077,7 +6077,7 @@
)
)
(set_local $i44
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i63)
(get_local $i53)
@@ -6099,7 +6099,7 @@
)
)
(set_local $i61
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i43)
@@ -6600,7 +6600,7 @@
(set_local $i5
(i32.shl
(get_local $i63)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i89)
(i32.const 31)
@@ -6911,7 +6911,7 @@
)
)
(set_local $i62
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $i5)
@@ -8945,7 +8945,7 @@
(set_local $i31
(i32.shl
(get_local $i29)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $i32)
(i32.const 31)
@@ -10464,12 +10464,12 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $i6)
(get_local $i8)
)
- (block i32
+ (block (result i32)
(set_local $i11
(i32.and
(get_local $i2)
@@ -10567,7 +10567,7 @@
)
)
(if
- (if i32
+ (if (result i32)
(i32.gt_u
(i32.load
(get_local $i2)
@@ -10576,7 +10576,7 @@
(get_local $i3)
)
)
- (block i32
+ (block (result i32)
(drop
(call_indirect $FUNCSIG$iiii
(get_local $i1)
@@ -11062,7 +11062,7 @@
)
(block
(if
- (if i32
+ (if (result i32)
(i32.ne
(i32.load8_s
(i32.add
@@ -11072,14 +11072,14 @@
)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(set_local $i5
(i32.add
(get_local $i2)
(i32.const 20)
)
)
- (block i32
+ (block (result i32)
(set_local $i6
(i32.load
(get_local $i5)
@@ -11347,7 +11347,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -11461,7 +11461,7 @@
(i32.const 5)
)
(if
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(i32.load
@@ -11471,7 +11471,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $i5)
(i32.load
@@ -11481,7 +11481,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.add
(get_local $i5)
@@ -11489,7 +11489,7 @@
)
(i32.const 21505)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.add
(get_local $i5)
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm
index cc2627501..9d87a0e2c 100644
--- a/test/emcc_hello_world.fromasm
+++ b/test/emcc_hello_world.fromasm
@@ -199,12 +199,12 @@
(i32.store
(get_local $1)
(tee_local $2
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(f64.const 0)
)
- (block i32
+ (block (result i32)
(set_local $0
(call $_frexp
(f64.mul
@@ -352,7 +352,7 @@
(get_local $0)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 16)
)
@@ -532,7 +532,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -542,7 +542,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -595,10 +595,10 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(get_local $2)
(get_local $1)
- (block i32
+ (block (result i32)
(call $___unlockfile
(get_local $0)
)
@@ -609,7 +609,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 12)
)
@@ -632,7 +632,7 @@
)
(loop $while-in
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -912,7 +912,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(tee_local $5
@@ -921,7 +921,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(tee_local $7
@@ -956,12 +956,12 @@
(get_local $5)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $4)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(i32.add
@@ -979,7 +979,7 @@
)
(get_local $3)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $5)
)
@@ -1058,7 +1058,7 @@
)
)
(set_local $2
- (if i32
+ (if (result i32)
(i32.eq
(get_local $4)
(i32.const 2)
@@ -1159,7 +1159,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $_printf_core
(i32.const 0)
@@ -1171,9 +1171,9 @@
(i32.const 0)
)
(i32.const -1)
- (block i32
+ (block (result i32)
(set_local $14
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $0)
@@ -1445,15 +1445,15 @@
)
)
(set_local $2
- (block $label$break$L10 i32
- (if i32
+ (block $label$break$L10 (result i32)
+ (if (result i32)
(i32.gt_s
(i32.load8_s offset=75
(get_local $2)
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(set_local $3
(get_local $1)
)
@@ -1580,7 +1580,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $1
(i32.load
@@ -1589,7 +1589,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -1599,7 +1599,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -1635,10 +1635,10 @@
)
)
(func $_wcrtomb (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(get_local $0)
- (block i32
+ (block (result i32)
(if
(i32.lt_u
(get_local $1)
@@ -1738,7 +1738,7 @@
)
)
)
- (if i32
+ (if (result i32)
(i32.lt_u
(i32.add
(get_local $1)
@@ -1746,7 +1746,7 @@
)
(i32.const 1048576)
)
- (block i32
+ (block (result i32)
(i32.store8
(get_local $0)
(i32.or
@@ -1795,7 +1795,7 @@
)
(i32.const 4)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.const 84)
@@ -1809,7 +1809,7 @@
)
)
(func $_wctomb (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $0)
(call $_wcrtomb
(get_local $0)
@@ -2060,12 +2060,12 @@
)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -2086,7 +2086,7 @@
(local $5 i32)
(local $6 i32)
(tee_local $0
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br_if $__rjti$0
(i32.le_u
@@ -2213,9 +2213,9 @@
)
)
(func $i32s-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
- (if i32
+ (if (result i32)
(i32.and
(i32.eq
(get_local $0)
@@ -2236,7 +2236,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.rem_s
(get_local $0)
@@ -2246,7 +2246,7 @@
)
)
(func $i32u-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.rem_u
(get_local $0)
@@ -2256,7 +2256,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -2471,7 +2471,7 @@
(i32.const -1)
)
(set_local $16
- (if i32
+ (if (result i32)
(i32.gt_s
(get_local $10)
(i32.sub
@@ -2479,7 +2479,7 @@
(get_local $16)
)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.const 75)
@@ -2619,7 +2619,7 @@
)
)
(set_local $8
- (if i32
+ (if (result i32)
(i32.lt_u
(tee_local $8
(i32.add
@@ -2638,7 +2638,7 @@
)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(set_local $6
(i32.load8_s
(tee_local $10
@@ -2673,7 +2673,7 @@
(get_local $11)
)
)
- (block i32
+ (block (result i32)
(set_local $6
(get_local $11)
)
@@ -2797,7 +2797,7 @@
)
(block
(set_local $10
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br_if $__rjti$0
(i32.ge_u
@@ -2922,12 +2922,12 @@
)
)
(set_local $1
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $14)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $11
(i32.or
(get_local $1)
@@ -2942,7 +2942,7 @@
)
(get_local $8)
)
- (block i32
+ (block (result i32)
(set_local $11
(get_local $1)
)
@@ -3049,14 +3049,14 @@
)
(block $label$break$L46
(set_local $6
- (if i32
+ (if (result i32)
(i32.eq
(i32.load8_s
(get_local $10)
)
(i32.const 46)
)
- (block i32
+ (block (result i32)
(if
(i32.ne
(tee_local $8
@@ -3214,9 +3214,9 @@
(br $label$break$L1)
)
)
- (if i32
+ (if (result i32)
(get_local $29)
- (block i32
+ (block (result i32)
(set_local $8
(i32.load
(tee_local $10
@@ -3244,7 +3244,7 @@
)
(get_local $8)
)
- (block i32
+ (block (result i32)
(set_local $10
(get_local $6)
)
@@ -3461,7 +3461,7 @@
)
)
(set_local $5
- (block $__rjto$8 i32
+ (block $__rjto$8 (result i32)
(block $__rjti$8
(block $__rjti$7
(block $__rjti$6
@@ -4021,14 +4021,14 @@
(get_local $15)
)
(set_local $31
- (if i32
+ (if (result i32)
(i32.lt_s
(i32.load offset=4
(get_global $tempDoublePtr)
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $27
(i32.const 1)
)
@@ -4039,18 +4039,18 @@
)
(i32.const 4108)
)
- (if i32
+ (if (result i32)
(i32.and
(get_local $11)
(i32.const 2048)
)
- (block i32
+ (block (result i32)
(set_local $27
(i32.const 1)
)
(i32.const 4111)
)
- (block i32
+ (block (result i32)
(set_local $27
(tee_local $5
(i32.and
@@ -4073,8 +4073,8 @@
(get_local $15)
)
(set_local $7
- (block $do-once49 i32
- (if i32
+ (block $do-once49 (result i32)
+ (if (result i32)
(i32.or
(i32.lt_u
(tee_local $5
@@ -4095,7 +4095,7 @@
(i32.const 0)
)
)
- (block i32
+ (block (result i32)
(if
(tee_local $5
(f64.ne
@@ -4148,7 +4148,7 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(i32.or
(i32.gt_u
(get_local $6)
@@ -4164,7 +4164,7 @@
)
)
(get_local $24)
- (block f64
+ (block (result f64)
(set_local $15
(f64.const 8)
)
@@ -4184,7 +4184,7 @@
)
)
)
- (if f64
+ (if (result f64)
(i32.eq
(i32.load8_s
(get_local $9)
@@ -4339,8 +4339,8 @@
)
)
(set_local $5
- (block $do-once57 i32
- (if i32
+ (block $do-once57 (result i32)
+ (if (result i32)
(i32.eq
(i32.sub
(tee_local $7
@@ -4353,7 +4353,7 @@
)
(i32.const 1)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once57
(get_local $7)
@@ -4539,9 +4539,9 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(get_local $5)
- (block f64
+ (block (result f64)
(i32.store
(get_local $21)
(tee_local $5
@@ -4558,7 +4558,7 @@
(f64.const 268435456)
)
)
- (block f64
+ (block (result f64)
(set_local $5
(i32.load
(get_local $21)
@@ -5055,7 +5055,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.lt_s
(tee_local $6
(i32.add
@@ -5106,7 +5106,7 @@
(i32.const -9)
)
)
- (block i32
+ (block (result i32)
(set_local $13
(call $i32s-div
(tee_local $6
@@ -5206,7 +5206,7 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(i32.lt_u
(get_local $13)
(tee_local $51
@@ -5408,7 +5408,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $12
(get_local $5)
)
@@ -5481,12 +5481,12 @@
(i32.const 1)
)
(tee_local $5
- (block $do-once91 i32
- (if i32
+ (block $do-once91 (result i32)
+ (if (result i32)
(get_local $38)
- (block i32
+ (block (result i32)
(set_local $7
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_s
(tee_local $5
@@ -5505,7 +5505,7 @@
(i32.const -5)
)
)
- (block i32
+ (block (result i32)
(set_local $17
(i32.sub
(i32.add
@@ -5520,7 +5520,7 @@
(i32.const -1)
)
)
- (block i32
+ (block (result i32)
(set_local $17
(i32.add
(get_local $5)
@@ -5634,7 +5634,7 @@
(i32.const -9)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(i32.or
(get_local $7)
@@ -5642,7 +5642,7 @@
)
(i32.const 102)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.const 0)
)
@@ -5669,7 +5669,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.const 0)
)
@@ -5701,7 +5701,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.and
(get_local $11)
@@ -5728,7 +5728,7 @@
)
)
(tee_local $7
- (if i32
+ (if (result i32)
(tee_local $17
(i32.eq
(i32.or
@@ -5738,7 +5738,7 @@
(i32.const 102)
)
)
- (block i32
+ (block (result i32)
(set_local $18
(i32.const 0)
)
@@ -5751,7 +5751,7 @@
)
)
)
- (block i32
+ (block (result i32)
(if
(i32.lt_s
(i32.sub
@@ -6359,7 +6359,7 @@
)
)
)
- (block i32
+ (block (result i32)
(call $_pad
(get_local $0)
(i32.const 32)
@@ -6898,7 +6898,7 @@
)
)
)
- (if i32
+ (if (result i32)
(i32.or
(get_local $6)
(tee_local $12
@@ -6920,7 +6920,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $5)
)
@@ -6950,7 +6950,7 @@
)
(get_local $22)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $22)
)
@@ -9144,14 +9144,14 @@
)
(block
(set_local $14
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -10143,14 +10143,14 @@
(i32.add
(i32.shl
(tee_local $7
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
@@ -10904,7 +10904,7 @@
)
(block
(set_local $3
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.add
@@ -11545,7 +11545,7 @@
(tee_local $0
(i32.add
(tee_local $0
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(tee_local $0
@@ -11557,7 +11557,7 @@
)
(i32.const 1)
)
- (block i32
+ (block (result i32)
(set_local $11
(i32.and
(get_local $0)
@@ -12175,15 +12175,15 @@
(i32.add
(i32.shl
(tee_local $2
- (block $do-once65 i32
- (if i32
+ (block $do-once65 (result i32)
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $7)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once65
(i32.const 31)
@@ -12860,14 +12860,14 @@
(i32.add
(i32.shl
(tee_local $4
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $5)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $5)
(i32.const 16777215)
@@ -14813,14 +14813,14 @@
(i32.add
(i32.shl
(tee_local $5
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp
index 2edc60677..24b65fc1f 100644
--- a/test/emcc_hello_world.fromasm.clamp
+++ b/test/emcc_hello_world.fromasm.clamp
@@ -197,12 +197,12 @@
(i32.store
(get_local $1)
(tee_local $2
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(f64.const 0)
)
- (block i32
+ (block (result i32)
(set_local $0
(call $_frexp
(f64.mul
@@ -350,7 +350,7 @@
(get_local $0)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 16)
)
@@ -530,7 +530,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -540,7 +540,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -593,10 +593,10 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(get_local $2)
(get_local $1)
- (block i32
+ (block (result i32)
(call $___unlockfile
(get_local $0)
)
@@ -607,7 +607,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 12)
)
@@ -630,7 +630,7 @@
)
(loop $while-in
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -910,7 +910,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(tee_local $5
@@ -919,7 +919,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(tee_local $7
@@ -954,12 +954,12 @@
(get_local $5)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $4)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(i32.add
@@ -977,7 +977,7 @@
)
(get_local $3)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $5)
)
@@ -1056,7 +1056,7 @@
)
)
(set_local $2
- (if i32
+ (if (result i32)
(i32.eq
(get_local $4)
(i32.const 2)
@@ -1157,7 +1157,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $_printf_core
(i32.const 0)
@@ -1169,9 +1169,9 @@
(i32.const 0)
)
(i32.const -1)
- (block i32
+ (block (result i32)
(set_local $14
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $0)
@@ -1443,15 +1443,15 @@
)
)
(set_local $2
- (block $label$break$L10 i32
- (if i32
+ (block $label$break$L10 (result i32)
+ (if (result i32)
(i32.gt_s
(i32.load8_s offset=75
(get_local $2)
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(set_local $3
(get_local $1)
)
@@ -1578,7 +1578,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $1
(i32.load
@@ -1587,7 +1587,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -1597,7 +1597,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -1633,10 +1633,10 @@
)
)
(func $_wcrtomb (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(get_local $0)
- (block i32
+ (block (result i32)
(if
(i32.lt_u
(get_local $1)
@@ -1736,7 +1736,7 @@
)
)
)
- (if i32
+ (if (result i32)
(i32.lt_u
(i32.add
(get_local $1)
@@ -1744,7 +1744,7 @@
)
(i32.const 1048576)
)
- (block i32
+ (block (result i32)
(i32.store8
(get_local $0)
(i32.or
@@ -1793,7 +1793,7 @@
)
(i32.const 4)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.const 84)
@@ -1807,7 +1807,7 @@
)
)
(func $_wctomb (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $0)
(call $_wcrtomb
(get_local $0)
@@ -2058,12 +2058,12 @@
)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -2084,7 +2084,7 @@
(local $5 i32)
(local $6 i32)
(tee_local $0
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br_if $__rjti$0
(i32.le_u
@@ -2211,19 +2211,19 @@
)
)
(func $f64-to-int (param $0 f64) (result i32)
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(get_local $0)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.ge
(get_local $0)
(f64.const 2147483648)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.le
(get_local $0)
(f64.const -2147483649)
@@ -2237,9 +2237,9 @@
)
)
(func $i32s-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
- (if i32
+ (if (result i32)
(i32.and
(i32.eq
(get_local $0)
@@ -2260,7 +2260,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.rem_s
(get_local $0)
@@ -2270,7 +2270,7 @@
)
)
(func $i32u-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.rem_u
(get_local $0)
@@ -2280,7 +2280,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -2495,7 +2495,7 @@
(i32.const -1)
)
(set_local $16
- (if i32
+ (if (result i32)
(i32.gt_s
(get_local $10)
(i32.sub
@@ -2503,7 +2503,7 @@
(get_local $16)
)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.const 75)
@@ -2643,7 +2643,7 @@
)
)
(set_local $8
- (if i32
+ (if (result i32)
(i32.lt_u
(tee_local $8
(i32.add
@@ -2662,7 +2662,7 @@
)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(set_local $6
(i32.load8_s
(tee_local $10
@@ -2697,7 +2697,7 @@
(get_local $11)
)
)
- (block i32
+ (block (result i32)
(set_local $6
(get_local $11)
)
@@ -2821,7 +2821,7 @@
)
(block
(set_local $10
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br_if $__rjti$0
(i32.ge_u
@@ -2946,12 +2946,12 @@
)
)
(set_local $1
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $14)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $11
(i32.or
(get_local $1)
@@ -2966,7 +2966,7 @@
)
(get_local $8)
)
- (block i32
+ (block (result i32)
(set_local $11
(get_local $1)
)
@@ -3073,14 +3073,14 @@
)
(block $label$break$L46
(set_local $6
- (if i32
+ (if (result i32)
(i32.eq
(i32.load8_s
(get_local $10)
)
(i32.const 46)
)
- (block i32
+ (block (result i32)
(if
(i32.ne
(tee_local $8
@@ -3238,9 +3238,9 @@
(br $label$break$L1)
)
)
- (if i32
+ (if (result i32)
(get_local $29)
- (block i32
+ (block (result i32)
(set_local $8
(i32.load
(tee_local $10
@@ -3268,7 +3268,7 @@
)
(get_local $8)
)
- (block i32
+ (block (result i32)
(set_local $10
(get_local $6)
)
@@ -3485,7 +3485,7 @@
)
)
(set_local $5
- (block $__rjto$8 i32
+ (block $__rjto$8 (result i32)
(block $__rjti$8
(block $__rjti$7
(block $__rjti$6
@@ -4045,14 +4045,14 @@
(get_local $15)
)
(set_local $31
- (if i32
+ (if (result i32)
(i32.lt_s
(i32.load offset=4
(get_global $tempDoublePtr)
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $27
(i32.const 1)
)
@@ -4063,18 +4063,18 @@
)
(i32.const 4108)
)
- (if i32
+ (if (result i32)
(i32.and
(get_local $11)
(i32.const 2048)
)
- (block i32
+ (block (result i32)
(set_local $27
(i32.const 1)
)
(i32.const 4111)
)
- (block i32
+ (block (result i32)
(set_local $27
(tee_local $5
(i32.and
@@ -4097,8 +4097,8 @@
(get_local $15)
)
(set_local $7
- (block $do-once49 i32
- (if i32
+ (block $do-once49 (result i32)
+ (if (result i32)
(i32.or
(i32.lt_u
(tee_local $5
@@ -4119,7 +4119,7 @@
(i32.const 0)
)
)
- (block i32
+ (block (result i32)
(if
(tee_local $5
(f64.ne
@@ -4172,7 +4172,7 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(i32.or
(i32.gt_u
(get_local $6)
@@ -4188,7 +4188,7 @@
)
)
(get_local $24)
- (block f64
+ (block (result f64)
(set_local $15
(f64.const 8)
)
@@ -4208,7 +4208,7 @@
)
)
)
- (if f64
+ (if (result f64)
(i32.eq
(i32.load8_s
(get_local $9)
@@ -4363,8 +4363,8 @@
)
)
(set_local $5
- (block $do-once57 i32
- (if i32
+ (block $do-once57 (result i32)
+ (if (result i32)
(i32.eq
(i32.sub
(tee_local $7
@@ -4377,7 +4377,7 @@
)
(i32.const 1)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once57
(get_local $7)
@@ -4563,9 +4563,9 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(get_local $5)
- (block f64
+ (block (result f64)
(i32.store
(get_local $21)
(tee_local $5
@@ -4582,7 +4582,7 @@
(f64.const 268435456)
)
)
- (block f64
+ (block (result f64)
(set_local $5
(i32.load
(get_local $21)
@@ -5079,7 +5079,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.lt_s
(tee_local $6
(i32.add
@@ -5130,7 +5130,7 @@
(i32.const -9)
)
)
- (block i32
+ (block (result i32)
(set_local $13
(call $i32s-div
(tee_local $6
@@ -5230,7 +5230,7 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(i32.lt_u
(get_local $13)
(tee_local $51
@@ -5432,7 +5432,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $12
(get_local $5)
)
@@ -5505,12 +5505,12 @@
(i32.const 1)
)
(tee_local $5
- (block $do-once91 i32
- (if i32
+ (block $do-once91 (result i32)
+ (if (result i32)
(get_local $38)
- (block i32
+ (block (result i32)
(set_local $7
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_s
(tee_local $5
@@ -5529,7 +5529,7 @@
(i32.const -5)
)
)
- (block i32
+ (block (result i32)
(set_local $17
(i32.sub
(i32.add
@@ -5544,7 +5544,7 @@
(i32.const -1)
)
)
- (block i32
+ (block (result i32)
(set_local $17
(i32.add
(get_local $5)
@@ -5658,7 +5658,7 @@
(i32.const -9)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(i32.or
(get_local $7)
@@ -5666,7 +5666,7 @@
)
(i32.const 102)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.const 0)
)
@@ -5693,7 +5693,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.const 0)
)
@@ -5725,7 +5725,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.and
(get_local $11)
@@ -5752,7 +5752,7 @@
)
)
(tee_local $7
- (if i32
+ (if (result i32)
(tee_local $17
(i32.eq
(i32.or
@@ -5762,7 +5762,7 @@
(i32.const 102)
)
)
- (block i32
+ (block (result i32)
(set_local $18
(i32.const 0)
)
@@ -5775,7 +5775,7 @@
)
)
)
- (block i32
+ (block (result i32)
(if
(i32.lt_s
(i32.sub
@@ -6383,7 +6383,7 @@
)
)
)
- (block i32
+ (block (result i32)
(call $_pad
(get_local $0)
(i32.const 32)
@@ -6922,7 +6922,7 @@
)
)
)
- (if i32
+ (if (result i32)
(i32.or
(get_local $6)
(tee_local $12
@@ -6944,7 +6944,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $5)
)
@@ -6974,7 +6974,7 @@
)
(get_local $22)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $22)
)
@@ -9168,14 +9168,14 @@
)
(block
(set_local $14
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -10167,14 +10167,14 @@
(i32.add
(i32.shl
(tee_local $7
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
@@ -10928,7 +10928,7 @@
)
(block
(set_local $3
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.add
@@ -11569,7 +11569,7 @@
(tee_local $0
(i32.add
(tee_local $0
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(tee_local $0
@@ -11581,7 +11581,7 @@
)
(i32.const 1)
)
- (block i32
+ (block (result i32)
(set_local $11
(i32.and
(get_local $0)
@@ -12199,15 +12199,15 @@
(i32.add
(i32.shl
(tee_local $2
- (block $do-once65 i32
- (if i32
+ (block $do-once65 (result i32)
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $7)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once65
(i32.const 31)
@@ -12884,14 +12884,14 @@
(i32.add
(i32.shl
(tee_local $4
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $5)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $5)
(i32.const 16777215)
@@ -14837,14 +14837,14 @@
(i32.add
(i32.shl
(tee_local $5
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
diff --git a/test/emcc_hello_world.fromasm.clamp.no-opts b/test/emcc_hello_world.fromasm.clamp.no-opts
index 7fa7b12ae..3662e5d36 100644
--- a/test/emcc_hello_world.fromasm.clamp.no-opts
+++ b/test/emcc_hello_world.fromasm.clamp.no-opts
@@ -2574,7 +2574,7 @@
)
)
(set_local $$$call21
- (if i32
+ (if (result i32)
(get_local $$tobool26)
(i32.const -1)
(get_local $$call21)
@@ -2639,7 +2639,7 @@
)
)
(set_local $$ret$1$
- (if i32
+ (if (result i32)
(get_local $$tobool37)
(get_local $$ret$1)
(i32.const -1)
@@ -4325,7 +4325,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$tobool36)
(get_local $$s$2)
(i32.const 0)
@@ -4633,19 +4633,19 @@
(return)
)
(func $f64-to-int (param $0 f64) (result i32)
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(get_local $0)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.ge
(get_local $0)
(f64.const 2147483648)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.le
(get_local $0)
(f64.const -2147483649)
@@ -4659,12 +4659,12 @@
)
)
(func $i32s-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
(i32.const 0)
- (if i32
+ (if (result i32)
(i32.and
(i32.eq
(get_local $0)
@@ -4684,7 +4684,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -4696,7 +4696,7 @@
)
)
(func $i32u-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -4708,7 +4708,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -6348,21 +6348,21 @@
)
)
(set_local $$add$ptr43$arrayidx31
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(get_local $$add$ptr43)
(get_local $$arrayidx31)
)
)
(set_local $$$l10n$0
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(i32.const 1)
(get_local $$l10n$0)
)
)
(set_local $$isdigittmp$
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(get_local $$isdigittmp)
(i32.const -1)
@@ -7866,7 +7866,7 @@
)
)
(set_local $$t$0
- (if i32
+ (if (result i32)
(get_local $$or$cond192)
(get_local $$and214)
(get_local $$conv207)
@@ -7891,7 +7891,7 @@
)
)
(set_local $$fl$1$and219
- (if i32
+ (if (result i32)
(get_local $$tobool217)
(get_local $$fl$1)
(get_local $$and219)
@@ -8234,7 +8234,7 @@
)
)
(set_local $$cond245
- (if i32
+ (if (result i32)
(get_local $$cmp240)
(get_local $$p$0)
(i32.const 8)
@@ -8478,7 +8478,7 @@
)
)
(set_local $$add269$p$0
- (if i32
+ (if (result i32)
(get_local $$cmp270)
(get_local $$add269)
(get_local $$p$0)
@@ -8624,7 +8624,7 @@
)
)
(set_local $$$
- (if i32
+ (if (result i32)
(get_local $$tobool295)
(i32.const 4091)
(i32.const 4093)
@@ -8804,7 +8804,7 @@
)
)
(set_local $$cond354
- (if i32
+ (if (result i32)
(get_local $$tobool349)
(get_local $$169)
(i32.const 4101)
@@ -8996,7 +8996,7 @@
)
)
(set_local $$$$i
- (if i32
+ (if (result i32)
(get_local $$tobool13$i)
(i32.const 4109)
(i32.const 4114)
@@ -9155,7 +9155,7 @@
)
)
(set_local $$prefix$0$add$ptr65$i
- (if i32
+ (if (result i32)
(get_local $$tobool63$i)
(get_local $$prefix$0$i)
(get_local $$add$ptr65$i)
@@ -9331,7 +9331,7 @@
)
)
(set_local $$cond100$i
- (if i32
+ (if (result i32)
(get_local $$cmp94$i)
(get_local $$sub97$i)
(get_local $$198)
@@ -9672,7 +9672,7 @@
)
)
(set_local $$l$0$i
- (if i32
+ (if (result i32)
(get_local $$or$cond384)
(get_local $$add154$i)
(get_local $$add163$i)
@@ -9839,7 +9839,7 @@
)
)
(set_local $$w$add165$i
- (if i32
+ (if (result i32)
(get_local $$cmp188$i)
(get_local $$w$1)
(get_local $$add165$i)
@@ -9858,7 +9858,7 @@
)
)
(set_local $$$p$i
- (if i32
+ (if (result i32)
(get_local $$cmp196$i)
(i32.const 6)
(get_local $$p$0)
@@ -9916,7 +9916,7 @@
)
)
(set_local $$arraydecay208$add$ptr213$i
- (if i32
+ (if (result i32)
(get_local $$cmp205$i)
(get_local $$big$i)
(get_local $$add$ptr213$i)
@@ -10023,7 +10023,7 @@
)
)
(set_local $$cond233$i
- (if i32
+ (if (result i32)
(get_local $$cmp228$i)
(i32.const 29)
(get_local $$211)
@@ -10348,7 +10348,7 @@
)
)
(set_local $$cond271$i
- (if i32
+ (if (result i32)
(get_local $$cmp265$i)
(i32.const 9)
(get_local $$sub264$i)
@@ -10473,7 +10473,7 @@
)
)
(set_local $$incdec$ptr292$a$3$i
- (if i32
+ (if (result i32)
(get_local $$tobool290$i)
(get_local $$incdec$ptr292$i)
(get_local $$a$3539$i)
@@ -10533,7 +10533,7 @@
)
)
(set_local $$incdec$ptr292$a$3$571$i
- (if i32
+ (if (result i32)
(get_local $$tobool290$569$i)
(get_local $$incdec$ptr292$570$i)
(get_local $$a$3539$i)
@@ -10549,7 +10549,7 @@
)
)
(set_local $$cond304$i
- (if i32
+ (if (result i32)
(get_local $$cmp299$i)
(get_local $$arraydecay208$add$ptr213$i)
(get_local $$incdec$ptr292$a$3573$i)
@@ -10589,7 +10589,7 @@
)
)
(set_local $$add$ptr311$z$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp308$i)
(get_local $$add$ptr311$i)
(get_local $$z$4$i)
@@ -10764,7 +10764,7 @@
)
)
(set_local $$mul335$i
- (if i32
+ (if (result i32)
(get_local $$cmp333$i)
(get_local $$e$1$i)
(i32.const 0)
@@ -11031,7 +11031,7 @@
)
)
(set_local $$$396$i
- (if f64
+ (if (result f64)
(get_local $$tobool380$i)
(f64.const 9007199254740992)
(f64.const 9007199254740994)
@@ -11071,7 +11071,7 @@
)
)
(set_local $$$404$i
- (if f64
+ (if (result f64)
(get_local $$or$cond397$i)
(f64.const 1)
(f64.const 1.5)
@@ -11424,7 +11424,7 @@
)
)
(set_local $$add$ptr442$z$3$i
- (if i32
+ (if (result i32)
(get_local $$cmp443$i)
(get_local $$add$ptr442$i)
(get_local $$z$3$lcssa$i)
@@ -11808,7 +11808,7 @@
)
)
(set_local $$$sub514$i
- (if i32
+ (if (result i32)
(get_local $$cmp515$i)
(i32.const 0)
(get_local $$sub514$i)
@@ -11821,7 +11821,7 @@
)
)
(set_local $$p$addr$2$$sub514398$i
- (if i32
+ (if (result i32)
(get_local $$cmp528$i)
(get_local $$p$addr$2$i)
(get_local $$$sub514$i)
@@ -11858,7 +11858,7 @@
)
)
(set_local $$$sub562$i
- (if i32
+ (if (result i32)
(get_local $$cmp563$i)
(i32.const 0)
(get_local $$sub562$i)
@@ -11871,7 +11871,7 @@
)
)
(set_local $$p$addr$2$$sub562399$i
- (if i32
+ (if (result i32)
(get_local $$cmp577$i)
(get_local $$p$addr$2$i)
(get_local $$$sub562$i)
@@ -11949,7 +11949,7 @@
)
)
(set_local $$add620$i
- (if i32
+ (if (result i32)
(get_local $$cmp617$i)
(get_local $$e$5$ph$i)
(i32.const 0)
@@ -11970,7 +11970,7 @@
)
)
(set_local $$cond629$i
- (if i32
+ (if (result i32)
(get_local $$cmp623$i)
(get_local $$sub626$le$i)
(get_local $$e$5$ph$i)
@@ -12215,7 +12215,7 @@
)
)
(set_local $$r$0$a$9$i
- (if i32
+ (if (result i32)
(get_local $$cmp660$i)
(get_local $$arraydecay208$add$ptr213$i)
(get_local $$a$9$ph$i)
@@ -12556,7 +12556,7 @@
)
)
(set_local $$cond732$i
- (if i32
+ (if (result i32)
(get_local $$cmp727$i)
(i32.const 9)
(get_local $$p$addr$4489$i)
@@ -12648,7 +12648,7 @@
)
)
(set_local $$z$7$add$ptr742$i
- (if i32
+ (if (result i32)
(get_local $$cmp450$lcssa$i)
(get_local $$z$7$i$lcssa)
(get_local $$add$ptr742$i)
@@ -12904,7 +12904,7 @@
)
)
(set_local $$cond800$i
- (if i32
+ (if (result i32)
(get_local $$cmp790$i)
(get_local $$sub$ptr$sub789$i)
(get_local $$p$addr$5501$i)
@@ -13049,7 +13049,7 @@
)
)
(set_local $$w$add653$i
- (if i32
+ (if (result i32)
(get_local $$cmp818$i)
(get_local $$w$1)
(get_local $$add653$i)
@@ -13073,7 +13073,7 @@
)
)
(set_local $$cond$i
- (if i32
+ (if (result i32)
(get_local $$tobool37$i)
(i32.const 4127)
(i32.const 4131)
@@ -13092,21 +13092,21 @@
)
)
(set_local $$cond43$i
- (if i32
+ (if (result i32)
(get_local $$tobool37$i)
(i32.const 4135)
(i32.const 4139)
)
)
(set_local $$pl$1$i
- (if i32
+ (if (result i32)
(get_local $$cmp38$i)
(i32.const 0)
(get_local $$pl$0$i)
)
)
(set_local $$s35$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp38$i)
(get_local $$cond43$i)
(get_local $$cond$i)
@@ -13207,7 +13207,7 @@
)
)
(set_local $$cond53$i
- (if i32
+ (if (result i32)
(get_local $$cmp48$i)
(get_local $$w$1)
(get_local $$add$i$239)
@@ -13641,14 +13641,14 @@
)
)
(set_local $$z$1
- (if i32
+ (if (result i32)
(get_local $$tobool357)
(get_local $$add$ptr359)
(get_local $$call356)
)
)
(set_local $$p$3
- (if i32
+ (if (result i32)
(get_local $$tobool357)
(get_local $$p$0)
(get_local $$sub$ptr$sub363)
@@ -14011,7 +14011,7 @@
)
)
(set_local $$cond426
- (if i32
+ (if (result i32)
(get_local $$cmp421)
(get_local $$w$1)
(get_local $$i$0$lcssa368)
@@ -14054,7 +14054,7 @@
)
)
(set_local $$and309$fl$4
- (if i32
+ (if (result i32)
(get_local $$cmp306)
(get_local $$and309)
(get_local $$fl$4)
@@ -14152,7 +14152,7 @@
)
)
(set_local $$p$2$add322
- (if i32
+ (if (result i32)
(get_local $$cmp323)
(get_local $$p$2)
(get_local $$add322)
@@ -14219,7 +14219,7 @@
)
)
(set_local $$sub$ptr$sub433$p$5
- (if i32
+ (if (result i32)
(get_local $$cmp434)
(get_local $$sub$ptr$sub433)
(get_local $$p$5)
@@ -14238,7 +14238,7 @@
)
)
(set_local $$w$2
- (if i32
+ (if (result i32)
(get_local $$cmp442)
(get_local $$add441)
(get_local $$w$1)
@@ -16233,7 +16233,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp1)
(i32.const 256)
(get_local $$sub)
@@ -17613,7 +17613,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp1)
(i32.const 16)
(get_local $$and)
@@ -18699,14 +18699,14 @@
)
)
(set_local $$sub31$rsize$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp32$i)
(get_local $$sub31$i)
(get_local $$rsize$0$i)
)
)
(set_local $$cond$v$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp32$i)
(get_local $$cond4$i)
(get_local $$v$0$i)
@@ -19903,7 +19903,7 @@
)
)
(set_local $$cond$i
- (if i32
+ (if (result i32)
(get_local $$cmp26$i)
(i32.const 0)
(get_local $$sub30$i)
@@ -20059,7 +20059,7 @@
)
)
(set_local $$rst$1$i
- (if i32
+ (if (result i32)
(get_local $$or$cond1$i)
(get_local $$rst$0$i)
(get_local $$54)
@@ -20429,14 +20429,14 @@
)
)
(set_local $$sub101$rsize$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp102$i)
(get_local $$sub101$i)
(get_local $$rsize$49$i)
)
)
(set_local $$t$4$v$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp102$i)
(get_local $$t$48$i)
(get_local $$v$410$i)
@@ -21728,7 +21728,7 @@
)
)
(set_local $$cond383$i
- (if i32
+ (if (result i32)
(get_local $$cmp374$i)
(i32.const 0)
(get_local $$sub381$i)
@@ -23402,7 +23402,7 @@
)
)
(set_local $$cond$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$13$i)
(i32.const 0)
(get_local $$and3$i$i)
@@ -23654,7 +23654,7 @@
)
)
(set_local $$cond$i$25$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$23$i)
(i32.const 0)
(get_local $$and3$i$24$i)
@@ -23920,7 +23920,7 @@
)
)
(set_local $$cond$i$36$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$34$i)
(i32.const 0)
(get_local $$and3$i$35$i)
@@ -23966,7 +23966,7 @@
)
)
(set_local $$cond15$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp7$i$i)
(i32.const 0)
(get_local $$and13$i$i)
@@ -25490,7 +25490,7 @@
)
)
(set_local $$cond315$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp306$i$i)
(i32.const 0)
(get_local $$sub313$i$i)
@@ -25890,7 +25890,7 @@
)
)
(set_local $$cond$i$16$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$15$i)
(i32.const 0)
(get_local $$and6$i$i)
@@ -25915,7 +25915,7 @@
)
)
(set_local $$cond13$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp9$i$i)
(get_local $$119)
(get_local $$add$ptr7$i$i)
@@ -25973,7 +25973,7 @@
)
)
(set_local $$cond$i$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$2$i$i)
(i32.const 0)
(get_local $$and3$i$i$i)
@@ -26655,7 +26655,7 @@
)
)
(set_local $$cond115$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp106$i$i)
(i32.const 0)
(get_local $$sub113$i$i)
@@ -30012,7 +30012,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp584)
(i32.const 0)
(get_local $$sub589)
@@ -30378,7 +30378,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $h)
@@ -30413,7 +30413,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $h)
@@ -30913,7 +30913,7 @@
)
)
(set_global $tempRet0
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $high)
(i32.const 0)
@@ -30989,7 +30989,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.add
@@ -31057,7 +31057,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31072,7 +31072,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31083,7 +31083,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31102,7 +31102,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31117,7 +31117,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31128,7 +31128,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31241,7 +31241,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31256,7 +31256,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31267,7 +31267,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31286,7 +31286,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31301,7 +31301,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31312,7 +31312,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31392,7 +31392,7 @@
(get_local $__stackBase__)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $$10$1)
@@ -31433,7 +31433,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.or
@@ -31510,7 +31510,7 @@
(get_local $__stackBase__)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.load
diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise
index 09672b584..ed7ba8aa4 100644
--- a/test/emcc_hello_world.fromasm.imprecise
+++ b/test/emcc_hello_world.fromasm.imprecise
@@ -196,12 +196,12 @@
(i32.store
(get_local $1)
(tee_local $2
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(f64.const 0)
)
- (block i32
+ (block (result i32)
(set_local $0
(call $_frexp
(f64.mul
@@ -349,7 +349,7 @@
(get_local $0)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 16)
)
@@ -529,7 +529,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -539,7 +539,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -592,10 +592,10 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(get_local $2)
(get_local $1)
- (block i32
+ (block (result i32)
(call $___unlockfile
(get_local $0)
)
@@ -606,7 +606,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 12)
)
@@ -629,7 +629,7 @@
)
(loop $while-in
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -909,7 +909,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(tee_local $5
@@ -918,7 +918,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(tee_local $7
@@ -953,12 +953,12 @@
(get_local $5)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $4)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(i32.add
@@ -976,7 +976,7 @@
)
(get_local $3)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $5)
)
@@ -1156,7 +1156,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $_printf_core
(i32.const 0)
@@ -1168,9 +1168,9 @@
(i32.const 0)
)
(i32.const -1)
- (block i32
+ (block (result i32)
(set_local $14
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $0)
@@ -1442,15 +1442,15 @@
)
)
(set_local $2
- (block $label$break$L10 i32
- (if i32
+ (block $label$break$L10 (result i32)
+ (if (result i32)
(i32.gt_s
(i32.load8_s offset=75
(get_local $2)
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(set_local $3
(get_local $1)
)
@@ -1577,7 +1577,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $1
(i32.load
@@ -1586,7 +1586,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -1596,7 +1596,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -1632,10 +1632,10 @@
)
)
(func $_wcrtomb (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(get_local $0)
- (block i32
+ (block (result i32)
(if
(i32.lt_u
(get_local $1)
@@ -1735,7 +1735,7 @@
)
)
)
- (if i32
+ (if (result i32)
(i32.lt_u
(i32.add
(get_local $1)
@@ -1743,7 +1743,7 @@
)
(i32.const 1048576)
)
- (block i32
+ (block (result i32)
(i32.store8
(get_local $0)
(i32.or
@@ -1792,7 +1792,7 @@
)
(i32.const 4)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.const 84)
@@ -1806,7 +1806,7 @@
)
)
(func $_wctomb (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $0)
(call $_wcrtomb
(get_local $0)
@@ -2057,12 +2057,12 @@
)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -2083,7 +2083,7 @@
(local $5 i32)
(local $6 i32)
(tee_local $0
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(block $__rjti$0
(br_if $__rjti$0
(i32.le_u
@@ -2414,7 +2414,7 @@
(i32.const -1)
)
(set_local $16
- (if i32
+ (if (result i32)
(i32.gt_s
(get_local $10)
(i32.sub
@@ -2422,7 +2422,7 @@
(get_local $16)
)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.const 75)
@@ -2562,7 +2562,7 @@
)
)
(set_local $8
- (if i32
+ (if (result i32)
(i32.lt_u
(tee_local $8
(i32.add
@@ -2581,7 +2581,7 @@
)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(set_local $6
(i32.load8_s
(tee_local $10
@@ -2616,7 +2616,7 @@
(get_local $11)
)
)
- (block i32
+ (block (result i32)
(set_local $6
(get_local $11)
)
@@ -2740,7 +2740,7 @@
)
(block
(set_local $10
- (block $__rjto$0 i32
+ (block $__rjto$0 (result i32)
(if
(i32.eqz
(i32.or
@@ -2867,12 +2867,12 @@
)
)
(set_local $1
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $14)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $11
(i32.or
(get_local $1)
@@ -2887,7 +2887,7 @@
)
(get_local $8)
)
- (block i32
+ (block (result i32)
(set_local $11
(get_local $1)
)
@@ -2994,14 +2994,14 @@
)
(block $label$break$L46
(set_local $6
- (if i32
+ (if (result i32)
(i32.eq
(i32.load8_s
(get_local $10)
)
(i32.const 46)
)
- (block i32
+ (block (result i32)
(if
(i32.ne
(tee_local $8
@@ -3159,9 +3159,9 @@
(br $label$break$L1)
)
)
- (if i32
+ (if (result i32)
(get_local $29)
- (block i32
+ (block (result i32)
(set_local $8
(i32.load
(tee_local $10
@@ -3189,7 +3189,7 @@
)
(get_local $8)
)
- (block i32
+ (block (result i32)
(set_local $10
(get_local $6)
)
@@ -3406,7 +3406,7 @@
)
)
(set_local $5
- (block $__rjto$8 i32
+ (block $__rjto$8 (result i32)
(block $__rjti$8
(block $__rjti$7
(block $__rjti$6
@@ -3966,14 +3966,14 @@
(get_local $15)
)
(set_local $31
- (if i32
+ (if (result i32)
(i32.lt_s
(i32.load offset=4
(get_global $tempDoublePtr)
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(set_local $27
(i32.const 1)
)
@@ -3984,18 +3984,18 @@
)
(i32.const 4108)
)
- (if i32
+ (if (result i32)
(i32.and
(get_local $11)
(i32.const 2048)
)
- (block i32
+ (block (result i32)
(set_local $27
(i32.const 1)
)
(i32.const 4111)
)
- (block i32
+ (block (result i32)
(set_local $27
(tee_local $5
(i32.and
@@ -4018,8 +4018,8 @@
(get_local $15)
)
(set_local $7
- (block $do-once49 i32
- (if i32
+ (block $do-once49 (result i32)
+ (if (result i32)
(i32.or
(i32.lt_u
(tee_local $5
@@ -4040,7 +4040,7 @@
(i32.const 0)
)
)
- (block i32
+ (block (result i32)
(if
(tee_local $5
(f64.ne
@@ -4093,7 +4093,7 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(i32.or
(i32.gt_u
(get_local $6)
@@ -4109,7 +4109,7 @@
)
)
(get_local $24)
- (block f64
+ (block (result f64)
(set_local $15
(f64.const 8)
)
@@ -4284,8 +4284,8 @@
)
)
(set_local $5
- (block $do-once57 i32
- (if i32
+ (block $do-once57 (result i32)
+ (if (result i32)
(i32.eq
(i32.sub
(tee_local $7
@@ -4298,7 +4298,7 @@
)
(i32.const 1)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once57
(get_local $7)
@@ -4484,9 +4484,9 @@
)
)
(set_local $15
- (if f64
+ (if (result f64)
(get_local $5)
- (block f64
+ (block (result f64)
(i32.store
(get_local $21)
(tee_local $5
@@ -4503,7 +4503,7 @@
(f64.const 268435456)
)
)
- (block f64
+ (block (result f64)
(set_local $5
(i32.load
(get_local $21)
@@ -5000,7 +5000,7 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.lt_s
(tee_local $6
(i32.add
@@ -5051,7 +5051,7 @@
(i32.const -9)
)
)
- (block i32
+ (block (result i32)
(if
(i32.lt_s
(tee_local $6
@@ -5142,7 +5142,7 @@
)
(block
(set_local $15
- (if f64
+ (if (result f64)
(i32.lt_u
(get_local $13)
(tee_local $50
@@ -5347,7 +5347,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $12
(get_local $5)
)
@@ -5420,12 +5420,12 @@
(i32.const 1)
)
(tee_local $5
- (block $do-once91 i32
- (if i32
+ (block $do-once91 (result i32)
+ (if (result i32)
(get_local $38)
- (block i32
+ (block (result i32)
(set_local $7
- (if i32
+ (if (result i32)
(i32.and
(i32.gt_s
(tee_local $5
@@ -5444,7 +5444,7 @@
(i32.const -5)
)
)
- (block i32
+ (block (result i32)
(set_local $17
(i32.sub
(i32.add
@@ -5459,7 +5459,7 @@
(i32.const -1)
)
)
- (block i32
+ (block (result i32)
(set_local $17
(i32.add
(get_local $5)
@@ -5573,7 +5573,7 @@
(i32.const -9)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(i32.or
(get_local $7)
@@ -5581,7 +5581,7 @@
)
(i32.const 102)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.const 0)
)
@@ -5608,7 +5608,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.const 0)
)
@@ -5640,7 +5640,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $20
(i32.and
(get_local $11)
@@ -5667,7 +5667,7 @@
)
)
(tee_local $7
- (if i32
+ (if (result i32)
(tee_local $17
(i32.eq
(i32.or
@@ -5677,7 +5677,7 @@
(i32.const 102)
)
)
- (block i32
+ (block (result i32)
(set_local $18
(i32.const 0)
)
@@ -5690,7 +5690,7 @@
)
)
)
- (block i32
+ (block (result i32)
(if
(i32.lt_s
(i32.sub
@@ -6298,7 +6298,7 @@
)
)
)
- (block i32
+ (block (result i32)
(call $_pad
(get_local $0)
(i32.const 32)
@@ -6837,7 +6837,7 @@
)
)
)
- (if i32
+ (if (result i32)
(i32.or
(get_local $6)
(tee_local $12
@@ -6859,7 +6859,7 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $5)
)
@@ -6889,7 +6889,7 @@
)
(get_local $22)
)
- (block i32
+ (block (result i32)
(set_local $7
(get_local $22)
)
@@ -9083,14 +9083,14 @@
)
(block
(set_local $14
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -10082,14 +10082,14 @@
(i32.add
(i32.shl
(tee_local $7
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
@@ -10843,7 +10843,7 @@
)
(block
(set_local $3
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.add
@@ -11484,7 +11484,7 @@
(tee_local $0
(i32.add
(tee_local $0
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(tee_local $0
@@ -11496,7 +11496,7 @@
)
(i32.const 1)
)
- (block i32
+ (block (result i32)
(set_local $11
(i32.and
(get_local $0)
@@ -12114,15 +12114,15 @@
(i32.add
(i32.shl
(tee_local $2
- (block $do-once65 i32
- (if i32
+ (block $do-once65 (result i32)
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $7)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once65
(i32.const 31)
@@ -12799,14 +12799,14 @@
(i32.add
(i32.shl
(tee_local $4
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $5)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $5)
(i32.const 16777215)
@@ -14751,14 +14751,14 @@
(i32.add
(i32.shl
(tee_local $5
- (if i32
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $3)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $3)
(i32.const 16777215)
diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts
index d33f824e2..da6f2fdc5 100644
--- a/test/emcc_hello_world.fromasm.imprecise.no-opts
+++ b/test/emcc_hello_world.fromasm.imprecise.no-opts
@@ -2574,7 +2574,7 @@
)
)
(set_local $$$call21
- (if i32
+ (if (result i32)
(get_local $$tobool26)
(i32.const -1)
(get_local $$call21)
@@ -2639,7 +2639,7 @@
)
)
(set_local $$ret$1$
- (if i32
+ (if (result i32)
(get_local $$tobool37)
(get_local $$ret$1)
(i32.const -1)
@@ -4325,7 +4325,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$tobool36)
(get_local $$s$2)
(i32.const 0)
@@ -6261,21 +6261,21 @@
)
)
(set_local $$add$ptr43$arrayidx31
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(get_local $$add$ptr43)
(get_local $$arrayidx31)
)
)
(set_local $$$l10n$0
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(i32.const 1)
(get_local $$l10n$0)
)
)
(set_local $$isdigittmp$
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(get_local $$isdigittmp)
(i32.const -1)
@@ -7779,7 +7779,7 @@
)
)
(set_local $$t$0
- (if i32
+ (if (result i32)
(get_local $$or$cond192)
(get_local $$and214)
(get_local $$conv207)
@@ -7804,7 +7804,7 @@
)
)
(set_local $$fl$1$and219
- (if i32
+ (if (result i32)
(get_local $$tobool217)
(get_local $$fl$1)
(get_local $$and219)
@@ -8147,7 +8147,7 @@
)
)
(set_local $$cond245
- (if i32
+ (if (result i32)
(get_local $$cmp240)
(get_local $$p$0)
(i32.const 8)
@@ -8391,7 +8391,7 @@
)
)
(set_local $$add269$p$0
- (if i32
+ (if (result i32)
(get_local $$cmp270)
(get_local $$add269)
(get_local $$p$0)
@@ -8537,7 +8537,7 @@
)
)
(set_local $$$
- (if i32
+ (if (result i32)
(get_local $$tobool295)
(i32.const 4091)
(i32.const 4093)
@@ -8717,7 +8717,7 @@
)
)
(set_local $$cond354
- (if i32
+ (if (result i32)
(get_local $$tobool349)
(get_local $$169)
(i32.const 4101)
@@ -8909,7 +8909,7 @@
)
)
(set_local $$$$i
- (if i32
+ (if (result i32)
(get_local $$tobool13$i)
(i32.const 4109)
(i32.const 4114)
@@ -9068,7 +9068,7 @@
)
)
(set_local $$prefix$0$add$ptr65$i
- (if i32
+ (if (result i32)
(get_local $$tobool63$i)
(get_local $$prefix$0$i)
(get_local $$add$ptr65$i)
@@ -9244,7 +9244,7 @@
)
)
(set_local $$cond100$i
- (if i32
+ (if (result i32)
(get_local $$cmp94$i)
(get_local $$sub97$i)
(get_local $$198)
@@ -9585,7 +9585,7 @@
)
)
(set_local $$l$0$i
- (if i32
+ (if (result i32)
(get_local $$or$cond384)
(get_local $$add154$i)
(get_local $$add163$i)
@@ -9752,7 +9752,7 @@
)
)
(set_local $$w$add165$i
- (if i32
+ (if (result i32)
(get_local $$cmp188$i)
(get_local $$w$1)
(get_local $$add165$i)
@@ -9771,7 +9771,7 @@
)
)
(set_local $$$p$i
- (if i32
+ (if (result i32)
(get_local $$cmp196$i)
(i32.const 6)
(get_local $$p$0)
@@ -9829,7 +9829,7 @@
)
)
(set_local $$arraydecay208$add$ptr213$i
- (if i32
+ (if (result i32)
(get_local $$cmp205$i)
(get_local $$big$i)
(get_local $$add$ptr213$i)
@@ -9936,7 +9936,7 @@
)
)
(set_local $$cond233$i
- (if i32
+ (if (result i32)
(get_local $$cmp228$i)
(i32.const 29)
(get_local $$211)
@@ -10261,7 +10261,7 @@
)
)
(set_local $$cond271$i
- (if i32
+ (if (result i32)
(get_local $$cmp265$i)
(i32.const 9)
(get_local $$sub264$i)
@@ -10386,7 +10386,7 @@
)
)
(set_local $$incdec$ptr292$a$3$i
- (if i32
+ (if (result i32)
(get_local $$tobool290$i)
(get_local $$incdec$ptr292$i)
(get_local $$a$3539$i)
@@ -10446,7 +10446,7 @@
)
)
(set_local $$incdec$ptr292$a$3$571$i
- (if i32
+ (if (result i32)
(get_local $$tobool290$569$i)
(get_local $$incdec$ptr292$570$i)
(get_local $$a$3539$i)
@@ -10462,7 +10462,7 @@
)
)
(set_local $$cond304$i
- (if i32
+ (if (result i32)
(get_local $$cmp299$i)
(get_local $$arraydecay208$add$ptr213$i)
(get_local $$incdec$ptr292$a$3573$i)
@@ -10502,7 +10502,7 @@
)
)
(set_local $$add$ptr311$z$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp308$i)
(get_local $$add$ptr311$i)
(get_local $$z$4$i)
@@ -10677,7 +10677,7 @@
)
)
(set_local $$mul335$i
- (if i32
+ (if (result i32)
(get_local $$cmp333$i)
(get_local $$e$1$i)
(i32.const 0)
@@ -10944,7 +10944,7 @@
)
)
(set_local $$$396$i
- (if f64
+ (if (result f64)
(get_local $$tobool380$i)
(f64.const 9007199254740992)
(f64.const 9007199254740994)
@@ -10984,7 +10984,7 @@
)
)
(set_local $$$404$i
- (if f64
+ (if (result f64)
(get_local $$or$cond397$i)
(f64.const 1)
(f64.const 1.5)
@@ -11337,7 +11337,7 @@
)
)
(set_local $$add$ptr442$z$3$i
- (if i32
+ (if (result i32)
(get_local $$cmp443$i)
(get_local $$add$ptr442$i)
(get_local $$z$3$lcssa$i)
@@ -11721,7 +11721,7 @@
)
)
(set_local $$$sub514$i
- (if i32
+ (if (result i32)
(get_local $$cmp515$i)
(i32.const 0)
(get_local $$sub514$i)
@@ -11734,7 +11734,7 @@
)
)
(set_local $$p$addr$2$$sub514398$i
- (if i32
+ (if (result i32)
(get_local $$cmp528$i)
(get_local $$p$addr$2$i)
(get_local $$$sub514$i)
@@ -11771,7 +11771,7 @@
)
)
(set_local $$$sub562$i
- (if i32
+ (if (result i32)
(get_local $$cmp563$i)
(i32.const 0)
(get_local $$sub562$i)
@@ -11784,7 +11784,7 @@
)
)
(set_local $$p$addr$2$$sub562399$i
- (if i32
+ (if (result i32)
(get_local $$cmp577$i)
(get_local $$p$addr$2$i)
(get_local $$$sub562$i)
@@ -11862,7 +11862,7 @@
)
)
(set_local $$add620$i
- (if i32
+ (if (result i32)
(get_local $$cmp617$i)
(get_local $$e$5$ph$i)
(i32.const 0)
@@ -11883,7 +11883,7 @@
)
)
(set_local $$cond629$i
- (if i32
+ (if (result i32)
(get_local $$cmp623$i)
(get_local $$sub626$le$i)
(get_local $$e$5$ph$i)
@@ -12128,7 +12128,7 @@
)
)
(set_local $$r$0$a$9$i
- (if i32
+ (if (result i32)
(get_local $$cmp660$i)
(get_local $$arraydecay208$add$ptr213$i)
(get_local $$a$9$ph$i)
@@ -12469,7 +12469,7 @@
)
)
(set_local $$cond732$i
- (if i32
+ (if (result i32)
(get_local $$cmp727$i)
(i32.const 9)
(get_local $$p$addr$4489$i)
@@ -12561,7 +12561,7 @@
)
)
(set_local $$z$7$add$ptr742$i
- (if i32
+ (if (result i32)
(get_local $$cmp450$lcssa$i)
(get_local $$z$7$i$lcssa)
(get_local $$add$ptr742$i)
@@ -12817,7 +12817,7 @@
)
)
(set_local $$cond800$i
- (if i32
+ (if (result i32)
(get_local $$cmp790$i)
(get_local $$sub$ptr$sub789$i)
(get_local $$p$addr$5501$i)
@@ -12962,7 +12962,7 @@
)
)
(set_local $$w$add653$i
- (if i32
+ (if (result i32)
(get_local $$cmp818$i)
(get_local $$w$1)
(get_local $$add653$i)
@@ -12986,7 +12986,7 @@
)
)
(set_local $$cond$i
- (if i32
+ (if (result i32)
(get_local $$tobool37$i)
(i32.const 4127)
(i32.const 4131)
@@ -13005,21 +13005,21 @@
)
)
(set_local $$cond43$i
- (if i32
+ (if (result i32)
(get_local $$tobool37$i)
(i32.const 4135)
(i32.const 4139)
)
)
(set_local $$pl$1$i
- (if i32
+ (if (result i32)
(get_local $$cmp38$i)
(i32.const 0)
(get_local $$pl$0$i)
)
)
(set_local $$s35$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp38$i)
(get_local $$cond43$i)
(get_local $$cond$i)
@@ -13120,7 +13120,7 @@
)
)
(set_local $$cond53$i
- (if i32
+ (if (result i32)
(get_local $$cmp48$i)
(get_local $$w$1)
(get_local $$add$i$239)
@@ -13554,14 +13554,14 @@
)
)
(set_local $$z$1
- (if i32
+ (if (result i32)
(get_local $$tobool357)
(get_local $$add$ptr359)
(get_local $$call356)
)
)
(set_local $$p$3
- (if i32
+ (if (result i32)
(get_local $$tobool357)
(get_local $$p$0)
(get_local $$sub$ptr$sub363)
@@ -13924,7 +13924,7 @@
)
)
(set_local $$cond426
- (if i32
+ (if (result i32)
(get_local $$cmp421)
(get_local $$w$1)
(get_local $$i$0$lcssa368)
@@ -13967,7 +13967,7 @@
)
)
(set_local $$and309$fl$4
- (if i32
+ (if (result i32)
(get_local $$cmp306)
(get_local $$and309)
(get_local $$fl$4)
@@ -14065,7 +14065,7 @@
)
)
(set_local $$p$2$add322
- (if i32
+ (if (result i32)
(get_local $$cmp323)
(get_local $$p$2)
(get_local $$add322)
@@ -14132,7 +14132,7 @@
)
)
(set_local $$sub$ptr$sub433$p$5
- (if i32
+ (if (result i32)
(get_local $$cmp434)
(get_local $$sub$ptr$sub433)
(get_local $$p$5)
@@ -14151,7 +14151,7 @@
)
)
(set_local $$w$2
- (if i32
+ (if (result i32)
(get_local $$cmp442)
(get_local $$add441)
(get_local $$w$1)
@@ -16146,7 +16146,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp1)
(i32.const 256)
(get_local $$sub)
@@ -17526,7 +17526,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp1)
(i32.const 16)
(get_local $$and)
@@ -18612,14 +18612,14 @@
)
)
(set_local $$sub31$rsize$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp32$i)
(get_local $$sub31$i)
(get_local $$rsize$0$i)
)
)
(set_local $$cond$v$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp32$i)
(get_local $$cond4$i)
(get_local $$v$0$i)
@@ -19816,7 +19816,7 @@
)
)
(set_local $$cond$i
- (if i32
+ (if (result i32)
(get_local $$cmp26$i)
(i32.const 0)
(get_local $$sub30$i)
@@ -19972,7 +19972,7 @@
)
)
(set_local $$rst$1$i
- (if i32
+ (if (result i32)
(get_local $$or$cond1$i)
(get_local $$rst$0$i)
(get_local $$54)
@@ -20342,14 +20342,14 @@
)
)
(set_local $$sub101$rsize$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp102$i)
(get_local $$sub101$i)
(get_local $$rsize$49$i)
)
)
(set_local $$t$4$v$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp102$i)
(get_local $$t$48$i)
(get_local $$v$410$i)
@@ -21641,7 +21641,7 @@
)
)
(set_local $$cond383$i
- (if i32
+ (if (result i32)
(get_local $$cmp374$i)
(i32.const 0)
(get_local $$sub381$i)
@@ -23315,7 +23315,7 @@
)
)
(set_local $$cond$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$13$i)
(i32.const 0)
(get_local $$and3$i$i)
@@ -23567,7 +23567,7 @@
)
)
(set_local $$cond$i$25$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$23$i)
(i32.const 0)
(get_local $$and3$i$24$i)
@@ -23833,7 +23833,7 @@
)
)
(set_local $$cond$i$36$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$34$i)
(i32.const 0)
(get_local $$and3$i$35$i)
@@ -23879,7 +23879,7 @@
)
)
(set_local $$cond15$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp7$i$i)
(i32.const 0)
(get_local $$and13$i$i)
@@ -25403,7 +25403,7 @@
)
)
(set_local $$cond315$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp306$i$i)
(i32.const 0)
(get_local $$sub313$i$i)
@@ -25803,7 +25803,7 @@
)
)
(set_local $$cond$i$16$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$15$i)
(i32.const 0)
(get_local $$and6$i$i)
@@ -25828,7 +25828,7 @@
)
)
(set_local $$cond13$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp9$i$i)
(get_local $$119)
(get_local $$add$ptr7$i$i)
@@ -25886,7 +25886,7 @@
)
)
(set_local $$cond$i$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$2$i$i)
(i32.const 0)
(get_local $$and3$i$i$i)
@@ -26568,7 +26568,7 @@
)
)
(set_local $$cond115$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp106$i$i)
(i32.const 0)
(get_local $$sub113$i$i)
@@ -29925,7 +29925,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp584)
(i32.const 0)
(get_local $$sub589)
@@ -30291,7 +30291,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $h)
@@ -30326,7 +30326,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $h)
@@ -30826,7 +30826,7 @@
)
)
(set_global $tempRet0
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $high)
(i32.const 0)
@@ -30902,7 +30902,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.add
@@ -30970,7 +30970,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -30985,7 +30985,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -30996,7 +30996,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31015,7 +31015,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31030,7 +31030,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31041,7 +31041,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31154,7 +31154,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31169,7 +31169,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31180,7 +31180,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31199,7 +31199,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31214,7 +31214,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31225,7 +31225,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31305,7 +31305,7 @@
(get_local $__stackBase__)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $$10$1)
@@ -31346,7 +31346,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.or
@@ -31423,7 +31423,7 @@
(get_local $__stackBase__)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.load
diff --git a/test/emcc_hello_world.fromasm.no-opts b/test/emcc_hello_world.fromasm.no-opts
index 88470aa79..5f9e12f83 100644
--- a/test/emcc_hello_world.fromasm.no-opts
+++ b/test/emcc_hello_world.fromasm.no-opts
@@ -2576,7 +2576,7 @@
)
)
(set_local $$$call21
- (if i32
+ (if (result i32)
(get_local $$tobool26)
(i32.const -1)
(get_local $$call21)
@@ -2641,7 +2641,7 @@
)
)
(set_local $$ret$1$
- (if i32
+ (if (result i32)
(get_local $$tobool37)
(get_local $$ret$1)
(i32.const -1)
@@ -4327,7 +4327,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$tobool36)
(get_local $$s$2)
(i32.const 0)
@@ -4635,12 +4635,12 @@
(return)
)
(func $i32s-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
(i32.const 0)
- (if i32
+ (if (result i32)
(i32.and
(i32.eq
(get_local $0)
@@ -4660,7 +4660,7 @@
)
)
(func $i32s-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -4672,7 +4672,7 @@
)
)
(func $i32u-rem (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -4684,7 +4684,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -6324,21 +6324,21 @@
)
)
(set_local $$add$ptr43$arrayidx31
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(get_local $$add$ptr43)
(get_local $$arrayidx31)
)
)
(set_local $$$l10n$0
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(i32.const 1)
(get_local $$l10n$0)
)
)
(set_local $$isdigittmp$
- (if i32
+ (if (result i32)
(get_local $$cmp37)
(get_local $$isdigittmp)
(i32.const -1)
@@ -7842,7 +7842,7 @@
)
)
(set_local $$t$0
- (if i32
+ (if (result i32)
(get_local $$or$cond192)
(get_local $$and214)
(get_local $$conv207)
@@ -7867,7 +7867,7 @@
)
)
(set_local $$fl$1$and219
- (if i32
+ (if (result i32)
(get_local $$tobool217)
(get_local $$fl$1)
(get_local $$and219)
@@ -8210,7 +8210,7 @@
)
)
(set_local $$cond245
- (if i32
+ (if (result i32)
(get_local $$cmp240)
(get_local $$p$0)
(i32.const 8)
@@ -8454,7 +8454,7 @@
)
)
(set_local $$add269$p$0
- (if i32
+ (if (result i32)
(get_local $$cmp270)
(get_local $$add269)
(get_local $$p$0)
@@ -8600,7 +8600,7 @@
)
)
(set_local $$$
- (if i32
+ (if (result i32)
(get_local $$tobool295)
(i32.const 4091)
(i32.const 4093)
@@ -8780,7 +8780,7 @@
)
)
(set_local $$cond354
- (if i32
+ (if (result i32)
(get_local $$tobool349)
(get_local $$169)
(i32.const 4101)
@@ -8972,7 +8972,7 @@
)
)
(set_local $$$$i
- (if i32
+ (if (result i32)
(get_local $$tobool13$i)
(i32.const 4109)
(i32.const 4114)
@@ -9131,7 +9131,7 @@
)
)
(set_local $$prefix$0$add$ptr65$i
- (if i32
+ (if (result i32)
(get_local $$tobool63$i)
(get_local $$prefix$0$i)
(get_local $$add$ptr65$i)
@@ -9307,7 +9307,7 @@
)
)
(set_local $$cond100$i
- (if i32
+ (if (result i32)
(get_local $$cmp94$i)
(get_local $$sub97$i)
(get_local $$198)
@@ -9648,7 +9648,7 @@
)
)
(set_local $$l$0$i
- (if i32
+ (if (result i32)
(get_local $$or$cond384)
(get_local $$add154$i)
(get_local $$add163$i)
@@ -9815,7 +9815,7 @@
)
)
(set_local $$w$add165$i
- (if i32
+ (if (result i32)
(get_local $$cmp188$i)
(get_local $$w$1)
(get_local $$add165$i)
@@ -9834,7 +9834,7 @@
)
)
(set_local $$$p$i
- (if i32
+ (if (result i32)
(get_local $$cmp196$i)
(i32.const 6)
(get_local $$p$0)
@@ -9892,7 +9892,7 @@
)
)
(set_local $$arraydecay208$add$ptr213$i
- (if i32
+ (if (result i32)
(get_local $$cmp205$i)
(get_local $$big$i)
(get_local $$add$ptr213$i)
@@ -9999,7 +9999,7 @@
)
)
(set_local $$cond233$i
- (if i32
+ (if (result i32)
(get_local $$cmp228$i)
(i32.const 29)
(get_local $$211)
@@ -10324,7 +10324,7 @@
)
)
(set_local $$cond271$i
- (if i32
+ (if (result i32)
(get_local $$cmp265$i)
(i32.const 9)
(get_local $$sub264$i)
@@ -10449,7 +10449,7 @@
)
)
(set_local $$incdec$ptr292$a$3$i
- (if i32
+ (if (result i32)
(get_local $$tobool290$i)
(get_local $$incdec$ptr292$i)
(get_local $$a$3539$i)
@@ -10509,7 +10509,7 @@
)
)
(set_local $$incdec$ptr292$a$3$571$i
- (if i32
+ (if (result i32)
(get_local $$tobool290$569$i)
(get_local $$incdec$ptr292$570$i)
(get_local $$a$3539$i)
@@ -10525,7 +10525,7 @@
)
)
(set_local $$cond304$i
- (if i32
+ (if (result i32)
(get_local $$cmp299$i)
(get_local $$arraydecay208$add$ptr213$i)
(get_local $$incdec$ptr292$a$3573$i)
@@ -10565,7 +10565,7 @@
)
)
(set_local $$add$ptr311$z$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp308$i)
(get_local $$add$ptr311$i)
(get_local $$z$4$i)
@@ -10740,7 +10740,7 @@
)
)
(set_local $$mul335$i
- (if i32
+ (if (result i32)
(get_local $$cmp333$i)
(get_local $$e$1$i)
(i32.const 0)
@@ -11007,7 +11007,7 @@
)
)
(set_local $$$396$i
- (if f64
+ (if (result f64)
(get_local $$tobool380$i)
(f64.const 9007199254740992)
(f64.const 9007199254740994)
@@ -11047,7 +11047,7 @@
)
)
(set_local $$$404$i
- (if f64
+ (if (result f64)
(get_local $$or$cond397$i)
(f64.const 1)
(f64.const 1.5)
@@ -11400,7 +11400,7 @@
)
)
(set_local $$add$ptr442$z$3$i
- (if i32
+ (if (result i32)
(get_local $$cmp443$i)
(get_local $$add$ptr442$i)
(get_local $$z$3$lcssa$i)
@@ -11784,7 +11784,7 @@
)
)
(set_local $$$sub514$i
- (if i32
+ (if (result i32)
(get_local $$cmp515$i)
(i32.const 0)
(get_local $$sub514$i)
@@ -11797,7 +11797,7 @@
)
)
(set_local $$p$addr$2$$sub514398$i
- (if i32
+ (if (result i32)
(get_local $$cmp528$i)
(get_local $$p$addr$2$i)
(get_local $$$sub514$i)
@@ -11834,7 +11834,7 @@
)
)
(set_local $$$sub562$i
- (if i32
+ (if (result i32)
(get_local $$cmp563$i)
(i32.const 0)
(get_local $$sub562$i)
@@ -11847,7 +11847,7 @@
)
)
(set_local $$p$addr$2$$sub562399$i
- (if i32
+ (if (result i32)
(get_local $$cmp577$i)
(get_local $$p$addr$2$i)
(get_local $$$sub562$i)
@@ -11925,7 +11925,7 @@
)
)
(set_local $$add620$i
- (if i32
+ (if (result i32)
(get_local $$cmp617$i)
(get_local $$e$5$ph$i)
(i32.const 0)
@@ -11946,7 +11946,7 @@
)
)
(set_local $$cond629$i
- (if i32
+ (if (result i32)
(get_local $$cmp623$i)
(get_local $$sub626$le$i)
(get_local $$e$5$ph$i)
@@ -12191,7 +12191,7 @@
)
)
(set_local $$r$0$a$9$i
- (if i32
+ (if (result i32)
(get_local $$cmp660$i)
(get_local $$arraydecay208$add$ptr213$i)
(get_local $$a$9$ph$i)
@@ -12532,7 +12532,7 @@
)
)
(set_local $$cond732$i
- (if i32
+ (if (result i32)
(get_local $$cmp727$i)
(i32.const 9)
(get_local $$p$addr$4489$i)
@@ -12624,7 +12624,7 @@
)
)
(set_local $$z$7$add$ptr742$i
- (if i32
+ (if (result i32)
(get_local $$cmp450$lcssa$i)
(get_local $$z$7$i$lcssa)
(get_local $$add$ptr742$i)
@@ -12880,7 +12880,7 @@
)
)
(set_local $$cond800$i
- (if i32
+ (if (result i32)
(get_local $$cmp790$i)
(get_local $$sub$ptr$sub789$i)
(get_local $$p$addr$5501$i)
@@ -13025,7 +13025,7 @@
)
)
(set_local $$w$add653$i
- (if i32
+ (if (result i32)
(get_local $$cmp818$i)
(get_local $$w$1)
(get_local $$add653$i)
@@ -13049,7 +13049,7 @@
)
)
(set_local $$cond$i
- (if i32
+ (if (result i32)
(get_local $$tobool37$i)
(i32.const 4127)
(i32.const 4131)
@@ -13068,21 +13068,21 @@
)
)
(set_local $$cond43$i
- (if i32
+ (if (result i32)
(get_local $$tobool37$i)
(i32.const 4135)
(i32.const 4139)
)
)
(set_local $$pl$1$i
- (if i32
+ (if (result i32)
(get_local $$cmp38$i)
(i32.const 0)
(get_local $$pl$0$i)
)
)
(set_local $$s35$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp38$i)
(get_local $$cond43$i)
(get_local $$cond$i)
@@ -13183,7 +13183,7 @@
)
)
(set_local $$cond53$i
- (if i32
+ (if (result i32)
(get_local $$cmp48$i)
(get_local $$w$1)
(get_local $$add$i$239)
@@ -13617,14 +13617,14 @@
)
)
(set_local $$z$1
- (if i32
+ (if (result i32)
(get_local $$tobool357)
(get_local $$add$ptr359)
(get_local $$call356)
)
)
(set_local $$p$3
- (if i32
+ (if (result i32)
(get_local $$tobool357)
(get_local $$p$0)
(get_local $$sub$ptr$sub363)
@@ -13987,7 +13987,7 @@
)
)
(set_local $$cond426
- (if i32
+ (if (result i32)
(get_local $$cmp421)
(get_local $$w$1)
(get_local $$i$0$lcssa368)
@@ -14030,7 +14030,7 @@
)
)
(set_local $$and309$fl$4
- (if i32
+ (if (result i32)
(get_local $$cmp306)
(get_local $$and309)
(get_local $$fl$4)
@@ -14128,7 +14128,7 @@
)
)
(set_local $$p$2$add322
- (if i32
+ (if (result i32)
(get_local $$cmp323)
(get_local $$p$2)
(get_local $$add322)
@@ -14195,7 +14195,7 @@
)
)
(set_local $$sub$ptr$sub433$p$5
- (if i32
+ (if (result i32)
(get_local $$cmp434)
(get_local $$sub$ptr$sub433)
(get_local $$p$5)
@@ -14214,7 +14214,7 @@
)
)
(set_local $$w$2
- (if i32
+ (if (result i32)
(get_local $$cmp442)
(get_local $$add441)
(get_local $$w$1)
@@ -16209,7 +16209,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp1)
(i32.const 256)
(get_local $$sub)
@@ -17589,7 +17589,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp1)
(i32.const 16)
(get_local $$and)
@@ -18675,14 +18675,14 @@
)
)
(set_local $$sub31$rsize$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp32$i)
(get_local $$sub31$i)
(get_local $$rsize$0$i)
)
)
(set_local $$cond$v$0$i
- (if i32
+ (if (result i32)
(get_local $$cmp32$i)
(get_local $$cond4$i)
(get_local $$v$0$i)
@@ -19879,7 +19879,7 @@
)
)
(set_local $$cond$i
- (if i32
+ (if (result i32)
(get_local $$cmp26$i)
(i32.const 0)
(get_local $$sub30$i)
@@ -20035,7 +20035,7 @@
)
)
(set_local $$rst$1$i
- (if i32
+ (if (result i32)
(get_local $$or$cond1$i)
(get_local $$rst$0$i)
(get_local $$54)
@@ -20405,14 +20405,14 @@
)
)
(set_local $$sub101$rsize$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp102$i)
(get_local $$sub101$i)
(get_local $$rsize$49$i)
)
)
(set_local $$t$4$v$4$i
- (if i32
+ (if (result i32)
(get_local $$cmp102$i)
(get_local $$t$48$i)
(get_local $$v$410$i)
@@ -21704,7 +21704,7 @@
)
)
(set_local $$cond383$i
- (if i32
+ (if (result i32)
(get_local $$cmp374$i)
(i32.const 0)
(get_local $$sub381$i)
@@ -23378,7 +23378,7 @@
)
)
(set_local $$cond$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$13$i)
(i32.const 0)
(get_local $$and3$i$i)
@@ -23630,7 +23630,7 @@
)
)
(set_local $$cond$i$25$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$23$i)
(i32.const 0)
(get_local $$and3$i$24$i)
@@ -23896,7 +23896,7 @@
)
)
(set_local $$cond$i$36$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$34$i)
(i32.const 0)
(get_local $$and3$i$35$i)
@@ -23942,7 +23942,7 @@
)
)
(set_local $$cond15$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp7$i$i)
(i32.const 0)
(get_local $$and13$i$i)
@@ -25466,7 +25466,7 @@
)
)
(set_local $$cond315$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp306$i$i)
(i32.const 0)
(get_local $$sub313$i$i)
@@ -25866,7 +25866,7 @@
)
)
(set_local $$cond$i$16$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$15$i)
(i32.const 0)
(get_local $$and6$i$i)
@@ -25891,7 +25891,7 @@
)
)
(set_local $$cond13$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp9$i$i)
(get_local $$119)
(get_local $$add$ptr7$i$i)
@@ -25949,7 +25949,7 @@
)
)
(set_local $$cond$i$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp$i$2$i$i)
(i32.const 0)
(get_local $$and3$i$i$i)
@@ -26631,7 +26631,7 @@
)
)
(set_local $$cond115$i$i
- (if i32
+ (if (result i32)
(get_local $$cmp106$i$i)
(i32.const 0)
(get_local $$sub113$i$i)
@@ -29988,7 +29988,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$cmp584)
(i32.const 0)
(get_local $$sub589)
@@ -30354,7 +30354,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $h)
@@ -30389,7 +30389,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $h)
@@ -30889,7 +30889,7 @@
)
)
(set_global $tempRet0
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $high)
(i32.const 0)
@@ -30965,7 +30965,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.add
@@ -31033,7 +31033,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31048,7 +31048,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31059,7 +31059,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31078,7 +31078,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31093,7 +31093,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31104,7 +31104,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31217,7 +31217,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31232,7 +31232,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31243,7 +31243,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -31262,7 +31262,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31277,7 +31277,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31288,7 +31288,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -31368,7 +31368,7 @@
(get_local $__stackBase__)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(get_local $$10$1)
@@ -31409,7 +31409,7 @@
)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.or
@@ -31486,7 +31486,7 @@
(get_local $__stackBase__)
)
(return
- (block i32
+ (block (result i32)
(block
(set_global $tempRet0
(i32.load
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 26e3b820f..d366a3c7f 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -21,10 +21,10 @@ BinaryenFloat64: 4
(start $starter)
(func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32)
(local $4 i32)
- (block $the-body i32
+ (block $the-body (result i32)
(block $the-nothing
(drop
- (block $the-value i32
+ (block $the-value (result i32)
(drop
(i32.clz
(i32.const -10)
@@ -415,12 +415,12 @@ BinaryenFloat64: 4
)
)
(drop
- (loop $in i32
+ (loop $in (result i32)
(i32.const 0)
)
)
(drop
- (loop i32
+ (loop (result i32)
(i32.const 0)
)
)
@@ -1411,10 +1411,10 @@ int main() {
(start $starter)
(func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32)
(local $4 i32)
- (block $the-body i32
+ (block $the-body (result i32)
(block $the-nothing
(drop
- (block $the-value i32
+ (block $the-value (result i32)
(drop
(i32.clz
(i32.const -10)
@@ -1805,12 +1805,12 @@ int main() {
)
)
(drop
- (loop $in i32
+ (loop $in (result i32)
(i32.const 0)
)
)
(drop
- (loop i32
+ (loop (result i32)
(i32.const 0)
)
)
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt
index 7f281bd67..dc35b1f04 100644
--- a/test/example/c-api-kitchen-sink.txt.txt
+++ b/test/example/c-api-kitchen-sink.txt.txt
@@ -16,10 +16,10 @@
(start $starter)
(func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32)
(local $4 i32)
- (block $the-body i32
+ (block $the-body (result i32)
(block $the-nothing
(drop
- (block $the-value i32
+ (block $the-value (result i32)
(drop
(i32.clz
(i32.const -10)
@@ -410,12 +410,12 @@
)
)
(drop
- (loop $in i32
+ (loop $in (result i32)
(i32.const 0)
)
)
(drop
- (loop i32
+ (loop (result i32)
(i32.const 0)
)
)
diff --git a/test/kitchen_sink.wast b/test/kitchen_sink.wast
index 7598ee989..dc1583811 100644
--- a/test/kitchen_sink.wast
+++ b/test/kitchen_sink.wast
@@ -3,7 +3,7 @@
(memory $0 4096 4096)
(data (i32.const 1026) "\14\00")
(func $kitchensink (type $0) (result i32)
- (block $block0 i32
+ (block $block0 (result i32)
(drop
(i32.add
(i32.const 10)
diff --git a/test/kitchen_sink.wast.from-wast b/test/kitchen_sink.wast.from-wast
index 79ee5a581..50e81f1d9 100644
--- a/test/kitchen_sink.wast.from-wast
+++ b/test/kitchen_sink.wast.from-wast
@@ -3,7 +3,7 @@
(memory $0 4096 4096)
(data (i32.const 1026) "\14\00")
(func $kitchensink (type $0) (result i32)
- (block $block0 i32
+ (block $block0 (result i32)
(drop
(i32.add
(i32.const 10)
diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary
index cc07e304c..9c6d2686a 100644
--- a/test/kitchen_sink.wast.fromBinary
+++ b/test/kitchen_sink.wast.fromBinary
@@ -3,7 +3,7 @@
(memory $0 4096 4096)
(data (i32.const 1026) "\14\00")
(func $kitchensink (type $0) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(drop
(i32.add
(i32.const 10)
diff --git a/test/kitchen_sink.wast.fromBinary.noDebugInfo b/test/kitchen_sink.wast.fromBinary.noDebugInfo
index a73bfe932..4491d8048 100644
--- a/test/kitchen_sink.wast.fromBinary.noDebugInfo
+++ b/test/kitchen_sink.wast.fromBinary.noDebugInfo
@@ -3,7 +3,7 @@
(memory $0 4096 4096)
(data (i32.const 1026) "\14\00")
(func $0 (type $0) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(drop
(i32.add
(i32.const 10)
diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast
index 32f3cdc7f..910c29f1a 100644
--- a/test/llvm_autogenerated/cfg-stackify.wast
+++ b/test/llvm_autogenerated/cfg-stackify.wast
@@ -231,7 +231,7 @@
(get_local $0)
(i32.const 0)
)
- (loop $label$0 i32
+ (loop $label$0 (result i32)
(i32.store
(get_local $0)
(i32.const 1)
@@ -335,7 +335,7 @@
)
)
(func $doublediamond_in_a_loop (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (loop $label$0 i32
+ (loop $label$0 (result i32)
(i32.store
(get_local $2)
(i32.const 0)
@@ -611,7 +611,7 @@
(unreachable)
)
(func $test8 (result i32)
- (loop $label$0 i32
+ (loop $label$0 (result i32)
(br_if $label$0
(i32.const 0)
)
diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm
index 70606033e..a6d77f5cf 100644
--- a/test/memorygrowth.fromasm
+++ b/test/memorygrowth.fromasm
@@ -1428,14 +1428,14 @@
(i32.add
(i32.shl
(tee_local $27
- (if i32
+ (if (result i32)
(tee_local $7
(i32.shr_u
(get_local $1)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -1709,7 +1709,7 @@
)
(if
(tee_local $3
- (if i32
+ (if (result i32)
(i32.and
(i32.eqz
(get_local $5)
@@ -1718,7 +1718,7 @@
(get_local $33)
)
)
- (block i32
+ (block (result i32)
(if
(i32.eqz
(tee_local $4
@@ -2487,14 +2487,14 @@
(i32.add
(i32.shl
(tee_local $16
- (if i32
+ (if (result i32)
(tee_local $5
(i32.shr_u
(get_local $18)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $18)
(i32.const 16777215)
@@ -3153,8 +3153,8 @@
(if
(i32.eq
(tee_local $7
- (block $label$break$b i32
- (if i32
+ (block $label$break$b (result i32)
+ (if (result i32)
(i32.and
(i32.load
(i32.const 1652)
@@ -3162,7 +3162,7 @@
(i32.const 4)
)
(i32.const 188)
- (block i32
+ (block (result i32)
(block $label$break$c
(if
(tee_local $18
@@ -3308,7 +3308,7 @@
)
(block
(set_local $3
- (if i32
+ (if (result i32)
(i32.and
(tee_local $19
(i32.add
@@ -3794,7 +3794,7 @@
)
)
(set_local $14
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $20)
(tee_local $13
@@ -3803,7 +3803,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.const 1224)
(get_local $20)
@@ -4676,15 +4676,15 @@
(i32.add
(i32.shl
(tee_local $4
- (block $do-once61 i32
- (if i32
+ (block $do-once61 (result i32)
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $15)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once61
(i32.const 31)
@@ -5395,14 +5395,14 @@
(i32.add
(i32.shl
(tee_local $3
- (if i32
+ (if (result i32)
(tee_local $13
(i32.shr_u
(get_local $2)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -7406,14 +7406,14 @@
(i32.add
(i32.shl
(tee_local $6
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -7887,11 +7887,11 @@
(i32.eq
(get_local $5)
(tee_local $6
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1160)
)
- (block i32
+ (block (result i32)
(call $ra
(i32.const 1)
(get_local $0)
@@ -7923,7 +7923,7 @@
)
(get_local $9)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $11)
(i32.load
@@ -8026,12 +8026,12 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.eq
(get_local $3)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.add
@@ -8133,7 +8133,7 @@
)
)
(set_local $15
- (if i32
+ (if (result i32)
(i32.eq
(get_local $17)
(i32.const 2)
@@ -8558,7 +8558,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
@@ -8588,7 +8588,7 @@
)
(loop $while-in
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -8766,7 +8766,7 @@
)
)
(set_local $4
- (if i32
+ (if (result i32)
(i32.eq
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -9226,7 +9226,7 @@
(local $2 i32)
(local $3 i32)
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(tee_local $1
@@ -9244,8 +9244,8 @@
)
)
(set_local $0
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(i32.lt_s
(call $cb
(get_local $0)
@@ -9254,7 +9254,7 @@
(i32.const 0)
)
(i32.const 1)
- (block i32
+ (block (result i32)
(if
(i32.ne
(i32.load8_s offset=75
@@ -9345,7 +9345,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.load
@@ -9354,7 +9354,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -9364,7 +9364,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -9400,7 +9400,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -9513,7 +9513,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $Pa
(call $ua
@@ -9523,7 +9523,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -9644,12 +9644,12 @@
(get_local $0)
)
(func $Pa (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $Qa)
(i32.sub
@@ -9663,7 +9663,7 @@
)
)
(func $Qa (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1160)
)
diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp
index 70606033e..a6d77f5cf 100644
--- a/test/memorygrowth.fromasm.clamp
+++ b/test/memorygrowth.fromasm.clamp
@@ -1428,14 +1428,14 @@
(i32.add
(i32.shl
(tee_local $27
- (if i32
+ (if (result i32)
(tee_local $7
(i32.shr_u
(get_local $1)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -1709,7 +1709,7 @@
)
(if
(tee_local $3
- (if i32
+ (if (result i32)
(i32.and
(i32.eqz
(get_local $5)
@@ -1718,7 +1718,7 @@
(get_local $33)
)
)
- (block i32
+ (block (result i32)
(if
(i32.eqz
(tee_local $4
@@ -2487,14 +2487,14 @@
(i32.add
(i32.shl
(tee_local $16
- (if i32
+ (if (result i32)
(tee_local $5
(i32.shr_u
(get_local $18)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $18)
(i32.const 16777215)
@@ -3153,8 +3153,8 @@
(if
(i32.eq
(tee_local $7
- (block $label$break$b i32
- (if i32
+ (block $label$break$b (result i32)
+ (if (result i32)
(i32.and
(i32.load
(i32.const 1652)
@@ -3162,7 +3162,7 @@
(i32.const 4)
)
(i32.const 188)
- (block i32
+ (block (result i32)
(block $label$break$c
(if
(tee_local $18
@@ -3308,7 +3308,7 @@
)
(block
(set_local $3
- (if i32
+ (if (result i32)
(i32.and
(tee_local $19
(i32.add
@@ -3794,7 +3794,7 @@
)
)
(set_local $14
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $20)
(tee_local $13
@@ -3803,7 +3803,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.const 1224)
(get_local $20)
@@ -4676,15 +4676,15 @@
(i32.add
(i32.shl
(tee_local $4
- (block $do-once61 i32
- (if i32
+ (block $do-once61 (result i32)
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $15)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once61
(i32.const 31)
@@ -5395,14 +5395,14 @@
(i32.add
(i32.shl
(tee_local $3
- (if i32
+ (if (result i32)
(tee_local $13
(i32.shr_u
(get_local $2)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -7406,14 +7406,14 @@
(i32.add
(i32.shl
(tee_local $6
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -7887,11 +7887,11 @@
(i32.eq
(get_local $5)
(tee_local $6
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1160)
)
- (block i32
+ (block (result i32)
(call $ra
(i32.const 1)
(get_local $0)
@@ -7923,7 +7923,7 @@
)
(get_local $9)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $11)
(i32.load
@@ -8026,12 +8026,12 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.eq
(get_local $3)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.add
@@ -8133,7 +8133,7 @@
)
)
(set_local $15
- (if i32
+ (if (result i32)
(i32.eq
(get_local $17)
(i32.const 2)
@@ -8558,7 +8558,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
@@ -8588,7 +8588,7 @@
)
(loop $while-in
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -8766,7 +8766,7 @@
)
)
(set_local $4
- (if i32
+ (if (result i32)
(i32.eq
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -9226,7 +9226,7 @@
(local $2 i32)
(local $3 i32)
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(tee_local $1
@@ -9244,8 +9244,8 @@
)
)
(set_local $0
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(i32.lt_s
(call $cb
(get_local $0)
@@ -9254,7 +9254,7 @@
(i32.const 0)
)
(i32.const 1)
- (block i32
+ (block (result i32)
(if
(i32.ne
(i32.load8_s offset=75
@@ -9345,7 +9345,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.load
@@ -9354,7 +9354,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -9364,7 +9364,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -9400,7 +9400,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -9513,7 +9513,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $Pa
(call $ua
@@ -9523,7 +9523,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -9644,12 +9644,12 @@
(get_local $0)
)
(func $Pa (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $Qa)
(i32.sub
@@ -9663,7 +9663,7 @@
)
)
(func $Qa (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1160)
)
diff --git a/test/memorygrowth.fromasm.clamp.no-opts b/test/memorygrowth.fromasm.clamp.no-opts
index 690c1098d..490c479c0 100644
--- a/test/memorygrowth.fromasm.clamp.no-opts
+++ b/test/memorygrowth.fromasm.clamp.no-opts
@@ -192,7 +192,7 @@
)
(block
(set_local $d
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $a)
(i32.const 11)
@@ -1008,7 +1008,7 @@
)
)
(set_local $e
- (if i32
+ (if (result i32)
(get_local $f)
(get_local $j)
(get_local $e)
@@ -1018,7 +1018,7 @@
(get_local $B)
)
(set_local $s
- (if i32
+ (if (result i32)
(get_local $f)
(get_local $B)
(get_local $s)
@@ -1885,7 +1885,7 @@
(set_local $s
(i32.shl
(get_local $e)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $J)
(i32.const 31)
@@ -1995,7 +1995,7 @@
)
)
(set_local $m
- (if i32
+ (if (result i32)
(i32.or
(i32.eq
(get_local $l)
@@ -2285,14 +2285,14 @@
)
)
(set_local $g
- (if i32
+ (if (result i32)
(get_local $s)
(get_local $i)
(get_local $O)
)
)
(set_local $i
- (if i32
+ (if (result i32)
(get_local $s)
(get_local $P)
(get_local $Q)
@@ -3212,7 +3212,7 @@
(set_local $q
(i32.shl
(get_local $U)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $ba)
(i32.const 31)
@@ -4433,7 +4433,7 @@
)
)
(set_local $c
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ma)
@@ -4609,7 +4609,7 @@
)
)
(set_local $ca
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -4805,7 +4805,7 @@
(set_local $ca
(i32.add
(get_local $ha)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -4833,7 +4833,7 @@
(set_local $ma
(i32.add
(get_local $c)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -5938,7 +5938,7 @@
(set_local $aa
(i32.shl
(get_local $Ea)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $Ha)
(i32.const 31)
@@ -6235,7 +6235,7 @@
(set_local $ka
(i32.add
(get_local $ca)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ea)
@@ -6261,7 +6261,7 @@
)
)
(set_local $ca
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $ka)
(get_local $ea)
@@ -6283,7 +6283,7 @@
)
)
(set_local $c
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ma)
@@ -6788,7 +6788,7 @@
(set_local $ma
(i32.shl
(get_local $ka)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $Oa)
(i32.const 31)
@@ -9022,7 +9022,7 @@
(set_local $F
(i32.shl
(get_local $D)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $G)
(i32.const 31)
@@ -11306,7 +11306,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise
index 45b4a4832..bd959d564 100644
--- a/test/memorygrowth.fromasm.imprecise
+++ b/test/memorygrowth.fromasm.imprecise
@@ -1427,14 +1427,14 @@
(i32.add
(i32.shl
(tee_local $27
- (if i32
+ (if (result i32)
(tee_local $7
(i32.shr_u
(get_local $1)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -1708,7 +1708,7 @@
)
(if
(tee_local $3
- (if i32
+ (if (result i32)
(i32.and
(i32.eqz
(get_local $5)
@@ -1717,7 +1717,7 @@
(get_local $33)
)
)
- (block i32
+ (block (result i32)
(if
(i32.eqz
(tee_local $4
@@ -2486,14 +2486,14 @@
(i32.add
(i32.shl
(tee_local $16
- (if i32
+ (if (result i32)
(tee_local $5
(i32.shr_u
(get_local $18)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $18)
(i32.const 16777215)
@@ -3152,8 +3152,8 @@
(if
(i32.eq
(tee_local $7
- (block $label$break$b i32
- (if i32
+ (block $label$break$b (result i32)
+ (if (result i32)
(i32.and
(i32.load
(i32.const 1652)
@@ -3161,7 +3161,7 @@
(i32.const 4)
)
(i32.const 188)
- (block i32
+ (block (result i32)
(block $label$break$c
(if
(tee_local $18
@@ -3307,7 +3307,7 @@
)
(block
(set_local $3
- (if i32
+ (if (result i32)
(i32.and
(tee_local $19
(i32.add
@@ -3793,7 +3793,7 @@
)
)
(set_local $14
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $20)
(tee_local $13
@@ -3802,7 +3802,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(i32.const 1224)
(get_local $20)
@@ -4675,15 +4675,15 @@
(i32.add
(i32.shl
(tee_local $4
- (block $do-once61 i32
- (if i32
+ (block $do-once61 (result i32)
+ (if (result i32)
(tee_local $0
(i32.shr_u
(get_local $15)
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(br_if $do-once61
(i32.const 31)
@@ -5394,14 +5394,14 @@
(i32.add
(i32.shl
(tee_local $3
- (if i32
+ (if (result i32)
(tee_local $13
(i32.shr_u
(get_local $2)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $2)
(i32.const 16777215)
@@ -7405,14 +7405,14 @@
(i32.add
(i32.shl
(tee_local $6
- (if i32
+ (if (result i32)
(tee_local $1
(i32.shr_u
(get_local $0)
(i32.const 8)
)
)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const 16777215)
@@ -7886,11 +7886,11 @@
(i32.eq
(get_local $5)
(tee_local $6
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1160)
)
- (block i32
+ (block (result i32)
(call $ra
(i32.const 1)
(get_local $0)
@@ -7922,7 +7922,7 @@
)
(get_local $9)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $11)
(i32.load
@@ -8025,12 +8025,12 @@
)
)
(set_local $5
- (if i32
+ (if (result i32)
(i32.eq
(get_local $3)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.add
@@ -8557,7 +8557,7 @@
)
(block
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
@@ -8587,7 +8587,7 @@
)
(loop $while-in
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -8765,7 +8765,7 @@
)
)
(set_local $4
- (if i32
+ (if (result i32)
(i32.eq
(call_indirect $FUNCSIG$iiii
(get_local $0)
@@ -9225,7 +9225,7 @@
(local $2 i32)
(local $3 i32)
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(tee_local $1
@@ -9243,8 +9243,8 @@
)
)
(set_local $0
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(i32.lt_s
(call $cb
(get_local $0)
@@ -9253,7 +9253,7 @@
(i32.const 0)
)
(i32.const 1)
- (block i32
+ (block (result i32)
(if
(i32.ne
(i32.load8_s offset=75
@@ -9344,7 +9344,7 @@
)
)
(tee_local $0
- (if i32
+ (if (result i32)
(i32.and
(tee_local $2
(i32.load
@@ -9353,7 +9353,7 @@
)
(i32.const 8)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.or
@@ -9363,7 +9363,7 @@
)
(i32.const -1)
)
- (block i32
+ (block (result i32)
(i32.store offset=8
(get_local $0)
(i32.const 0)
@@ -9502,7 +9502,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $Pa
(call $ua
@@ -9512,7 +9512,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -9633,12 +9633,12 @@
(get_local $0)
)
(func $Pa (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $Qa)
(i32.sub
@@ -9652,7 +9652,7 @@
)
)
(func $Qa (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1160)
)
diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts
index 2e3555abd..f2e0cc644 100644
--- a/test/memorygrowth.fromasm.imprecise.no-opts
+++ b/test/memorygrowth.fromasm.imprecise.no-opts
@@ -192,7 +192,7 @@
)
(block
(set_local $d
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $a)
(i32.const 11)
@@ -1008,7 +1008,7 @@
)
)
(set_local $e
- (if i32
+ (if (result i32)
(get_local $f)
(get_local $j)
(get_local $e)
@@ -1018,7 +1018,7 @@
(get_local $B)
)
(set_local $s
- (if i32
+ (if (result i32)
(get_local $f)
(get_local $B)
(get_local $s)
@@ -1885,7 +1885,7 @@
(set_local $s
(i32.shl
(get_local $e)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $J)
(i32.const 31)
@@ -1995,7 +1995,7 @@
)
)
(set_local $m
- (if i32
+ (if (result i32)
(i32.or
(i32.eq
(get_local $l)
@@ -2285,14 +2285,14 @@
)
)
(set_local $g
- (if i32
+ (if (result i32)
(get_local $s)
(get_local $i)
(get_local $O)
)
)
(set_local $i
- (if i32
+ (if (result i32)
(get_local $s)
(get_local $P)
(get_local $Q)
@@ -3212,7 +3212,7 @@
(set_local $q
(i32.shl
(get_local $U)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $ba)
(i32.const 31)
@@ -4433,7 +4433,7 @@
)
)
(set_local $c
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ma)
@@ -4609,7 +4609,7 @@
)
)
(set_local $ca
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -4805,7 +4805,7 @@
(set_local $ca
(i32.add
(get_local $ha)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -4833,7 +4833,7 @@
(set_local $ma
(i32.add
(get_local $c)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -5938,7 +5938,7 @@
(set_local $aa
(i32.shl
(get_local $Ea)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $Ha)
(i32.const 31)
@@ -6235,7 +6235,7 @@
(set_local $ka
(i32.add
(get_local $ca)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ea)
@@ -6261,7 +6261,7 @@
)
)
(set_local $ca
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $ka)
(get_local $ea)
@@ -6283,7 +6283,7 @@
)
)
(set_local $c
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ma)
@@ -6788,7 +6788,7 @@
(set_local $ma
(i32.shl
(get_local $ka)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $Oa)
(i32.const 31)
@@ -9022,7 +9022,7 @@
(set_local $F
(i32.shl
(get_local $D)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $G)
(i32.const 31)
diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts
index 690c1098d..490c479c0 100644
--- a/test/memorygrowth.fromasm.no-opts
+++ b/test/memorygrowth.fromasm.no-opts
@@ -192,7 +192,7 @@
)
(block
(set_local $d
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $a)
(i32.const 11)
@@ -1008,7 +1008,7 @@
)
)
(set_local $e
- (if i32
+ (if (result i32)
(get_local $f)
(get_local $j)
(get_local $e)
@@ -1018,7 +1018,7 @@
(get_local $B)
)
(set_local $s
- (if i32
+ (if (result i32)
(get_local $f)
(get_local $B)
(get_local $s)
@@ -1885,7 +1885,7 @@
(set_local $s
(i32.shl
(get_local $e)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $J)
(i32.const 31)
@@ -1995,7 +1995,7 @@
)
)
(set_local $m
- (if i32
+ (if (result i32)
(i32.or
(i32.eq
(get_local $l)
@@ -2285,14 +2285,14 @@
)
)
(set_local $g
- (if i32
+ (if (result i32)
(get_local $s)
(get_local $i)
(get_local $O)
)
)
(set_local $i
- (if i32
+ (if (result i32)
(get_local $s)
(get_local $P)
(get_local $Q)
@@ -3212,7 +3212,7 @@
(set_local $q
(i32.shl
(get_local $U)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $ba)
(i32.const 31)
@@ -4433,7 +4433,7 @@
)
)
(set_local $c
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ma)
@@ -4609,7 +4609,7 @@
)
)
(set_local $ca
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -4805,7 +4805,7 @@
(set_local $ca
(i32.add
(get_local $ha)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -4833,7 +4833,7 @@
(set_local $ma
(i32.add
(get_local $c)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ka)
@@ -5938,7 +5938,7 @@
(set_local $aa
(i32.shl
(get_local $Ea)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $Ha)
(i32.const 31)
@@ -6235,7 +6235,7 @@
(set_local $ka
(i32.add
(get_local $ca)
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ea)
@@ -6261,7 +6261,7 @@
)
)
(set_local $ca
- (if i32
+ (if (result i32)
(i32.lt_u
(get_local $ka)
(get_local $ea)
@@ -6283,7 +6283,7 @@
)
)
(set_local $c
- (if i32
+ (if (result i32)
(i32.eq
(i32.and
(get_local $ma)
@@ -6788,7 +6788,7 @@
(set_local $ma
(i32.shl
(get_local $ka)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $Oa)
(i32.const 31)
@@ -9022,7 +9022,7 @@
(set_local $F
(i32.shl
(get_local $D)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $G)
(i32.const 31)
@@ -11306,7 +11306,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
diff --git a/test/merge/dylib.wasm.combined b/test/merge/dylib.wasm.combined
index 92712abcf..71df67356 100644
--- a/test/merge/dylib.wasm.combined
+++ b/test/merge/dylib.wasm.combined
@@ -26,8 +26,8 @@
(export "_str" (global $global$2))
(export "_foo" (func $_foo))
(func $_main (type $2) (result i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(drop
(call $import$1
(get_global $import$0)
@@ -66,8 +66,8 @@
)
(func $_foo (type $1$0) (result i32)
(local $var$0 i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(set_local $var$0
(call $_main)
)
diff --git a/test/merge/dylib.wasm.combined.finalized b/test/merge/dylib.wasm.combined.finalized
index 53f458e7b..2ef9ed135 100644
--- a/test/merge/dylib.wasm.combined.finalized
+++ b/test/merge/dylib.wasm.combined.finalized
@@ -26,8 +26,8 @@
(export "_str" (global $global$2))
(export "_foo" (func $_foo))
(func $_main (type $2) (result i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(drop
(call $import$1
(i32.const 1024)
@@ -66,8 +66,8 @@
)
(func $_foo (type $1$0) (result i32)
(local $var$0 i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(set_local $var$0
(call $_main)
)
diff --git a/test/merge/dylib.wasm.combined.finalized.opt b/test/merge/dylib.wasm.combined.finalized.opt
index e5a26a5d3..41a24ce30 100644
--- a/test/merge/dylib.wasm.combined.finalized.opt
+++ b/test/merge/dylib.wasm.combined.finalized.opt
@@ -18,8 +18,8 @@
(export "_str" (global $global$2))
(export "_foo" (func $_foo))
(func $_main (type $2) (result i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(drop
(call $import$1
(i32.const 1024)
@@ -53,8 +53,8 @@
)
(func $_foo (type $2) (result i32)
(local $var$0 i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(set_local $var$0
(call $_main)
)
diff --git a/test/merge/dylib.wasm.combined.opt b/test/merge/dylib.wasm.combined.opt
index 1954735d9..351d05b41 100644
--- a/test/merge/dylib.wasm.combined.opt
+++ b/test/merge/dylib.wasm.combined.opt
@@ -21,8 +21,8 @@
(export "_str" (global $global$2))
(export "_foo" (func $_foo))
(func $_main (type $2) (result i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(drop
(call $import$1
(get_global $import$0)
@@ -59,8 +59,8 @@
)
(func $_foo (type $2) (result i32)
(local $var$0 i32)
- (block $label$0 i32
- (block $label$1 i32
+ (block $label$0 (result i32)
+ (block $label$1 (result i32)
(set_local $var$0
(call $_main)
)
diff --git a/test/min.fromasm.clamp.no-opts b/test/min.fromasm.clamp.no-opts
index 3f017a73e..d0cc78eb0 100644
--- a/test/min.fromasm.clamp.no-opts
+++ b/test/min.fromasm.clamp.no-opts
@@ -24,7 +24,7 @@
(local $n f32)
(set_local $n
(f32.neg
- (block f32
+ (block (result f32)
(i32.store
(get_local $k)
(get_local $p)
diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts
index 3f017a73e..d0cc78eb0 100644
--- a/test/min.fromasm.imprecise.no-opts
+++ b/test/min.fromasm.imprecise.no-opts
@@ -24,7 +24,7 @@
(local $n f32)
(set_local $n
(f32.neg
- (block f32
+ (block (result f32)
(i32.store
(get_local $k)
(get_local $p)
diff --git a/test/min.fromasm.no-opts b/test/min.fromasm.no-opts
index 3f017a73e..d0cc78eb0 100644
--- a/test/min.fromasm.no-opts
+++ b/test/min.fromasm.no-opts
@@ -24,7 +24,7 @@
(local $n f32)
(set_local $n
(f32.neg
- (block f32
+ (block (result f32)
(i32.store
(get_local $k)
(get_local $p)
diff --git a/test/min.wast b/test/min.wast
index 28a1b1b89..8ef35a49d 100644
--- a/test/min.wast
+++ b/test/min.wast
@@ -16,7 +16,7 @@
(local $n f32)
(tee_local $n
(f32.neg
- (block $block0 f32
+ (block $block0 (result f32)
(i32.store
(get_local $k)
(get_local $p)
@@ -29,7 +29,7 @@
)
)
(func $littleswitch (type $2) (param $x i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(block $switch-case$2
(block $switch-case$1
(br_table $switch-case$1 $switch-case$2 $switch-case$1
@@ -50,7 +50,7 @@
)
)
(func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(get_local $i3)
)
)
diff --git a/test/min.wast.from-wast b/test/min.wast.from-wast
index 8eb42e2fd..8942f2ff4 100644
--- a/test/min.wast.from-wast
+++ b/test/min.wast.from-wast
@@ -16,7 +16,7 @@
(local $n f32)
(tee_local $n
(f32.neg
- (block $block0 f32
+ (block $block0 (result f32)
(i32.store
(get_local $k)
(get_local $p)
@@ -29,7 +29,7 @@
)
)
(func $littleswitch (type $2) (param $x i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(block $switch-case$2
(block $switch-case$1
(br_table $switch-case$1 $switch-case$2 $switch-case$1
@@ -50,7 +50,7 @@
)
)
(func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(get_local $i3)
)
)
diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary
index ba1fbbd57..b39388c46 100644
--- a/test/min.wast.fromBinary
+++ b/test/min.wast.fromBinary
@@ -16,7 +16,7 @@
(local $var$2 f32)
(tee_local $var$2
(f32.neg
- (block $label$0 f32
+ (block $label$0 (result f32)
(i32.store
(get_local $var$0)
(get_local $var$1)
@@ -29,7 +29,7 @@
)
)
(func $littleswitch (type $2) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(block $label$2
(br_table $label$2 $label$1 $label$2
@@ -50,7 +50,7 @@
)
)
(func $f1 (type $3) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(get_local $var$2)
)
)
diff --git a/test/min.wast.fromBinary.noDebugInfo b/test/min.wast.fromBinary.noDebugInfo
index 5776a4ea7..d6ad4be85 100644
--- a/test/min.wast.fromBinary.noDebugInfo
+++ b/test/min.wast.fromBinary.noDebugInfo
@@ -16,7 +16,7 @@
(local $var$2 f32)
(tee_local $var$2
(f32.neg
- (block $label$0 f32
+ (block $label$0 (result f32)
(i32.store
(get_local $var$0)
(get_local $var$1)
@@ -29,7 +29,7 @@
)
)
(func $2 (type $2) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(block $label$2
(br_table $label$2 $label$1 $label$2
@@ -50,7 +50,7 @@
)
)
(func $3 (type $3) (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(get_local $var$2)
)
)
diff --git a/test/passes/O.bin.txt b/test/passes/O.bin.txt
index 4c64af9c6..9c68478ac 100644
--- a/test/passes/O.bin.txt
+++ b/test/passes/O.bin.txt
@@ -7,7 +7,7 @@
(export "fac-iter-named" (func $3))
(export "fac-opt" (func $4))
(func $0 (type $0) (param $0 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eq
(get_local $0)
(i64.const 0)
@@ -25,7 +25,7 @@
)
)
(func $1 (type $0) (param $0 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eq
(get_local $0)
(i64.const 0)
diff --git a/test/passes/O.txt b/test/passes/O.txt
index d560e326b..4b340dcd7 100644
--- a/test/passes/O.txt
+++ b/test/passes/O.txt
@@ -5,7 +5,7 @@
(export "ret" (func $ret))
(export "waka" (func $if-0-unreachable-to-none))
(func $ret (type $0) (result i32)
- (block $out i32
+ (block $out (result i32)
(drop
(call $ret)
)
diff --git a/test/passes/O.wast b/test/passes/O.wast
index 8029c7b5b..e42541376 100644
--- a/test/passes/O.wast
+++ b/test/passes/O.wast
@@ -1,6 +1,6 @@
(module
(func $ret (export "ret") (result i32)
- (block $out i32
+ (block $out (result i32)
(drop (call $ret))
(if (call $ret)
(return
diff --git a/test/passes/Oz.wast b/test/passes/Oz.wast
index abfd880d5..2bb8934c4 100644
--- a/test/passes/Oz.wast
+++ b/test/passes/Oz.wast
@@ -15,7 +15,7 @@
(local $var$1 i32)
(local $var$2 i32)
(local $var$3 i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(i32.store
(tee_local $var$2
(i32.add
diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt
index 381c76653..8f2908153 100644
--- a/test/passes/coalesce-locals.txt
+++ b/test/passes/coalesce-locals.txt
@@ -1046,7 +1046,7 @@
(local $1 i32)
(loop $top
(set_local $1
- (if i32
+ (if (result i32)
(i32.const 1)
(unreachable)
(get_local $0)
@@ -1066,7 +1066,7 @@
(local $1 i32)
(loop $top
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(get_local $0)
(tee_local $0
diff --git a/test/passes/coalesce-locals.wast b/test/passes/coalesce-locals.wast
index 381677aba..d6d499d36 100644
--- a/test/passes/coalesce-locals.wast
+++ b/test/passes/coalesce-locals.wast
@@ -998,7 +998,7 @@
(local $y i32)
(loop $top
(set_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
(get_local $x)
(get_local $y)
@@ -1014,7 +1014,7 @@
(local $y i32)
(loop $top
(set_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
(get_local $y)
(get_local $x)
@@ -1030,7 +1030,7 @@
(local $y i32)
(loop $top
(set_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
(unreachable)
(get_local $x)
@@ -1046,7 +1046,7 @@
(local $y i32)
(loop $top
(set_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
(unreachable)
(get_local $y)
@@ -1063,7 +1063,7 @@
(loop $top
(drop
(tee_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
(get_local $x)
(i32.const 2)
diff --git a/test/passes/code-pushing_ignore-implicit-traps.txt b/test/passes/code-pushing_ignore-implicit-traps.txt
index 31a5fdc56..b20bc49aa 100644
--- a/test/passes/code-pushing_ignore-implicit-traps.txt
+++ b/test/passes/code-pushing_ignore-implicit-traps.txt
@@ -137,7 +137,7 @@
)
(func $push-dropped (type $1) (result i32)
(local $x i32)
- (block $out i32
+ (block $out (result i32)
(drop
(br_if $out
(i32.const 2)
diff --git a/test/passes/code-pushing_ignore-implicit-traps.wast b/test/passes/code-pushing_ignore-implicit-traps.wast
index e1cb30f4a..c3ee7f8d7 100644
--- a/test/passes/code-pushing_ignore-implicit-traps.wast
+++ b/test/passes/code-pushing_ignore-implicit-traps.wast
@@ -75,7 +75,7 @@
)
(func $push-dropped (result i32)
(local $x i32)
- (block $out i32
+ (block $out (result i32)
(set_local $x (i32.const 1))
(drop (br_if $out (i32.const 2) (i32.const 3)))
(drop (get_local $x))
diff --git a/test/passes/dce.txt b/test/passes/dce.txt
index 62cee370f..3597d59ae 100644
--- a/test/passes/dce.txt
+++ b/test/passes/dce.txt
@@ -303,7 +303,7 @@
)
)
(func $unreachable-br (type $2) (result i32)
- (block $out i32
+ (block $out (result i32)
(br $out
(i32.const 0)
)
@@ -327,7 +327,7 @@
)
)
(func $unreachable-brs-3 (type $2) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
(i32.const 18)
)
@@ -346,11 +346,11 @@
)
(func $call-unreach (type $4) (param $var$0 i64) (param $var$1 i64) (result i64)
(local $2 i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $var$0)
)
- (block $label$0 i64
+ (block $label$0 (result i64)
(get_local $var$1)
)
(block
@@ -362,7 +362,7 @@
)
(block
(drop
- (block $block i64
+ (block $block (result i64)
(set_local $2
(get_local $var$0)
)
@@ -382,7 +382,7 @@
)
)
(func $br-with-unreachable-value-should-not-give-a-block-a-value (type $1) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $block
(drop
(br_if $label$0
@@ -420,7 +420,7 @@
(unreachable)
)
(func $br-block-from-unary (type $2) (result i32)
- (block $label$6 i32
+ (block $label$6 (result i32)
(br $label$6
(i32.const 8)
)
@@ -428,7 +428,7 @@
)
(func $replace-unary-with-br-child (type $1)
(drop
- (block $label$6 i32
+ (block $label$6 (result i32)
(br $label$6
(i32.const 8)
)
diff --git a/test/passes/dce.wast b/test/passes/dce.wast
index 7ee37e874..2aa4ef750 100644
--- a/test/passes/dce.wast
+++ b/test/passes/dce.wast
@@ -86,7 +86,7 @@
(if
(i32.const 0)
(drop
- (block $out i32
+ (block $out (result i32)
(br $out
(unreachable)
)
@@ -100,7 +100,7 @@
(if
(i32.const 0)
(drop
- (block $out i32
+ (block $out (result i32)
(br_if $out
(unreachable)
(i32.const 0)
@@ -115,7 +115,7 @@
(if
(i32.const 0)
(drop
- (block $out i32
+ (block $out (result i32)
(br_if $out
(unreachable)
(unreachable)
@@ -395,7 +395,7 @@
)
)
(func $typed-block-none-then-unreachable (result i32)
- (block $top-typed i32
+ (block $top-typed (result i32)
(block $switch$0 ;; this looks like it can be broken to, so it gets type 'none'
(return
(i32.const 0)
@@ -443,7 +443,7 @@
(i32.const 0)
)
(func $unreachable-br (result i32)
- (block $out i32
+ (block $out (result i32)
(br $out
(br $out (i32.const 0))
)
@@ -455,7 +455,7 @@
)
)
(func $unreachable-block-ends-switch (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$3
(nop)
(br_table $label$3
@@ -467,7 +467,7 @@
)
)
(func $unreachable-block-ends-br_if (type $1) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$2
(nop)
(br_if $label$2
@@ -479,7 +479,7 @@
)
)
(func $unreachable-brs-3 (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
(grow_memory
(br $label$0
@@ -493,9 +493,9 @@
(func $unreachable-brs-4 (param $var$0 i32) (result i32)
(i32.add
(i32.const 1)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (block $label$1 i32 ;; this block is declared i32, but we can see it is unreachable
+ (block $label$1 (result i32) ;; this block is declared i32, but we can see it is unreachable
(drop
(br_if $label$0
(i32.const 4104)
@@ -511,21 +511,21 @@
)
(func $call-unreach (param $var$0 i64) (param $var$1 i64) (result i64)
(local $2 i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $var$0)
)
- (block $label$0 i64
+ (block $label$0 (result i64)
(get_local $var$1)
)
- (block $label$1 i64
+ (block $label$1 (result i64)
(call $call-unreach
(i64.sub
(get_local $var$0)
(i64.const 1)
)
(i64.mul
- (block i64
+ (block (result i64)
(set_local $2
(get_local $var$0)
)
@@ -539,9 +539,9 @@
)
)
(func $br-gone-means-block-type-changes-then-refinalize-at-end-is-too-late (type $1) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (block i32
+ (block (result i32)
(nop)
(drop
(br_if $label$0
@@ -555,9 +555,9 @@
)
)
(func $br-with-unreachable-value-should-not-give-a-block-a-value (type $1) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (block i32 ;; turns into unreachable when refinalized
+ (block (result i32) ;; turns into unreachable when refinalized
(drop
(br_if $label$0
(i32.const 8)
@@ -571,9 +571,9 @@
)
)
(func $replace-br-value-of-i32-with-unreachable (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (block $label$1 i32
+ (block $label$1 (result i32)
(nop)
(unreachable)
)
@@ -592,9 +592,9 @@
)
)
(func $block-with-type-but-is-unreachable (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (block $block i32
+ (block $block (result i32)
(nop)
(unreachable)
)
@@ -602,9 +602,9 @@
)
)
(func $if-with-type-but-is-unreachable (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (if i32
+ (if (result i32)
(get_local $var$0)
(unreachable)
(unreachable)
@@ -619,9 +619,9 @@
)
)
(func $br-block-from-unary (result i32)
- (block $label$6 i32
+ (block $label$6 (result i32)
(i32.ctz
- (block $label$7 i32
+ (block $label$7 (result i32)
(br $label$6
(i32.const 8)
)
@@ -631,7 +631,7 @@
)
(func $replace-unary-with-br-child
(drop
- (block $label$6 i32
+ (block $label$6 (result i32)
(i32.ctz
(br $label$6
(i32.const 8)
diff --git a/test/passes/dce_vacuum.bin.txt b/test/passes/dce_vacuum.bin.txt
index dc8138b24..d4be4d1f4 100644
--- a/test/passes/dce_vacuum.bin.txt
+++ b/test/passes/dce_vacuum.bin.txt
@@ -48,7 +48,7 @@
)
)
(func $1 (type $1) (param $var$0 f64) (param $var$1 f64) (result f64)
- (block $label$0 f64
+ (block $label$0 (result f64)
(loop $label$1
(br_if $label$1
(f64.eq
diff --git a/test/passes/dce_vacuum.wast b/test/passes/dce_vacuum.wast
index acddd76e9..59aa4421b 100644
--- a/test/passes/dce_vacuum.wast
+++ b/test/passes/dce_vacuum.wast
@@ -11,7 +11,7 @@
)
)
(func $drop-unreachable (param $var$0 f32) (param $var$1 f32) (result f32)
- (block $label$0 f32
+ (block $label$0 (result f32)
(loop $label$2
(drop
(unreachable)
@@ -25,7 +25,7 @@
(func $set-unreachable (param $var$0 i64) (result i64)
(local $var$1 i64)
(local $var$2 i64)
- (block $label$0 i64
+ (block $label$0 (result i64)
(block $label$1
(loop $label$2
(if
diff --git a/test/passes/duplicate-function-elimination.txt b/test/passes/duplicate-function-elimination.txt
index 3c098abe1..3ffe3b7ba 100644
--- a/test/passes/duplicate-function-elimination.txt
+++ b/test/passes/duplicate-function-elimination.txt
@@ -293,7 +293,7 @@
(memory $0 0)
(func $keep2 (type $0)
(drop
- (block $foo i32
+ (block $foo (result i32)
(br_table $foo $foo
(i32.const 0)
(i32.const 0)
@@ -303,7 +303,7 @@
)
(func $other (type $0)
(drop
- (block $bar i32
+ (block $bar (result i32)
(br_table $bar $bar
(i32.const 0)
(i32.const 1)
diff --git a/test/passes/duplicate-function-elimination.wast b/test/passes/duplicate-function-elimination.wast
index f8fe1d4fb..2a01d61ec 100644
--- a/test/passes/duplicate-function-elimination.wast
+++ b/test/passes/duplicate-function-elimination.wast
@@ -351,7 +351,7 @@
(type $0 (func))
(func $keep2 (type $0)
(drop
- (block $foo i32
+ (block $foo (result i32)
(br_table $foo $foo
(i32.const 0)
(i32.const 0)
@@ -361,7 +361,7 @@
)
(func $other (type $0)
(drop
- (block $bar i32
+ (block $bar (result i32)
(br_table $bar $bar
(i32.const 0)
(i32.const 1)
diff --git a/test/passes/flatten-control-flow.wast b/test/passes/flatten-control-flow.wast
index 30965c1bf..69f3146c0 100644
--- a/test/passes/flatten-control-flow.wast
+++ b/test/passes/flatten-control-flow.wast
@@ -89,7 +89,7 @@
(if
(i32.const 0)
(drop
- (block $out11 i32
+ (block $out11 (result i32)
(br $out11
(unreachable)
)
@@ -103,7 +103,7 @@
(if
(i32.const 0)
(drop
- (block $out13 i32
+ (block $out13 (result i32)
(br_if $out13
(unreachable)
(i32.const 0)
@@ -118,7 +118,7 @@
(if
(i32.const 0)
(drop
- (block $out15 i32
+ (block $out15 (result i32)
(br_if $out15
(unreachable)
(unreachable)
@@ -398,7 +398,7 @@
)
)
(func $typed-block-none-then-unreachable (type $2) (result i32)
- (block $top-typed i32
+ (block $top-typed (result i32)
(block $switch$0
(return
(i32.const 0)
@@ -450,7 +450,7 @@
(i32.const 0)
)
(func $unreachable-br (type $2) (result i32)
- (block $out i32
+ (block $out (result i32)
(br $out
(br $out
(i32.const 0)
@@ -464,7 +464,7 @@
)
)
(func $unreachable-block-ends-switch (type $2) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$3
(nop)
(br_table $label$3
@@ -476,7 +476,7 @@
)
)
(func $unreachable-block-ends-br_if (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$2
(nop)
(br_if $label$2
@@ -488,7 +488,7 @@
)
)
(func $unreachable-brs-3 (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
(grow_memory
(br $label$0
@@ -502,9 +502,9 @@
(func $unreachable-brs-4 (param $var$0 i32) (result i32)
(i32.add
(i32.const 1)
- (block $label$0 i32
+ (block $label$0 (result i32)
(br $label$0
- (block $label$1 i32
+ (block $label$1 (result i32)
(drop
(br_if $label$0
(i32.const 4104)
@@ -520,21 +520,21 @@
)
(func $call-unreach (param $var$0 i64) (param $var$1 i64) (result i64)
(local $2 i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $var$0)
)
- (block $label$0 i64
+ (block $label$0 (result i64)
(get_local $var$1)
)
- (block $label$1 i64
+ (block $label$1 (result i64)
(call $call-unreach
(i64.sub
(get_local $var$0)
(i64.const 1)
)
(i64.mul
- (block $block i64
+ (block $block (result i64)
(set_local $2
(get_local $var$0)
)
@@ -556,16 +556,16 @@
(drop (i32.add (br $out) (i32.const 1)))
(drop (i32.add (i32.const 1) (br_table $out $out $out $out (i32.const 3))))
(drop (i32.add (i32.const 1)
- (block i32
+ (block (result i32)
(drop (i32.const 2))
(drop (i32.const 3))
(i32.const 4)
)
))
(drop (i32.add (i32.const 1)
- (block $in i32
+ (block $in (result i32)
(drop
- (block $switch-in i32
+ (block $switch-in (result i32)
(br_table $in $switch-in $in (i32.const 2) (i32.const 777))
)
)
@@ -574,12 +574,12 @@
)
))
(drop (i32.add (i32.const 1)
- (loop i32
+ (loop (result i32)
(i32.const 5)
)
))
(drop (i32.add (i32.const 1)
- (if i32
+ (if (result i32)
(i32.const 6)
(i32.const 7)
(i32.const 8)
@@ -615,7 +615,7 @@
)
(drop
(select
- (if i32
+ (if (result i32)
(i32.const 11)
(i32.const 12)
(i32.const 13)
@@ -627,7 +627,7 @@
(drop
(select
(i32.const 9)
- (if i32
+ (if (result i32)
(i32.const 11)
(i32.const 12)
(i32.const 13)
@@ -639,7 +639,7 @@
(select
(i32.const 9)
(i32.const 10)
- (if i32
+ (if (result i32)
(i32.const 11)
(i32.const 12)
(i32.const 13)
@@ -648,13 +648,13 @@
)
(drop
(select
- (if i32
+ (if (result i32)
(i32.const 11)
(i32.const 12)
(i32.const 13)
)
(i32.const 14)
- (if i32
+ (if (result i32)
(i32.const 15)
(i32.const 16)
(i32.const 17)
@@ -664,14 +664,14 @@
(drop (i32.add (i32.const 1) (return)))
(drop (i32.add (i32.const 1) (unreachable)))
(drop
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.const 5)
(i32.const 6)
(i32.const 7)
)
(i32.const 8)
- (if i32
+ (if (result i32)
(i32.const 9)
(i32.const 10)
(i32.const 11)
@@ -679,7 +679,7 @@
)
)
(drop
- (block $temp i32
+ (block $temp (result i32)
(br_if $temp
(i32.const 1)
(i32.const 2)
@@ -701,7 +701,7 @@
(local $5 i32)
(local $433 i32)
(drop
- (block i32
+ (block (result i32)
(if
(i32.eq
(get_local $12)
@@ -750,10 +750,10 @@
)
)
(func $outer-block-typed (type $3) (param $var$0 i32) (result i32)
- (block i32
+ (block (result i32)
(i32.add
(i32.const 1)
- (block $label$0 i32
+ (block $label$0 (result i32)
(i32.const 16)
)
)
@@ -761,11 +761,11 @@
)
(func $nested-br_if-with-value (result i32)
(local $0 i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(drop
(br_if $label$0
(i32.const 0)
- (block i32
+ (block (result i32)
(get_local $0)
)
)
diff --git a/test/passes/inlining.txt b/test/passes/inlining.txt
index bfbd63fe1..80ee3acf3 100644
--- a/test/passes/inlining.txt
+++ b/test/passes/inlining.txt
@@ -26,22 +26,22 @@
)
)
(drop
- (block $__inlined_func$int i32
+ (block $__inlined_func$int (result i32)
(i32.const 2)
)
)
(drop
- (block $__inlined_func$double f64
+ (block $__inlined_func$double (result f64)
(f64.const 3.14159)
)
)
(set_local $x
- (block $__inlined_func$int2 i32
+ (block $__inlined_func$int2 (result i32)
(i32.const 112)
)
)
(set_local $y
- (block $__inlined_func$double2 f64
+ (block $__inlined_func$double2 (result f64)
(f64.const 113.14159)
)
)
@@ -56,7 +56,7 @@
)
)
(drop
- (block $__inlined_func$return i32
+ (block $__inlined_func$return (result i32)
(br $__inlined_func$return
(i32.const 5)
)
diff --git a/test/passes/local-cse.txt b/test/passes/local-cse.txt
index 266008bd4..34e7c9580 100644
--- a/test/passes/local-cse.txt
+++ b/test/passes/local-cse.txt
@@ -142,7 +142,7 @@
(local $var$2 i32)
(local $var$3 i32)
(local $4 i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(i32.store
(tee_local $var$2
(tee_local $4
diff --git a/test/passes/local-cse.wast b/test/passes/local-cse.wast
index 26a25d236..31b49cbb1 100644
--- a/test/passes/local-cse.wast
+++ b/test/passes/local-cse.wast
@@ -121,7 +121,7 @@
(local $var$1 i32)
(local $var$2 i32)
(local $var$3 i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(i32.store
(tee_local $var$2
(i32.add
diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt
index 57ddf1624..33f16785a 100644
--- a/test/passes/merge-blocks.txt
+++ b/test/passes/merge-blocks.txt
@@ -42,7 +42,7 @@
(func $undroppable-block-br-if (type $1) (param $0 i32)
(block $block
(drop
- (block $x i32
+ (block $x (result i32)
(call $undroppable-block-br-if
(br_if $x
(i32.const 1)
diff --git a/test/passes/merge-blocks.wast b/test/passes/merge-blocks.wast
index e0da890a1..a61027778 100644
--- a/test/passes/merge-blocks.wast
+++ b/test/passes/merge-blocks.wast
@@ -2,7 +2,7 @@
(func $drop-block
(block
(drop
- (block $x i32
+ (block $x (result i32)
(i32.const 0)
)
)
@@ -11,7 +11,7 @@
(func $drop-block-br
(block
(drop
- (block $x i32
+ (block $x (result i32)
(br $x (i32.const 1))
(i32.const 0)
)
@@ -21,7 +21,7 @@
(func $drop-block-br-if
(block
(drop
- (block $x i32
+ (block $x (result i32)
(drop (br_if $x (i32.const 1) (i32.const 2)))
(i32.const 0)
)
@@ -31,7 +31,7 @@
(func $undroppable-block-br-if (param i32)
(block
(drop
- (block $x i32
+ (block $x (result i32)
(call $undroppable-block-br-if (br_if $x (i32.const 1) (i32.const 2)))
(i32.const 0)
)
@@ -41,7 +41,7 @@
(func $drop-block-nested-br-if
(block
(drop
- (block $x i32
+ (block $x (result i32)
(if (i32.const 100)
(block
(drop (br_if $x (i32.const 1) (i32.const 2)))
diff --git a/test/passes/metrics.txt b/test/passes/metrics.txt
index 180644c38..caf5f8a91 100644
--- a/test/passes/metrics.txt
+++ b/test/passes/metrics.txt
@@ -45,7 +45,7 @@ Counts
)
(drop
(i32.eq
- (if i32
+ (if (result i32)
(i32.const 4)
(i32.const 5)
(i32.const 6)
diff --git a/test/passes/metrics.wast b/test/passes/metrics.wast
index be31ea23a..4c762b59d 100644
--- a/test/passes/metrics.wast
+++ b/test/passes/metrics.wast
@@ -34,7 +34,7 @@
)
(drop
(i32.eq
- (if i32
+ (if (result i32)
(i32.const 4)
(i32.const 5)
(i32.const 6)
diff --git a/test/passes/nm.txt b/test/passes/nm.txt
index 5ca99cce9..22e67cd8c 100644
--- a/test/passes/nm.txt
+++ b/test/passes/nm.txt
@@ -9,7 +9,7 @@
)
(func $b (type $0)
(drop
- (loop $loop-in1 i32
+ (loop $loop-in1 (result i32)
(nop)
(i32.const 1000)
)
diff --git a/test/passes/nm.wast b/test/passes/nm.wast
index 58c326745..4b3e82acf 100644
--- a/test/passes/nm.wast
+++ b/test/passes/nm.wast
@@ -6,7 +6,7 @@
)
(func $b (type $0)
(drop
- (loop $loop-in1 i32
+ (loop $loop-in1 (result i32)
(nop)
(i32.const 1000)
)
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt
index 2b33bd700..c8fe17cf0 100644
--- a/test/passes/optimize-instructions.txt
+++ b/test/passes/optimize-instructions.txt
@@ -403,7 +403,7 @@
)
(func $recurse-bool (type $1)
(if
- (if i32
+ (if (result i32)
(i32.const 1)
(call $ne0)
(call $ne1)
@@ -411,7 +411,7 @@
(nop)
)
(if
- (block $block i32
+ (block $block (result i32)
(nop)
(call $ne0)
)
@@ -1170,7 +1170,7 @@
)
(func $sign-ext-boolean (type $4) (param $0 i32) (param $1 i32)
(drop
- (if i32
+ (if (result i32)
(i32.and
(get_local $0)
(i32.const 255)
@@ -1893,7 +1893,7 @@
)
)
(drop
- (block i32
+ (block (result i32)
(drop
(tee_local $0
(get_local $1)
@@ -1925,7 +1925,7 @@
)
)
(drop
- (block i32
+ (block (result i32)
(drop
(tee_local $0
(get_local $1)
diff --git a/test/passes/optimize-instructions.wast b/test/passes/optimize-instructions.wast
index 56defd648..bb89d7314 100644
--- a/test/passes/optimize-instructions.wast
+++ b/test/passes/optimize-instructions.wast
@@ -316,7 +316,7 @@
)
(func $recurse-bool
(if
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.ne (call $ne0) (i32.const 0))
(i32.ne (call $ne1) (i32.const 0))
@@ -324,7 +324,7 @@
(nop)
)
(if
- (block i32
+ (block (result i32)
(nop)
(i32.ne (call $ne0) (i32.const 0))
)
@@ -1446,7 +1446,7 @@
)
(func $sign-ext-boolean (param $0 i32) (param $1 i32)
(drop
- (if i32
+ (if (result i32)
(i32.shr_s
(i32.shl
(get_local $0)
@@ -2308,14 +2308,14 @@
)
(func $if-parallel (param $0 i32) (param $1 i32)
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(i32.add (get_local $1) (i32.const 1))
(i32.add (get_local $1) (i32.const 1))
)
)
(drop
- (if i32
+ (if (result i32)
(tee_local $0 (get_local $1)) ;; side effects!
(i32.add (get_local $1) (i32.const 1))
(i32.add (get_local $1) (i32.const 1))
diff --git a/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt b/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt
index f59995abc..e2c4bb786 100644
--- a/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt
+++ b/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.txt
@@ -23,8 +23,8 @@
)
)
(set_local $0
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.rem_s
(i32.add
(i32.mul
@@ -108,7 +108,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.or
(i32.eqz
(i32.rem_s
@@ -191,8 +191,8 @@
)
)
(set_local $0
- (if i32
- (if i32
+ (if (result i32)
+ (if (result i32)
(i32.rem_u
(i32.add
(i32.mul
diff --git a/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.wast b/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.wast
index 7874907f3..e1215fa3f 100644
--- a/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.wast
+++ b/test/passes/optimize-instructions_optimize-level=2_ignore-implicit-traps.wast
@@ -23,7 +23,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.or ;; this or is very expensive. we should compute one side, then see if we even need the other
(i32.eqz
(i32.rem_s
@@ -109,7 +109,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.or ;; this or is very expensive, but has a side effect on both sides
(i32.eqz
(i32.rem_s
@@ -195,7 +195,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.or ;; this or is very expensive, and the first side has no side effect
(i32.eqz
(i32.rem_s
diff --git a/test/passes/precompute.txt b/test/passes/precompute.txt
index 3de84aabe..c0dd8df0a 100644
--- a/test/passes/precompute.txt
+++ b/test/passes/precompute.txt
@@ -30,7 +30,7 @@
(br $c)
)
(drop
- (block $val i32
+ (block $val (result i32)
(nop)
(call $x
(i32.const 4)
@@ -45,7 +45,7 @@
)
(nop)
(drop
- (block $d0 i32
+ (block $d0 (result i32)
(call $x
(i32.const 5)
)
@@ -54,7 +54,7 @@
)
)
(drop
- (block $d2 i32
+ (block $d2 (result i32)
(call $x
(i32.const 6)
)
@@ -63,7 +63,7 @@
)
)
(drop
- (block $d4 i32
+ (block $d4 (result i32)
(call $x
(i32.const 7)
)
diff --git a/test/passes/precompute.wast b/test/passes/precompute.wast
index aafa8e947..84945f225 100644
--- a/test/passes/precompute.wast
+++ b/test/passes/precompute.wast
@@ -59,7 +59,7 @@
(br $c)
)
(drop
- (block $val i32
+ (block $val (result i32)
(drop (br_if $val (i32.const 100) (i32.const 0)))
(call $x (i32.const 4))
(drop (br_if $val (i32.const 101) (i32.const 1)))
@@ -74,7 +74,7 @@
)
)
(drop
- (block $d i32
+ (block $d (result i32)
(call $x (i32.const 5))
(block $e
(drop (br_if $d (br $e) (i32.const 1)))
@@ -87,7 +87,7 @@
)
)
(drop
- (block $d i32
+ (block $d (result i32)
(call $x (i32.const 6))
(block $e
(drop (br_if $d (br $e) (i32.const 0)))
@@ -99,7 +99,7 @@
)
)
(drop
- (block $d i32
+ (block $d (result i32)
(call $x (i32.const 7))
(block $e
(drop (br_if $d (i32.const 1) (br $e)))
@@ -108,7 +108,7 @@
)
)
(call $x
- (block $out i32
+ (block $out (result i32)
(block $waka1
(block $waka2
(block $waka3
@@ -124,7 +124,7 @@
)
)
(call $x
- (block $out i32
+ (block $out (result i32)
(block $waka1
(block $waka2
(block $waka3
@@ -140,7 +140,7 @@
)
)
(call $x
- (block $out i32
+ (block $out (result i32)
(block $waka1
(block $waka2
(block $waka3
@@ -156,7 +156,7 @@
)
)
(call $x
- (block $out i32
+ (block $out (result i32)
(block $waka1
(block $waka2
(block $waka3
@@ -197,11 +197,11 @@
)
(func $br_if-condition-is-block-i32-but-unreachable-so-refinalize-tricky
(drop
- (block $label$1 i32
+ (block $label$1 (result i32)
(drop
(br_if $label$1
(i32.const 100)
- (block $label$3 i32
+ (block $label$3 (result i32)
(unreachable)
)
)
diff --git a/test/passes/precompute_coalesce-locals_vacuum.wast b/test/passes/precompute_coalesce-locals_vacuum.wast
index d7502989f..3364906fd 100644
--- a/test/passes/precompute_coalesce-locals_vacuum.wast
+++ b/test/passes/precompute_coalesce-locals_vacuum.wast
@@ -2,11 +2,11 @@
(func $nested-br_if-value (param $var$0 i32) (result i32)
(local $1 i32)
(local $2 i32)
- (loop $label$0 i32
+ (loop $label$0 (result i32)
(drop
(i32.const 2)
)
- (block i32
+ (block (result i32)
(set_local $2
(i32.const 4)
)
diff --git a/test/passes/print-call-graph.txt b/test/passes/print-call-graph.txt
index 4d3ddc0b6..c1db051ad 100644
--- a/test/passes/print-call-graph.txt
+++ b/test/passes/print-call-graph.txt
@@ -396,7 +396,7 @@ digraph call {
)
)
(set_local $0
- (block $jumpthreading$outer$1 i32
+ (block $jumpthreading$outer$1 (result i32)
(block $jumpthreading$inner$1
(block $jumpthreading$inner$0
(loop $while-in
@@ -404,11 +404,11 @@ digraph call {
(i32.eq
(get_local $11)
(tee_local $4
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
- (block $block i32
+ (block $block (result i32)
(call $_pthread_cleanup_push
(i32.const 1)
(get_local $0)
@@ -440,7 +440,7 @@ digraph call {
)
(get_local $3)
)
- (block $block0 i32
+ (block $block0 (result i32)
(i32.store
(get_local $8)
(i32.load
@@ -479,7 +479,7 @@ digraph call {
)
)
(set_local $1
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $4)
(tee_local $12
@@ -488,7 +488,7 @@ digraph call {
)
)
)
- (block $block2 i32
+ (block $block2 (result i32)
(i32.store
(get_local $6)
(tee_local $3
@@ -523,12 +523,12 @@ digraph call {
(get_local $1)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $5)
(i32.const 2)
)
- (block $block4 i32
+ (block $block4 (result i32)
(i32.store
(get_local $6)
(i32.add
@@ -546,7 +546,7 @@ digraph call {
)
(get_local $12)
)
- (block $block5 i32
+ (block $block5 (result i32)
(set_local $3
(get_local $1)
)
@@ -687,7 +687,7 @@ digraph call {
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -697,7 +697,7 @@ digraph call {
)
(i32.const 0)
)
- (block $block i32
+ (block $block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -715,12 +715,12 @@ digraph call {
(get_local $0)
)
(func $___syscall_ret (type $FUNCSIG$ii) (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block $block i32
+ (block $block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -734,7 +734,7 @@ digraph call {
)
)
(func $___errno_location (type $6) (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
@@ -833,10 +833,10 @@ digraph call {
(func $_fflush (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(get_local $0)
- (block $block i32
+ (block $block (result i32)
(if
(i32.le_s
(i32.load offset=76
@@ -862,10 +862,10 @@ digraph call {
(get_local $0)
)
)
- (if i32
+ (if (result i32)
(get_local $2)
(get_local $1)
- (block $block9 i32
+ (block $block9 (result i32)
(call $_free
(get_local $0)
)
@@ -873,9 +873,9 @@ digraph call {
)
)
)
- (block $block10 i32
+ (block $block10 (result i32)
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1136)
)
@@ -898,7 +898,7 @@ digraph call {
)
(loop $while-in
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -912,7 +912,7 @@ digraph call {
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_u
(i32.load offset=20
(get_local $1)
@@ -960,7 +960,7 @@ digraph call {
(local $4 i32)
(local $5 i32)
(local $6 i32)
- (block $jumpthreading$outer$0 i32
+ (block $jumpthreading$outer$0 (result i32)
(block $jumpthreading$inner$0
(br_if $jumpthreading$inner$0
(i32.le_u
diff --git a/test/passes/print-call-graph.wast b/test/passes/print-call-graph.wast
index 33fdc946a..100648c1e 100644
--- a/test/passes/print-call-graph.wast
+++ b/test/passes/print-call-graph.wast
@@ -281,7 +281,7 @@
)
)
(set_local $0
- (block $jumpthreading$outer$1 i32
+ (block $jumpthreading$outer$1 (result i32)
(block $jumpthreading$inner$1
(block $jumpthreading$inner$0
(loop $while-in
@@ -289,11 +289,11 @@
(i32.eq
(get_local $11)
(tee_local $4
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
- (block i32
+ (block (result i32)
(call $_pthread_cleanup_push
(i32.const 1)
(get_local $0)
@@ -325,7 +325,7 @@
)
(get_local $3)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $8)
(i32.load
@@ -364,7 +364,7 @@
)
)
(set_local $1
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $4)
(tee_local $12
@@ -373,7 +373,7 @@
)
)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(tee_local $3
@@ -408,12 +408,12 @@
(get_local $1)
)
)
- (if i32
+ (if (result i32)
(i32.eq
(get_local $5)
(i32.const 2)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $6)
(i32.add
@@ -431,7 +431,7 @@
)
(get_local $12)
)
- (block i32
+ (block (result i32)
(set_local $3
(get_local $1)
)
@@ -572,7 +572,7 @@
(get_local $2)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.lt_s
(call $___syscall_ret
(call $___syscall140
@@ -582,7 +582,7 @@
)
(i32.const 0)
)
- (block i32
+ (block (result i32)
(i32.store
(get_local $0)
(i32.const -1)
@@ -600,12 +600,12 @@
(get_local $0)
)
(func $___syscall_ret (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.gt_u
(get_local $0)
(i32.const -4096)
)
- (block i32
+ (block (result i32)
(i32.store
(call $___errno_location)
(i32.sub
@@ -619,7 +619,7 @@
)
)
(func $___errno_location (result i32)
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1140)
)
@@ -718,10 +718,10 @@
(func $_fflush (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
- (block $do-once i32
- (if i32
+ (block $do-once (result i32)
+ (if (result i32)
(get_local $0)
- (block i32
+ (block (result i32)
(if
(i32.le_s
(i32.load offset=76
@@ -747,10 +747,10 @@
(get_local $0)
)
)
- (if i32
+ (if (result i32)
(get_local $2)
(get_local $1)
- (block i32
+ (block (result i32)
(call $_free
(get_local $0)
)
@@ -758,9 +758,9 @@
)
)
)
- (block i32
+ (block (result i32)
(set_local $0
- (if i32
+ (if (result i32)
(i32.load
(i32.const 1136)
)
@@ -783,7 +783,7 @@
)
(loop $while-in
(set_local $2
- (if i32
+ (if (result i32)
(i32.gt_s
(i32.load offset=76
(get_local $1)
@@ -797,7 +797,7 @@
)
)
(set_local $0
- (if i32
+ (if (result i32)
(i32.gt_u
(i32.load offset=20
(get_local $1)
@@ -845,7 +845,7 @@
(local $4 i32)
(local $5 i32)
(local $6 i32)
- (block $jumpthreading$outer$0 i32
+ (block $jumpthreading$outer$0 (result i32)
(block $jumpthreading$inner$0
(br_if $jumpthreading$inner$0
(i32.le_u
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt
index ce5aee59a..62643ae00 100644
--- a/test/passes/remove-unused-brs.txt
+++ b/test/passes/remove-unused-brs.txt
@@ -145,7 +145,7 @@
)
)
(func $b13 (type $2) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(if
(i32.const 1)
(block $block1
@@ -172,13 +172,13 @@
)
)
(func $b14 (type $2) (result i32)
- (block $topmost i32
- (if i32
+ (block $topmost (result i32)
+ (if (result i32)
(i32.const 1)
- (block $block1 i32
+ (block $block1 (result i32)
(i32.const 12)
)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 27)
)
)
@@ -285,8 +285,8 @@
)
)
(func $ret-value (type $2) (result i32)
- (block $block0 i32
- (block $block1 i32
+ (block $block0 (result i32)
+ (block $block1 (result i32)
(i32.const 1)
)
)
@@ -345,7 +345,7 @@
)
)
(if
- (block $a17 i32
+ (block $a17 (result i32)
(i32.const 0)
)
(block $a18
@@ -409,7 +409,7 @@
(i32.const 1)
)
)
- (block $do-once$028 i32
+ (block $do-once$028 (result i32)
(if
(tee_local $x
(i32.const 1)
@@ -628,7 +628,7 @@
(block
(call $loops)
(drop
- (block $out2 i32
+ (block $out2 (result i32)
(i32.const 1)
)
)
@@ -701,7 +701,7 @@
)
)
(func $br_if_in_block (type $2) (result i32)
- (block $outval i32
+ (block $outval (result i32)
(block $in
(br_if $in
(i32.const 1)
@@ -727,7 +727,7 @@
(i32.const 6)
)
)
- (if i32
+ (if (result i32)
(i32.const 6)
(br $outval
(i32.const 7)
@@ -738,8 +738,8 @@
)
(func $threading (type $1)
(drop
- (block $value-out i32
- (block $value-in i32
+ (block $value-out (result i32)
+ (block $value-in (result i32)
(block $out
(block $in
(br_if $out
@@ -773,11 +773,11 @@
(func $if-to-br_if-conflict (type $3) (param $x i32) (param $y i32) (result i32)
(block $leave
(set_local $y
- (block $out i32
+ (block $out (result i32)
(if
(get_local $x)
(br $out
- (block $block i32
+ (block $block (result i32)
(set_local $x
(i32.const 0)
)
@@ -800,14 +800,14 @@
(func $if-to-br_if-conflict2 (type $3) (param $x i32) (param $y i32) (result i32)
(block $leave
(set_local $y
- (block $out i32
+ (block $out (result i32)
(if
(get_local $x)
(br_if $leave
(i32.const 1)
)
(br $out
- (block $block i32
+ (block $block (result i32)
(set_local $x
(i32.const 0)
)
@@ -827,11 +827,11 @@
(func $if-to-br_if-value-sideeffect (type $3) (param $x i32) (param $y i32) (result i32)
(block $leave
(set_local $y
- (block $out i32
+ (block $out (result i32)
(if
(get_local $x)
(br $out
- (block $block i32
+ (block $block (result i32)
(drop
(call $if-to-br_if-value-sideeffect
(i32.const 0)
@@ -938,11 +938,11 @@
)
)
(func $loop-if (type $2) (result i32)
- (block $outer i32
- (loop $typed i32
- (if i32
+ (block $outer (result i32)
+ (loop $typed (result i32)
+ (if (result i32)
(i32.const 2)
- (block $block i32
+ (block $block (result i32)
(drop
(call $loop-if)
)
diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast
index c37a7a56a..a573a385a 100644
--- a/test/passes/remove-unused-brs.wast
+++ b/test/passes/remove-unused-brs.wast
@@ -151,7 +151,7 @@
)
)
(func $b13 (type $2) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(if
(i32.const 1)
(block $block1
@@ -178,13 +178,13 @@
)
)
(func $b14 (type $2) (result i32)
- (block $topmost i32
- (if i32
+ (block $topmost (result i32)
+ (if (result i32)
(i32.const 1)
- (block $block1 i32
+ (block $block1 (result i32)
(i32.const 12)
)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 27)
)
)
@@ -355,7 +355,7 @@
)
)
(if
- (block $block6 i32
+ (block $block6 (result i32)
(block
(drop
(i32.const 2)
@@ -372,7 +372,7 @@
)
)
(if
- (block $a i32
+ (block $a (result i32)
(br $a
(i32.const 0)
)
@@ -440,7 +440,7 @@
(i32.const 1)
)
)
- (block $do-once$0 i32
+ (block $do-once$0 (result i32)
(if
(tee_local $x
(i32.const 1)
@@ -606,7 +606,7 @@
(call $loops)
)
(drop
- (block $out2 i32
+ (block $out2 (result i32)
(br $out2 (i32.const 1))
)
)
@@ -656,7 +656,7 @@
)
)
(func $br_if_in_block (result i32)
- (block $outval i32
+ (block $outval (result i32)
(block $in
(if (i32.const 1) (br $in) (br $in))
(drop (i32.const 2))
@@ -665,13 +665,13 @@
(if (i32.const 5) (br $in) (unreachable))
(drop (i32.const 6))
)
- (if i32 (i32.const 6) (br $outval (i32.const 7)) (i32.const 8))
+ (if (result i32) (i32.const 6) (br $outval (i32.const 7)) (i32.const 8))
)
)
(func $threading
(drop
- (block $value-out i32
- (block $value-in i32
+ (block $value-out (result i32)
+ (block $value-in (result i32)
(block $out
(block $in
(if (i32.const 1)
@@ -705,11 +705,11 @@
(func $if-to-br_if-conflict (param $x i32) (param $y i32) (result i32)
(block $leave
(set_local $y
- (block $out i32
+ (block $out (result i32)
(if
(get_local $x)
(br $out
- (block i32
+ (block (result i32)
(set_local $x (i32.const 0))
(i32.const 1)
)
@@ -725,12 +725,12 @@
(func $if-to-br_if-conflict2 (param $x i32) (param $y i32) (result i32)
(block $leave
(set_local $y
- (block $out i32
+ (block $out (result i32)
(if
(get_local $x)
(br_if $leave (i32.const 1))
(br $out
- (block i32
+ (block (result i32)
(set_local $x (i32.const 0))
(i32.const 1)
)
@@ -745,11 +745,11 @@
(func $if-to-br_if-value-sideeffect (param $x i32) (param $y i32) (result i32)
(block $leave
(set_local $y
- (block $out i32
+ (block $out (result i32)
(if
(get_local $x)
(br $out
- (block i32
+ (block (result i32)
(drop (call $if-to-br_if-value-sideeffect (i32.const 0) (i32.const 1)))
(nop)
(i32.const 1)
@@ -832,8 +832,8 @@
)
)
(func $loop-if (result i32)
- (block $outer i32
- (loop $typed i32
+ (block $outer (result i32)
+ (loop $typed (result i32)
;; we can move the br after us into our if-else, which means we are the final
;; element in the block,
(if
diff --git a/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt b/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt
index 2fe672e68..d2bc2ad9b 100644
--- a/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt
+++ b/test/passes/remove-unused-brs_precompute_vacuum_remove-unused-brs.txt
@@ -4,7 +4,7 @@
(memory $0 0)
(func $1 (type $0) (param $x i32) (result f64)
(local $var$0 f64)
- (block $label$0 f64
+ (block $label$0 (result f64)
(set_local $var$0
(f64.const 0)
)
diff --git a/test/passes/remove-unused-brs_shrink-level=1.txt b/test/passes/remove-unused-brs_shrink-level=1.txt
index 1f837ab0c..09e727ea5 100644
--- a/test/passes/remove-unused-brs_shrink-level=1.txt
+++ b/test/passes/remove-unused-brs_shrink-level=1.txt
@@ -6,17 +6,17 @@
(func $b14 (type $2) (result i32)
(drop
(select
- (block $block1 i32
+ (block $block1 (result i32)
(i32.const 12)
)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 27)
)
(i32.const 1)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.load
(i32.const 10)
@@ -25,7 +25,7 @@
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.rem_s
(i32.const 11)
@@ -35,7 +35,7 @@
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.trunc_u/f64
(f64.const 12.34)
diff --git a/test/passes/remove-unused-brs_shrink-level=1.wast b/test/passes/remove-unused-brs_shrink-level=1.wast
index c0ec7d4cd..000658b91 100644
--- a/test/passes/remove-unused-brs_shrink-level=1.wast
+++ b/test/passes/remove-unused-brs_shrink-level=1.wast
@@ -5,32 +5,32 @@
(type $2 (func (result i32)))
(func $b14 (type $2)
(drop
- (if i32 ;; with shrinking, this can become a select
+ (if (result i32) ;; with shrinking, this can become a select
(i32.const 1)
- (block $block1 i32
+ (block $block1 (result i32)
(i32.const 12)
)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 27)
)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.load (i32.const 10)) ;; load may have side effects, unless ignored
(i32.const 27)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.rem_s (i32.const 11) (i32.const 12)) ;; rem may have side effects, unless ignored
(i32.const 27)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.trunc_u/f64 (f64.const 12.34)) ;; float to int may have side effects, unless ignored
(i32.const 27)
diff --git a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt
index 51c096755..06734897a 100644
--- a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt
+++ b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.txt
@@ -6,10 +6,10 @@
(func $b14 (type $2) (result i32)
(drop
(select
- (block $block1 i32
+ (block $block1 (result i32)
(i32.const 12)
)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 27)
)
(i32.const 1)
diff --git a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast
index c0ec7d4cd..000658b91 100644
--- a/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast
+++ b/test/passes/remove-unused-brs_shrink-level=1_ignore-implicit-traps.wast
@@ -5,32 +5,32 @@
(type $2 (func (result i32)))
(func $b14 (type $2)
(drop
- (if i32 ;; with shrinking, this can become a select
+ (if (result i32) ;; with shrinking, this can become a select
(i32.const 1)
- (block $block1 i32
+ (block $block1 (result i32)
(i32.const 12)
)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 27)
)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.load (i32.const 10)) ;; load may have side effects, unless ignored
(i32.const 27)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.rem_s (i32.const 11) (i32.const 12)) ;; rem may have side effects, unless ignored
(i32.const 27)
)
)
(drop
- (if i32
+ (if (result i32)
(i32.const 1)
(i32.trunc_u/f64 (f64.const 12.34)) ;; float to int may have side effects, unless ignored
(i32.const 27)
diff --git a/test/passes/remove-unused-names.wast b/test/passes/remove-unused-names.wast
index 675e52df1..0f8fe4dcc 100644
--- a/test/passes/remove-unused-names.wast
+++ b/test/passes/remove-unused-names.wast
@@ -3,7 +3,7 @@
(type $0 (func (param i32) (result i32)))
(type $1 (func))
(func $b0 (type $0) (param $i1 i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(i32.const 0)
)
)
diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt
index 3c4d7a0a0..ed448607d 100644
--- a/test/passes/remove-unused-names_merge-blocks.txt
+++ b/test/passes/remove-unused-names_merge-blocks.txt
@@ -127,7 +127,7 @@
(local $x i32)
(drop
(i32.eqz
- (block i32
+ (block (result i32)
(i32.const 10)
)
)
@@ -175,7 +175,7 @@
(func $binary (type $3)
(drop
(i32.add
- (block i32
+ (block (result i32)
(i32.const 10)
)
(i32.const 20)
@@ -205,7 +205,7 @@
(drop
(i32.add
(i32.const 10)
- (block i32
+ (block (result i32)
(i32.const 20)
)
)
@@ -233,10 +233,10 @@
)
(drop
(i32.add
- (block i32
+ (block (result i32)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(i32.const 20)
)
)
@@ -288,7 +288,7 @@
(drop
(i32.add
(unreachable)
- (block i32
+ (block (result i32)
(drop
(i32.const 10)
)
@@ -332,7 +332,7 @@
)
(drop
(select
- (block i32
+ (block (result i32)
(i32.const 10)
)
(i32.const 30)
@@ -348,7 +348,7 @@
(drop
(select
(i32.const 20)
- (block i32
+ (block (result i32)
(i32.const 30)
)
(i32.const 50)
@@ -364,7 +364,7 @@
(select
(i32.const 20)
(i32.const 40)
- (block i32
+ (block (result i32)
(i32.const 50)
)
)
@@ -374,10 +374,10 @@
)
(drop
(select
- (block i32
+ (block (result i32)
(i32.const 10)
)
- (block i32
+ (block (result i32)
(i32.const 20)
)
(i32.const 40)
@@ -388,11 +388,11 @@
)
(drop
(select
- (block i32
+ (block (result i32)
(i32.const 10)
)
(i32.const 30)
- (block i32
+ (block (result i32)
(i32.const 40)
)
)
@@ -403,10 +403,10 @@
(drop
(select
(i32.const 20)
- (block i32
+ (block (result i32)
(i32.const 30)
)
- (block i32
+ (block (result i32)
(i32.const 40)
)
)
@@ -431,13 +431,13 @@
(drop
(select
(unreachable)
- (block i32
+ (block (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 50)
)
@@ -469,7 +469,7 @@
(select
(i32.const 20)
(unreachable)
- (block i32
+ (block (result i32)
(drop
(i32.const 50)
)
@@ -542,7 +542,7 @@
(i32.const 20)
)
(drop
- (block $out2 i32
+ (block $out2 (result i32)
(drop
(i32.const 10)
)
@@ -560,7 +560,7 @@
)
(func $calls (type $3)
(call $call-i
- (block i32
+ (block (result i32)
(i32.const 10)
)
)
@@ -602,7 +602,7 @@
)
(call $call-ii
(unreachable)
- (block i32
+ (block (result i32)
(drop
(i32.const 20)
)
@@ -671,7 +671,7 @@
)
(call_indirect $ii
(unreachable)
- (block i32
+ (block (result i32)
(drop
(i32.const 30)
)
@@ -684,7 +684,7 @@
(local $0 f64)
(local $1 f64)
(if
- (block i32
+ (block (result i32)
(nop)
(f64.gt
(get_local $0)
@@ -718,7 +718,7 @@
(set_local $x
(i32.le_u
(get_local $y)
- (block i32
+ (block (result i32)
(set_local $y
(i32.const 5)
)
diff --git a/test/passes/remove-unused-names_merge-blocks.wast b/test/passes/remove-unused-names_merge-blocks.wast
index adb27e6f0..5cefa357e 100644
--- a/test/passes/remove-unused-names_merge-blocks.wast
+++ b/test/passes/remove-unused-names_merge-blocks.wast
@@ -156,14 +156,14 @@
(local $x i32)
(drop
(i32.eqz
- (block $block0 i32
+ (block $block0 (result i32)
(i32.const 10)
)
)
)
(drop
(i32.eqz
- (block $block1 i32
+ (block $block1 (result i32)
(drop
(i32.const 10)
)
@@ -173,7 +173,7 @@
)
(drop
(i32.eqz
- (block $block2 i32
+ (block $block2 (result i32)
(drop
(i32.const 10)
)
@@ -185,7 +185,7 @@
)
)
(set_local $x
- (block $block3 i32
+ (block $block3 (result i32)
(drop
(i32.const 10)
)
@@ -194,7 +194,7 @@
)
(drop
(i32.load
- (block $block4 i32
+ (block $block4 (result i32)
(drop
(i32.const 10)
)
@@ -214,7 +214,7 @@
(func $binary (type $3)
(drop
(i32.add
- (block $block0 i32
+ (block $block0 (result i32)
(i32.const 10)
)
(i32.const 20)
@@ -222,7 +222,7 @@
)
(drop
(i32.add
- (block $block1 i32
+ (block $block1 (result i32)
(drop
(i32.const 10)
)
@@ -233,7 +233,7 @@
)
(drop
(i32.add
- (block $block2 i32
+ (block $block2 (result i32)
(drop
(i32.const 10)
)
@@ -248,7 +248,7 @@
(drop
(i32.add
(i32.const 10)
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 20)
)
)
@@ -256,7 +256,7 @@
(drop
(i32.add
(i32.const 10)
- (block $block4 i32
+ (block $block4 (result i32)
(drop
(i32.const 20)
)
@@ -267,7 +267,7 @@
(drop
(i32.add
(i32.const 10)
- (block $block5 i32
+ (block $block5 (result i32)
(drop
(i32.const 20)
)
@@ -280,23 +280,23 @@
)
(drop
(i32.add
- (block $block6 i32
+ (block $block6 (result i32)
(i32.const 10)
)
- (block $block7 i32
+ (block $block7 (result i32)
(i32.const 20)
)
)
)
(drop
(i32.add
- (block $block8 i32
+ (block $block8 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block9 i32
+ (block $block9 (result i32)
(drop
(i32.const 30)
)
@@ -306,7 +306,7 @@
)
(drop
(i32.add
- (block $block10 i32
+ (block $block10 (result i32)
(drop
(i32.const 10)
)
@@ -315,7 +315,7 @@
)
(i32.const 30)
)
- (block $block11 i32
+ (block $block11 (result i32)
(drop
(i32.const 40)
)
@@ -328,7 +328,7 @@
)
(i32.store
(i32.const 10)
- (block $block12 i32
+ (block $block12 (result i32)
(drop
(i32.const 20)
)
@@ -336,7 +336,7 @@
)
)
(i32.store
- (block $block13 i32
+ (block $block13 (result i32)
(drop
(i32.const 10)
)
@@ -347,7 +347,7 @@
(drop
(i32.add
(unreachable)
- (block $block14 i32
+ (block $block14 (result i32)
(drop
(i32.const 10)
)
@@ -357,11 +357,11 @@
)
(drop
(i32.add
- (block $block15 i32
+ (block $block15 (result i32)
(unreachable)
(i32.const 10)
)
- (block $block16 i32
+ (block $block16 (result i32)
(drop
(i32.const 20)
)
@@ -373,19 +373,19 @@
(func $trinary (type $3)
(drop
(select
- (block $block0 i32
+ (block $block0 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block1 i32
+ (block $block1 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block2 i32
+ (block $block2 (result i32)
(drop
(i32.const 50)
)
@@ -395,16 +395,16 @@
)
(drop
(select
- (block $block3 i32
+ (block $block3 (result i32)
(i32.const 10)
)
- (block $block4 i32
+ (block $block4 (result i32)
(drop
(i32.const 20)
)
(i32.const 30)
)
- (block $block5 i32
+ (block $block5 (result i32)
(drop
(i32.const 40)
)
@@ -414,16 +414,16 @@
)
(drop
(select
- (block $block6 i32
+ (block $block6 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block7 i32
+ (block $block7 (result i32)
(i32.const 30)
)
- (block $block8 i32
+ (block $block8 (result i32)
(drop
(i32.const 40)
)
@@ -433,32 +433,32 @@
)
(drop
(select
- (block $block9 i32
+ (block $block9 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block10 i32
+ (block $block10 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block11 i32
+ (block $block11 (result i32)
(i32.const 50)
)
)
)
(drop
(select
- (block $block12 i32
+ (block $block12 (result i32)
(i32.const 10)
)
- (block $block13 i32
+ (block $block13 (result i32)
(i32.const 20)
)
- (block $block14 i32
+ (block $block14 (result i32)
(drop
(i32.const 30)
)
@@ -468,49 +468,49 @@
)
(drop
(select
- (block $block15 i32
+ (block $block15 (result i32)
(i32.const 10)
)
- (block $block16 i32
+ (block $block16 (result i32)
(drop
(i32.const 20)
)
(i32.const 30)
)
- (block $block17 i32
+ (block $block17 (result i32)
(i32.const 40)
)
)
)
(drop
(select
- (block $block18 i32
+ (block $block18 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block19 i32
+ (block $block19 (result i32)
(i32.const 30)
)
- (block $block20 i32
+ (block $block20 (result i32)
(i32.const 40)
)
)
)
(drop
(select
- (block $block21 i32
+ (block $block21 (result i32)
(unreachable)
(i32.const 20)
)
- (block $block22 i32
+ (block $block22 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block23 i32
+ (block $block23 (result i32)
(drop
(i32.const 50)
)
@@ -520,19 +520,19 @@
)
(drop
(select
- (block $block24 i32
+ (block $block24 (result i32)
(drop
(i32.const 10)
)
(unreachable)
)
- (block $block25 i32
+ (block $block25 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block26 i32
+ (block $block26 (result i32)
(drop
(i32.const 50)
)
@@ -542,17 +542,17 @@
)
(drop
(select
- (block $block27 i32
+ (block $block27 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block28 i32
+ (block $block28 (result i32)
(unreachable)
(i32.const 40)
)
- (block $block29 i32
+ (block $block29 (result i32)
(drop
(i32.const 50)
)
@@ -562,19 +562,19 @@
)
(drop
(select
- (block $block30 i32
+ (block $block30 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block31 i32
+ (block $block31 (result i32)
(drop
(i32.const 30)
)
(unreachable)
)
- (block $block32 i32
+ (block $block32 (result i32)
(drop
(i32.const 50)
)
@@ -584,19 +584,19 @@
)
(drop
(select
- (block $block33 i32
+ (block $block33 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block34 i32
+ (block $block34 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block35 i32
+ (block $block35 (result i32)
(unreachable)
(i32.const 60)
)
@@ -604,19 +604,19 @@
)
(drop
(select
- (block $block36 i32
+ (block $block36 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block37 i32
+ (block $block37 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block38 i32
+ (block $block38 (result i32)
(drop
(i32.const 50)
)
@@ -629,7 +629,7 @@
(block $out
(block
(drop
- (block $block0 i32
+ (block $block0 (result i32)
(drop
(i32.const 10)
)
@@ -639,7 +639,7 @@
(br $out)
)
(br_if $out
- (block $block1 i32
+ (block $block1 (result i32)
(drop
(i32.const 10)
)
@@ -648,7 +648,7 @@
)
(block
(drop
- (block $block2 i32
+ (block $block2 (result i32)
(drop
(i32.const 10)
)
@@ -656,7 +656,7 @@
)
)
(br_if $out
- (block $block3 i32
+ (block $block3 (result i32)
(drop
(i32.const 30)
)
@@ -665,7 +665,7 @@
)
)
(br_table $out $out
- (block $block4 i32
+ (block $block4 (result i32)
(drop
(i32.const 10)
)
@@ -673,15 +673,15 @@
)
)
(drop
- (block $out2 i32
+ (block $out2 (result i32)
(br_table $out2 $out2
- (block $block5 i32
+ (block $block5 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block6 i32
+ (block $block6 (result i32)
(drop
(i32.const 30)
)
@@ -695,12 +695,12 @@
)
(func $calls (type $3)
(call $call-i
- (block $block0 i32
+ (block $block0 (result i32)
(i32.const 10)
)
)
(call $call-i
- (block $block1 i32
+ (block $block1 (result i32)
(drop
(i32.const 10)
)
@@ -708,7 +708,7 @@
)
)
(call $call-i
- (block $block2 i32
+ (block $block2 (result i32)
(drop
(i32.const 10)
)
@@ -719,13 +719,13 @@
)
)
(call $call-ii
- (block $block3 i32
+ (block $block3 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block4 i32
+ (block $block4 (result i32)
(drop
(i32.const 30)
)
@@ -733,11 +733,11 @@
)
)
(call $call-ii
- (block $block5 i32
+ (block $block5 (result i32)
(unreachable)
(i32.const 10)
)
- (block $block6 i32
+ (block $block6 (result i32)
(drop
(i32.const 20)
)
@@ -745,13 +745,13 @@
)
)
(call $call-ii
- (block $block7 i32
+ (block $block7 (result i32)
(drop
(i32.const 10)
)
(unreachable)
)
- (block $block8 i32
+ (block $block8 (result i32)
(drop
(i32.const 20)
)
@@ -759,25 +759,25 @@
)
)
(call $call-ii
- (block $block9 i32
+ (block $block9 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block10 i32
+ (block $block10 (result i32)
(unreachable)
(i32.const 30)
)
)
(call $call-ii
- (block $block11 i32
+ (block $block11 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block12 i32
+ (block $block12 (result i32)
(drop
(i32.const 30)
)
@@ -785,19 +785,19 @@
)
)
(call $call-iii
- (block $block13 i32
+ (block $block13 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block14 i32
+ (block $block14 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block15 i32
+ (block $block15 (result i32)
(drop
(i32.const 50)
)
@@ -805,14 +805,14 @@
)
)
(call $call-iii
- (block $block16 i32
+ (block $block16 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
(i32.const 30)
- (block $block17 i32
+ (block $block17 (result i32)
(drop
(i32.const 40)
)
@@ -820,19 +820,19 @@
)
)
(call_indirect $ii
- (block $block18 i32
+ (block $block18 (result i32)
(drop
(i32.const 10)
)
(i32.const 20)
)
- (block $block19 i32
+ (block $block19 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block20 i32
+ (block $block20 (result i32)
(drop
(i32.const 50)
)
@@ -841,13 +841,13 @@
)
(call_indirect $ii
(unreachable)
- (block $block21 i32
+ (block $block21 (result i32)
(drop
(i32.const 30)
)
(i32.const 40)
)
- (block $block22 i32
+ (block $block22 (result i32)
(drop
(i32.const 50)
)
@@ -861,7 +861,7 @@
(if
(f64.gt
(get_local $0)
- (block $block0 f64
+ (block $block0 (result f64)
(nop)
(get_local $1)
)
@@ -876,7 +876,7 @@
(set_local $x
(i32.le_u
(get_local $x)
- (block i32
+ (block (result i32)
(set_local $y (i32.const 5))
(i32.const 10)
)
@@ -892,7 +892,7 @@
(set_local $x
(i32.le_u
(get_local $y)
- (block i32
+ (block (result i32)
(set_local $y (i32.const 5))
(i32.const 10)
)
@@ -905,7 +905,7 @@
(drop
(f64.abs
(return
- (block i32 ;; when we flip the block out, it should have an ok type for the (dead) f64 op
+ (block (result i32) ;; when we flip the block out, it should have an ok type for the (dead) f64 op
(drop (i32.const 2))
(i32.const 1)
)
@@ -917,9 +917,9 @@
(func $drop-unreachable (result i32)
(local $0 i32)
- (block $label$1 i32
+ (block $label$1 (result i32)
(drop
- (block i32
+ (block (result i32)
(unreachable)
)
)
diff --git a/test/passes/remove-unused-names_vacuum.txt b/test/passes/remove-unused-names_vacuum.txt
index 7c1f902c0..999d8915e 100644
--- a/test/passes/remove-unused-names_vacuum.txt
+++ b/test/passes/remove-unused-names_vacuum.txt
@@ -12,7 +12,7 @@
)
(func $to-drop-unreachable (type $1)
(drop
- (block i32
+ (block (result i32)
(unreachable)
)
)
diff --git a/test/passes/remove-unused-names_vacuum.wast b/test/passes/remove-unused-names_vacuum.wast
index cb5affac3..f45f50274 100644
--- a/test/passes/remove-unused-names_vacuum.wast
+++ b/test/passes/remove-unused-names_vacuum.wast
@@ -18,7 +18,7 @@
)
(func $to-drop-unreachable
(drop
- (block i32
+ (block (result i32)
(unreachable)
)
)
diff --git a/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt b/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt
index 4ea6fe2c3..9a49f3891 100644
--- a/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt
+++ b/test/passes/rereloop_dce_remove-unused-brs_remove-unused-names_coalesce-locals_simplify-locals_reorder-locals_remove-unused-brs_merge-blocks_vacuum.txt
@@ -18,14 +18,14 @@
(i32.const 1)
)
(func $ifs (type $2) (param $0 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $0)
- (if i32
+ (if (result i32)
(get_local $0)
(i32.const 2)
(i32.const 3)
)
- (if i32
+ (if (result i32)
(get_local $0)
(i32.const 4)
(i32.const 5)
diff --git a/test/passes/simplify-locals-nostructure.txt b/test/passes/simplify-locals-nostructure.txt
index 9f0d31d16..2502c4549 100644
--- a/test/passes/simplify-locals-nostructure.txt
+++ b/test/passes/simplify-locals-nostructure.txt
@@ -20,7 +20,7 @@
)
(nop)
(drop
- (if i32
+ (if (result i32)
(i32.const 2)
(i32.const 3)
(i32.const 4)
@@ -28,7 +28,7 @@
)
(nop)
(drop
- (block $block i32
+ (block $block (result i32)
(i32.const 5)
)
)
diff --git a/test/passes/simplify-locals-nostructure.wast b/test/passes/simplify-locals-nostructure.wast
index e7b827f55..33f891e61 100644
--- a/test/passes/simplify-locals-nostructure.wast
+++ b/test/passes/simplify-locals-nostructure.wast
@@ -8,9 +8,9 @@
(set_local $x (i32.const 1))
(if (get_local $x) (nop))
(if (get_local $x) (nop))
- (set_local $y (if i32 (i32.const 2) (i32.const 3) (i32.const 4)))
+ (set_local $y (if (result i32) (i32.const 2) (i32.const 3) (i32.const 4)))
(drop (get_local $y))
- (set_local $z (block i32 (i32.const 5)))
+ (set_local $z (block (result i32) (i32.const 5)))
(drop (get_local $z))
(if (i32.const 6)
(set_local $a (i32.const 7))
diff --git a/test/passes/simplify-locals-notee-nostructure.txt b/test/passes/simplify-locals-notee-nostructure.txt
index 9b708e715..027566e43 100644
--- a/test/passes/simplify-locals-notee-nostructure.txt
+++ b/test/passes/simplify-locals-notee-nostructure.txt
@@ -20,7 +20,7 @@
)
(nop)
(drop
- (if i32
+ (if (result i32)
(i32.const 2)
(i32.const 3)
(i32.const 4)
@@ -28,7 +28,7 @@
)
(nop)
(drop
- (block $block i32
+ (block $block (result i32)
(i32.const 5)
)
)
diff --git a/test/passes/simplify-locals-notee-nostructure.wast b/test/passes/simplify-locals-notee-nostructure.wast
index e7b827f55..33f891e61 100644
--- a/test/passes/simplify-locals-notee-nostructure.wast
+++ b/test/passes/simplify-locals-notee-nostructure.wast
@@ -8,9 +8,9 @@
(set_local $x (i32.const 1))
(if (get_local $x) (nop))
(if (get_local $x) (nop))
- (set_local $y (if i32 (i32.const 2) (i32.const 3) (i32.const 4)))
+ (set_local $y (if (result i32) (i32.const 2) (i32.const 3) (i32.const 4)))
(drop (get_local $y))
- (set_local $z (block i32 (i32.const 5)))
+ (set_local $z (block (result i32) (i32.const 5)))
(drop (get_local $z))
(if (i32.const 6)
(set_local $a (i32.const 7))
diff --git a/test/passes/simplify-locals-notee.txt b/test/passes/simplify-locals-notee.txt
index 36978eacf..7677bfc6d 100644
--- a/test/passes/simplify-locals-notee.txt
+++ b/test/passes/simplify-locals-notee.txt
@@ -20,7 +20,7 @@
)
(nop)
(drop
- (if i32
+ (if (result i32)
(i32.const 2)
(i32.const 3)
(i32.const 4)
@@ -28,19 +28,19 @@
)
(nop)
(drop
- (block $block i32
+ (block $block (result i32)
(i32.const 5)
)
)
(nop)
(drop
- (if i32
+ (if (result i32)
(i32.const 6)
- (block i32
+ (block (result i32)
(nop)
(i32.const 7)
)
- (block i32
+ (block (result i32)
(nop)
(i32.const 8)
)
@@ -48,7 +48,7 @@
)
(nop)
(drop
- (block $val i32
+ (block $val (result i32)
(if
(i32.const 10)
(block $block4
diff --git a/test/passes/simplify-locals-notee.wast b/test/passes/simplify-locals-notee.wast
index e7b827f55..33f891e61 100644
--- a/test/passes/simplify-locals-notee.wast
+++ b/test/passes/simplify-locals-notee.wast
@@ -8,9 +8,9 @@
(set_local $x (i32.const 1))
(if (get_local $x) (nop))
(if (get_local $x) (nop))
- (set_local $y (if i32 (i32.const 2) (i32.const 3) (i32.const 4)))
+ (set_local $y (if (result i32) (i32.const 2) (i32.const 3) (i32.const 4)))
(drop (get_local $y))
- (set_local $z (block i32 (i32.const 5)))
+ (set_local $z (block (result i32) (i32.const 5)))
(drop (get_local $z))
(if (i32.const 6)
(set_local $a (i32.const 7))
diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt
index b4875dc57..8c12c274a 100644
--- a/test/passes/simplify-locals.txt
+++ b/test/passes/simplify-locals.txt
@@ -34,7 +34,7 @@
)
(nop)
(drop
- (if i32
+ (if (result i32)
(i32.const 2)
(i32.const 3)
(i32.const 4)
@@ -42,19 +42,19 @@
)
(nop)
(drop
- (block $block i32
+ (block $block (result i32)
(i32.const 5)
)
)
(nop)
(drop
- (if i32
+ (if (result i32)
(i32.const 6)
- (block i32
+ (block (result i32)
(nop)
(i32.const 7)
)
- (block i32
+ (block (result i32)
(nop)
(i32.const 8)
)
@@ -62,7 +62,7 @@
)
(nop)
(drop
- (block $val i32
+ (block $val (result i32)
(if
(i32.const 10)
(block $block4
@@ -286,7 +286,7 @@
(call $waka)
(nop)
(set_local $a
- (block $block i32
+ (block $block (result i32)
(block $block5
(nop)
(i32.store
@@ -301,7 +301,7 @@
)
(call $waka)
(set_local $a
- (block $block6 i32
+ (block $block6 (result i32)
(block $block7
(nop)
(i32.store
@@ -320,7 +320,7 @@
)
(call $waka)
(set_local $a
- (block $block8 i32
+ (block $block8 (result i32)
(block $block9
(nop)
(i32.store
@@ -343,7 +343,7 @@
)
(call $waka)
(set_local $a
- (block $block10 i32
+ (block $block10 (result i32)
(block $block11
(nop)
(i32.store
@@ -369,7 +369,7 @@
(nop)
(nop)
(drop
- (block $b i32
+ (block $b (result i32)
(block $c
(br $b
(i32.const 1337)
@@ -385,7 +385,7 @@
(i32.const 1337)
)
(drop
- (loop $loop-in5 i32
+ (loop $loop-in5 (result i32)
(drop
(get_local $a)
)
@@ -488,7 +488,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -506,7 +506,7 @@
(tee_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -517,7 +517,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -546,7 +546,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -564,7 +564,7 @@
(tee_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -575,7 +575,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -626,7 +626,7 @@
(get_local $__stackBase__)
)
(return
- (block $block12 i32
+ (block $block12 (result i32)
(i32.store
(i32.const 168)
(get_local $$10$1)
@@ -638,12 +638,12 @@
(func $block-returns (type $FUNCSIG$v)
(local $x i32)
(set_local $x
- (block $out i32
+ (block $out (result i32)
(nop)
(drop
(br_if $out
(tee_local $x
- (block $waka i32
+ (block $waka (result i32)
(nop)
(drop
(br_if $waka
@@ -665,13 +665,13 @@
)
(block $waka2
(set_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
- (block i32
+ (block (result i32)
(nop)
(i32.const 13)
)
- (block i32
+ (block (result i32)
(nop)
(i32.const 24)
)
@@ -682,13 +682,13 @@
(drop
(br_if $out
(tee_local $x
- (if i32
+ (if (result i32)
(i32.const 1)
- (block $block3 i32
+ (block $block3 (result i32)
(nop)
(i32.const 14)
)
- (block $block5 i32
+ (block $block5 (result i32)
(nop)
(i32.const 25)
)
@@ -754,7 +754,7 @@
(func $no-out-of-label (type $8) (param $x i32) (param $y i32)
(loop $moar
(set_local $x
- (block $block i32
+ (block $block (result i32)
(br_if $moar
(get_local $x)
)
@@ -767,7 +767,7 @@
)
(block $moar18
(set_local $y
- (block $block19 i32
+ (block $block19 (result i32)
(br_if $moar18
(get_local $y)
)
@@ -783,7 +783,7 @@
(local $e i32)
(loop $while-in$1
(set_local $a
- (block $while-out$0 i32
+ (block $while-out$0 (result i32)
(set_local $e
(get_local $a)
)
@@ -809,16 +809,16 @@
(func $drop-if-value (type $9) (param $x i32) (param $y i32) (param $z i32) (result i32)
(local $temp i32)
(drop
- (if i32
+ (if (result i32)
(get_local $x)
- (block $block53 i32
+ (block $block53 (result i32)
(nop)
(set_local $temp
(get_local $y)
)
(get_local $z)
)
- (block $block54 i32
+ (block $block54 (result i32)
(nop)
(set_local $temp
(get_local $y)
@@ -837,7 +837,7 @@
(func $drop-br_if (type $9) (param $label i32) (param $$cond2 i32) (param $$$0151 i32) (result i32)
(nop)
(tee_local $label
- (block $label$break$L4 i32
+ (block $label$break$L4 (result i32)
(if
(i32.eq
(get_local $label)
diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast
index a8fc75f06..359620a18 100644
--- a/test/passes/simplify-locals.wast
+++ b/test/passes/simplify-locals.wast
@@ -21,9 +21,9 @@
(set_local $x (i32.const 1))
(if (get_local $x) (nop))
(if (get_local $x) (nop))
- (set_local $y (if i32 (i32.const 2) (i32.const 3) (i32.const 4)))
+ (set_local $y (if (result i32) (i32.const 2) (i32.const 3) (i32.const 4)))
(drop (get_local $y))
- (set_local $z (block i32 (i32.const 5)))
+ (set_local $z (block (result i32) (i32.const 5)))
(drop (get_local $z))
(if (i32.const 6)
(set_local $a (i32.const 7))
@@ -293,7 +293,7 @@
)
(call $waka)
(set_local $a
- (block i32
+ (block (result i32)
(block
(set_local $5
(i32.const 105)
@@ -311,7 +311,7 @@
)
(call $waka)
(set_local $a
- (block i32
+ (block (result i32)
(block
(set_local $6
(i32.const 107)
@@ -330,7 +330,7 @@
)
(call $waka)
(set_local $a
- (block i32
+ (block (result i32)
(block
(set_local $7
(i32.const 109)
@@ -353,7 +353,7 @@
)
(call $waka)
(set_local $a
- (block i32
+ (block (result i32)
(block
(set_local $8
(i32.const 111)
@@ -396,7 +396,7 @@
(i32.const 1337)
)
(drop
- (loop $loop-in5 i32
+ (loop $loop-in5 (result i32)
(drop
(get_local $a)
)
@@ -495,7 +495,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -510,7 +510,7 @@
(set_local $$1$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -521,7 +521,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$a$1)
(i32.const 0)
@@ -540,7 +540,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -555,7 +555,7 @@
(set_local $$2$1
(i32.or
(i32.shr_s
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -566,7 +566,7 @@
(i32.const 31)
)
(i32.shl
- (if i32
+ (if (result i32)
(i32.lt_s
(get_local $$b$1)
(i32.const 0)
@@ -647,7 +647,7 @@
(get_local $__stackBase__)
)
(return
- (block $block12 i32
+ (block $block12 (result i32)
(i32.store
(i32.const 168)
(get_local $$10$1)
@@ -764,7 +764,7 @@
(func $no-out-of-label (param $x i32) (param $y i32)
(loop $moar
(set_local $x
- (block i32
+ (block (result i32)
(br_if $moar (get_local $x))
(i32.const 0)
)
@@ -773,7 +773,7 @@
(drop (get_local $x))
(block $moar
(set_local $y
- (block i32
+ (block (result i32)
(br_if $moar (get_local $y))
(i32.const 0)
)
@@ -807,16 +807,16 @@
(func $drop-if-value (param $x i32) (param $y i32) (param $z i32) (result i32)
(local $temp i32)
(drop
- (if i32
+ (if (result i32)
(get_local $x)
- (block $block53 i32
+ (block $block53 (result i32)
(nop)
(set_local $temp
(get_local $y)
)
(get_local $z)
)
- (block $block54 i32
+ (block $block54 (result i32)
(nop)
(set_local $temp
(get_local $y)
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt
index f5894c693..d1a388333 100644
--- a/test/passes/vacuum.txt
+++ b/test/passes/vacuum.txt
@@ -51,7 +51,7 @@
)
(func $Gu (type $4) (param $b i32) (param $e f64) (param $l i32) (param $d i32)
(if
- (if i32
+ (if (result i32)
(get_local $d)
(f64.ne
(f64.promote/f32
@@ -123,7 +123,7 @@
)
(func $if2drops (type $3) (result i32)
(drop
- (if i32
+ (if (result i32)
(call $if2drops)
(call $if2drops)
(call $if2drops)
@@ -157,7 +157,7 @@
(func $drop-if-both-unreachable (type $1) (param $0 i32)
(block $out
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(br $out)
(br $out)
@@ -165,7 +165,7 @@
)
)
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(unreachable)
(unreachable)
diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast
index 01c928e4d..c1a84d646 100644
--- a/test/passes/vacuum.wast
+++ b/test/passes/vacuum.wast
@@ -87,12 +87,12 @@
)
)
(set_local $x
- (block $result-used i32
+ (block $result-used (result i32)
(get_local $x)
)
)
(set_local $x
- (block $two-and-result-used i32
+ (block $two-and-result-used (result i32)
(drop
(get_local $x)
)
@@ -109,7 +109,7 @@
(nop)
)
(drop
- (loop $loop-in5 i32
+ (loop $loop-in5 (result i32)
(drop
(get_local $0)
)
@@ -276,9 +276,9 @@
)
(func $Gu (type $4) (param $b i32) (param $e f64) (param $l i32) (param $d i32)
(if
- (if i32
+ (if (result i32)
(get_local $d)
- (block $block1 i32
+ (block $block1 (result i32)
(nop)
(f64.ne
(f64.promote/f32
@@ -302,14 +302,14 @@
(func $if-drop (result i32)
(block $out
(drop
- (if i32
+ (if (result i32)
(call $if-drop)
(call $int)
(br $out)
)
)
(drop
- (if i32
+ (if (result i32)
(call $if-drop)
(br $out)
(call $int)
@@ -360,7 +360,7 @@
)
(func $drop-get-global
(drop
- (block i32
+ (block (result i32)
(call $drop-get-global)
(get_global $Int) ;; this is not needed due to the block being drop'd, but make sure the call is not then dropped either
)
@@ -371,7 +371,7 @@
(local $$11 i32)
(loop $while-in$1
(drop
- (block $jumpthreading$outer$8 i32
+ (block $jumpthreading$outer$8 (result i32)
(block $jumpthreading$inner$8
(br $jumpthreading$outer$8 ;; the rest is dead in the outer block, but be careful to leave the return value!
(i32.const 0)
@@ -389,7 +389,7 @@
(func $relooperJumpThreading2
(loop $while-in$1
(drop
- (block $jumpthreading$outer$8 i32
+ (block $jumpthreading$outer$8 (result i32)
(block $jumpthreading$inner$8
(br $jumpthreading$outer$8
(i32.const 0)
@@ -403,7 +403,7 @@
(func $relooperJumpThreading3
(loop $while-in$1
(drop
- (block $jumpthreading$outer$8 i32
+ (block $jumpthreading$outer$8 (result i32)
(br $jumpthreading$outer$8 ;; code after this is dead, can kill it, but preserve the return value at the end!
(i32.const 0)
)
@@ -448,7 +448,7 @@
(func $drop-if-both-unreachable (param $0 i32)
(block $out
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(br $out)
(br $out)
@@ -456,7 +456,7 @@
)
)
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(unreachable)
(unreachable)
diff --git a/test/passes/vacuum_remove-unused-names_merge-blocks.wast b/test/passes/vacuum_remove-unused-names_merge-blocks.wast
index 79ffa1d9f..3bd4f48f2 100644
--- a/test/passes/vacuum_remove-unused-names_merge-blocks.wast
+++ b/test/passes/vacuum_remove-unused-names_merge-blocks.wast
@@ -6,7 +6,7 @@
;; in that position
(func $return-block (param $x i32) (result i32)
(return
- (block i32
+ (block (result i32)
(set_local $x (get_local $x))
(get_local $x)
)
diff --git a/test/stacky.wasm.fromBinary b/test/stacky.wasm.fromBinary
index 89de2948b..375e216a2 100644
--- a/test/stacky.wasm.fromBinary
+++ b/test/stacky.wasm.fromBinary
@@ -5,7 +5,7 @@
(func $0 (type $0) (param $var$0 i32) (param $var$1 i32) (result i32)
(local $2 i32)
(i32.add
- (block i32
+ (block (result i32)
(set_local $2
(get_local $var$0)
)
diff --git a/test/two_sides.fromasm b/test/two_sides.fromasm
index 686b6cde4..f79a0dd07 100644
--- a/test/two_sides.fromasm
+++ b/test/two_sides.fromasm
@@ -9,7 +9,7 @@
(export "_test" (func $_test))
(func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 f64)
- (if i32
+ (if (result i32)
(get_local $4)
(call $f64-to-int
(f64.mul
diff --git a/test/two_sides.fromasm.clamp b/test/two_sides.fromasm.clamp
index 43239d418..8329325d1 100644
--- a/test/two_sides.fromasm.clamp
+++ b/test/two_sides.fromasm.clamp
@@ -6,19 +6,19 @@
(data (get_global $memoryBase) "two_sides.asm.js")
(export "_test" (func $_test))
(func $f64-to-int (param $0 f64) (result i32)
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(get_local $0)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.ge
(get_local $0)
(f64.const 2147483648)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.le
(get_local $0)
(f64.const -2147483649)
@@ -33,7 +33,7 @@
)
(func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 f64)
- (if i32
+ (if (result i32)
(get_local $4)
(call $f64-to-int
(f64.mul
diff --git a/test/two_sides.fromasm.clamp.no-opts b/test/two_sides.fromasm.clamp.no-opts
index bc237e479..8ce7ab86c 100644
--- a/test/two_sides.fromasm.clamp.no-opts
+++ b/test/two_sides.fromasm.clamp.no-opts
@@ -5,19 +5,19 @@
(import "env" "tableBase" (global $tableBase i32))
(export "_test" (func $_test))
(func $f64-to-int (param $0 f64) (result i32)
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(get_local $0)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.ge
(get_local $0)
(f64.const 2147483648)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.le
(get_local $0)
(f64.const -2147483649)
diff --git a/test/two_sides.fromasm.imprecise b/test/two_sides.fromasm.imprecise
index efd7112b2..9b486c29c 100644
--- a/test/two_sides.fromasm.imprecise
+++ b/test/two_sides.fromasm.imprecise
@@ -6,7 +6,7 @@
(export "_test" (func $_test))
(func $_test (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 f64)
- (if i32
+ (if (result i32)
(get_local $4)
(i32.trunc_s/f64
(f64.mul
diff --git a/test/unit.fromasm b/test/unit.fromasm
index 14654ff7a..e5ff23645 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -246,7 +246,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -424,7 +424,7 @@
(i32.const 3)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 4)
@@ -445,7 +445,7 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 8)
@@ -513,7 +513,7 @@
)
)
(func $phi (result i32)
- (block $do-once i32
+ (block $do-once (result i32)
(drop
(br_if $do-once
(i32.const 0)
@@ -611,7 +611,7 @@
)
(func $conditionalTypeFun
(drop
- (if i32
+ (if (result i32)
(call $return_int)
(i32.trunc_s/f64
(call $abort
@@ -624,7 +624,7 @@
)
)
(drop
- (if f64
+ (if (result f64)
(call $return_int)
(call $abort
(f64.convert_s/i32
@@ -1095,7 +1095,7 @@
)
(func $dropIgnoredImportsInIf (param $0 i32) (param $1 i32) (param $2 i32)
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(call $lb
(get_local $1)
diff --git a/test/unit.fromasm.clamp b/test/unit.fromasm.clamp
index d59c8d0a3..e21d0f229 100644
--- a/test/unit.fromasm.clamp
+++ b/test/unit.fromasm.clamp
@@ -143,19 +143,19 @@
)
)
(func $f64-to-int (param $0 f64) (result i32)
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(get_local $0)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.ge
(get_local $0)
(f64.const 2147483648)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.le
(get_local $0)
(f64.const -2147483649)
@@ -270,7 +270,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(get_local $1)
(i32.div_u
(get_local $0)
@@ -448,7 +448,7 @@
(i32.const 3)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 4)
@@ -469,7 +469,7 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 8)
@@ -537,7 +537,7 @@
)
)
(func $phi (result i32)
- (block $do-once i32
+ (block $do-once (result i32)
(drop
(br_if $do-once
(i32.const 0)
@@ -635,7 +635,7 @@
)
(func $conditionalTypeFun
(drop
- (if i32
+ (if (result i32)
(call $return_int)
(i32.trunc_s/f64
(call $abort
@@ -648,7 +648,7 @@
)
)
(drop
- (if f64
+ (if (result f64)
(call $return_int)
(call $abort
(f64.convert_s/i32
@@ -1119,7 +1119,7 @@
)
(func $dropIgnoredImportsInIf (param $0 i32) (param $1 i32) (param $2 i32)
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(call $lb
(get_local $1)
diff --git a/test/unit.fromasm.clamp.no-opts b/test/unit.fromasm.clamp.no-opts
index 31aa0e384..18f16d316 100644
--- a/test/unit.fromasm.clamp.no-opts
+++ b/test/unit.fromasm.clamp.no-opts
@@ -201,19 +201,19 @@
)
)
(func $f64-to-int (param $0 f64) (result i32)
- (if i32
+ (if (result i32)
(f64.ne
(get_local $0)
(get_local $0)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.ge
(get_local $0)
(f64.const 2147483648)
)
(i32.const -2147483648)
- (if i32
+ (if (result i32)
(f64.le
(get_local $0)
(f64.const -2147483649)
@@ -257,13 +257,13 @@
(local $J f64)
(set_local $J
(f64.sub
- (block f64
+ (block (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block f64
+ (block (result f64)
(drop
(f64.const 3.2)
)
@@ -408,7 +408,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -469,7 +469,7 @@
(local $z f32)
(local $asm2wasm_i32_temp i32)
(set_local $x
- (block i32
+ (block (result i32)
(set_local $asm2wasm_i32_temp
(i32.const 0)
)
@@ -746,20 +746,20 @@
(i32.add
(i32.add
(i32.add
- (block i32
+ (block (result i32)
(drop
(i32.const 1)
)
(get_local $x)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 2)
)
(i32.const 3)
)
)
- (block i32
+ (block (result i32)
(block
(block
(drop
@@ -776,19 +776,19 @@
(i32.const 7)
)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 8)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 9)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 10)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 11)
)
@@ -804,7 +804,7 @@
(i32.add
(i32.add
(i32.add
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 1)
@@ -812,7 +812,7 @@
)
(get_local $x)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 2)
@@ -823,7 +823,7 @@
)
)
)
- (block i32
+ (block (result i32)
(block
(block
(drop
@@ -848,25 +848,25 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 9)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 10)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 11)
@@ -1004,7 +1004,7 @@
(func $useSetGlobal (result i32)
(local $x i32)
(set_local $x
- (block i32
+ (block (result i32)
(set_global $Int
(i32.const 10)
)
@@ -1015,7 +1015,7 @@
(i32.const 20)
)
(return
- (block i32
+ (block (result i32)
(set_global $Int
(i32.const 30)
)
@@ -1025,7 +1025,7 @@
)
(func $usesSetGlobal2 (result i32)
(return
- (block i32
+ (block (result i32)
(block
(set_global $Int
(i32.const 40)
@@ -1095,7 +1095,7 @@
(local $x i32)
(local $y f64)
(set_local $x
- (if i32
+ (if (result i32)
(call $return_int)
(i32.trunc_s/f64
(call $abort
@@ -1108,7 +1108,7 @@
)
)
(set_local $y
- (if f64
+ (if (result f64)
(call $return_int)
(call $abort
(f64.convert_s/i32
@@ -1962,7 +1962,7 @@
(func $indirectInSequence
(local $i1 i32)
(set_local $i1
- (block i32
+ (block (result i32)
(call_indirect $FUNCSIG$vi
(i32.const 0)
(i32.add
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index bf01a4681..45912cffb 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -392,7 +392,7 @@
(i32.const 3)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 4)
@@ -413,7 +413,7 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 8)
@@ -481,7 +481,7 @@
)
)
(func $phi (result i32)
- (block $do-once i32
+ (block $do-once (result i32)
(drop
(br_if $do-once
(i32.const 0)
@@ -579,7 +579,7 @@
)
(func $conditionalTypeFun
(drop
- (if i32
+ (if (result i32)
(call $return_int)
(i32.trunc_s/f64
(call $abort
@@ -592,7 +592,7 @@
)
)
(drop
- (if f64
+ (if (result f64)
(call $return_int)
(call $abort
(f64.convert_s/i32
@@ -1063,7 +1063,7 @@
)
(func $dropIgnoredImportsInIf (param $0 i32) (param $1 i32) (param $2 i32)
(drop
- (if i32
+ (if (result i32)
(get_local $0)
(call $lb
(get_local $1)
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts
index 0e930990d..3747f2c90 100644
--- a/test/unit.fromasm.imprecise.no-opts
+++ b/test/unit.fromasm.imprecise.no-opts
@@ -229,13 +229,13 @@
(local $J f64)
(set_local $J
(f64.sub
- (block f64
+ (block (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block f64
+ (block (result f64)
(drop
(f64.const 3.2)
)
@@ -429,7 +429,7 @@
(local $z f32)
(local $asm2wasm_i32_temp i32)
(set_local $x
- (block i32
+ (block (result i32)
(set_local $asm2wasm_i32_temp
(i32.const 0)
)
@@ -706,20 +706,20 @@
(i32.add
(i32.add
(i32.add
- (block i32
+ (block (result i32)
(drop
(i32.const 1)
)
(get_local $x)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 2)
)
(i32.const 3)
)
)
- (block i32
+ (block (result i32)
(block
(block
(drop
@@ -736,19 +736,19 @@
(i32.const 7)
)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 8)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 9)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 10)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 11)
)
@@ -764,7 +764,7 @@
(i32.add
(i32.add
(i32.add
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 1)
@@ -772,7 +772,7 @@
)
(get_local $x)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 2)
@@ -783,7 +783,7 @@
)
)
)
- (block i32
+ (block (result i32)
(block
(block
(drop
@@ -808,25 +808,25 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 9)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 10)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 11)
@@ -964,7 +964,7 @@
(func $useSetGlobal (result i32)
(local $x i32)
(set_local $x
- (block i32
+ (block (result i32)
(set_global $Int
(i32.const 10)
)
@@ -975,7 +975,7 @@
(i32.const 20)
)
(return
- (block i32
+ (block (result i32)
(set_global $Int
(i32.const 30)
)
@@ -985,7 +985,7 @@
)
(func $usesSetGlobal2 (result i32)
(return
- (block i32
+ (block (result i32)
(block
(set_global $Int
(i32.const 40)
@@ -1055,7 +1055,7 @@
(local $x i32)
(local $y f64)
(set_local $x
- (if i32
+ (if (result i32)
(call $return_int)
(i32.trunc_s/f64
(call $abort
@@ -1068,7 +1068,7 @@
)
)
(set_local $y
- (if f64
+ (if (result f64)
(call $return_int)
(call $abort
(f64.convert_s/i32
@@ -1922,7 +1922,7 @@
(func $indirectInSequence
(local $i1 i32)
(set_local $i1
- (block i32
+ (block (result i32)
(call_indirect $FUNCSIG$vi
(i32.const 0)
(i32.add
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index 32c854dd7..841a4d38f 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -233,13 +233,13 @@
(local $J f64)
(set_local $J
(f64.sub
- (block f64
+ (block (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block f64
+ (block (result f64)
(drop
(f64.const 3.2)
)
@@ -384,7 +384,7 @@
)
)
(func $i32u-div (param $0 i32) (param $1 i32) (result i32)
- (if i32
+ (if (result i32)
(i32.eqz
(get_local $1)
)
@@ -445,7 +445,7 @@
(local $z f32)
(local $asm2wasm_i32_temp i32)
(set_local $x
- (block i32
+ (block (result i32)
(set_local $asm2wasm_i32_temp
(i32.const 0)
)
@@ -722,20 +722,20 @@
(i32.add
(i32.add
(i32.add
- (block i32
+ (block (result i32)
(drop
(i32.const 1)
)
(get_local $x)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 2)
)
(i32.const 3)
)
)
- (block i32
+ (block (result i32)
(block
(block
(drop
@@ -752,19 +752,19 @@
(i32.const 7)
)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 8)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 9)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 10)
)
- (block i32
+ (block (result i32)
(drop
(i32.const 11)
)
@@ -780,7 +780,7 @@
(i32.add
(i32.add
(i32.add
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 1)
@@ -788,7 +788,7 @@
)
(get_local $x)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 2)
@@ -799,7 +799,7 @@
)
)
)
- (block i32
+ (block (result i32)
(block
(block
(drop
@@ -824,25 +824,25 @@
)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 8)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 9)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 10)
)
)
- (block i32
+ (block (result i32)
(drop
(call $lb
(i32.const 11)
@@ -980,7 +980,7 @@
(func $useSetGlobal (result i32)
(local $x i32)
(set_local $x
- (block i32
+ (block (result i32)
(set_global $Int
(i32.const 10)
)
@@ -991,7 +991,7 @@
(i32.const 20)
)
(return
- (block i32
+ (block (result i32)
(set_global $Int
(i32.const 30)
)
@@ -1001,7 +1001,7 @@
)
(func $usesSetGlobal2 (result i32)
(return
- (block i32
+ (block (result i32)
(block
(set_global $Int
(i32.const 40)
@@ -1071,7 +1071,7 @@
(local $x i32)
(local $y f64)
(set_local $x
- (if i32
+ (if (result i32)
(call $return_int)
(i32.trunc_s/f64
(call $abort
@@ -1084,7 +1084,7 @@
)
)
(set_local $y
- (if f64
+ (if (result f64)
(call $return_int)
(call $abort
(f64.convert_s/i32
@@ -1938,7 +1938,7 @@
(func $indirectInSequence
(local $i1 i32)
(set_local $i1
- (block i32
+ (block (result i32)
(call_indirect $FUNCSIG$vi
(i32.const 0)
(i32.add
diff --git a/test/unit.wast b/test/unit.wast
index 2cd164238..c1a945264 100644
--- a/test/unit.wast
+++ b/test/unit.wast
@@ -39,7 +39,7 @@
)
(func $importedDoubles (type $4) (result f64)
(local $temp f64)
- (block $topmost f64
+ (block $topmost (result f64)
(set_local $temp
(f64.add
(f64.add
@@ -93,7 +93,7 @@
(local $t f64)
(local $Int f64)
(local $Double i32)
- (block $topmost f64
+ (block $topmost (result f64)
(if
(f64.gt
(get_local $x)
@@ -179,13 +179,13 @@
(local $J f64)
(set_local $J
(f64.sub
- (block $block0 f64
+ (block $block0 (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block $block1 f64
+ (block $block1 (result f64)
(drop
(f64.const 3.2)
)
@@ -195,7 +195,7 @@
)
)
(func $switcher (type $6) (param $x i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(block $switch$0
(block $switch-default$3
(block $switch-case$2
@@ -293,7 +293,7 @@
)
(func $big_uint_div_u (type $5) (result i32)
(local $x i32)
- (block $topmost i32
+ (block $topmost (result i32)
(set_local $x
(i32.and
(i32.div_u
@@ -342,7 +342,7 @@
(local $asm2wasm_i32_temp i32)
(block $block0
(set_local $x
- (block $block1 i32
+ (block $block1 (result i32)
(set_local $asm2wasm_i32_temp
(i32.const 0)
)
@@ -431,7 +431,7 @@
(i32.const 0)
)
(func $loop-roundtrip (type $7) (param $0 f64) (result f64)
- (loop $loop-in1 f64
+ (loop $loop-in1 (result f64)
(drop
(get_local $0)
)
diff --git a/test/unit.wast.from-wast b/test/unit.wast.from-wast
index 99def6ded..bb66845af 100644
--- a/test/unit.wast.from-wast
+++ b/test/unit.wast.from-wast
@@ -39,7 +39,7 @@
)
(func $importedDoubles (type $4) (result f64)
(local $temp f64)
- (block $topmost f64
+ (block $topmost (result f64)
(set_local $temp
(f64.add
(f64.add
@@ -93,7 +93,7 @@
(local $t f64)
(local $Int f64)
(local $Double i32)
- (block $topmost f64
+ (block $topmost (result f64)
(if
(f64.gt
(get_local $x)
@@ -179,13 +179,13 @@
(local $J f64)
(set_local $J
(f64.sub
- (block $block0 f64
+ (block $block0 (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block $block1 f64
+ (block $block1 (result f64)
(drop
(f64.const 3.2)
)
@@ -195,7 +195,7 @@
)
)
(func $switcher (type $6) (param $x i32) (result i32)
- (block $topmost i32
+ (block $topmost (result i32)
(block $switch$0
(block $switch-default$3
(block $switch-case$2
@@ -293,7 +293,7 @@
)
(func $big_uint_div_u (type $5) (result i32)
(local $x i32)
- (block $topmost i32
+ (block $topmost (result i32)
(set_local $x
(i32.and
(i32.div_u
@@ -342,7 +342,7 @@
(local $asm2wasm_i32_temp i32)
(block $block0
(set_local $x
- (block $block1 i32
+ (block $block1 (result i32)
(set_local $asm2wasm_i32_temp
(i32.const 0)
)
@@ -431,7 +431,7 @@
(i32.const 0)
)
(func $loop-roundtrip (type $7) (param $0 f64) (result f64)
- (loop $loop-in1 f64
+ (loop $loop-in1 (result f64)
(drop
(get_local $0)
)
diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary
index 266cd2246..7656dc7d7 100644
--- a/test/unit.wast.fromBinary
+++ b/test/unit.wast.fromBinary
@@ -39,7 +39,7 @@
)
(func $importedDoubles (type $4) (result f64)
(local $var$0 f64)
- (block $label$0 f64
+ (block $label$0 (result f64)
(set_local $var$0
(f64.add
(f64.add
@@ -97,7 +97,7 @@
(local $var$2 i32)
(local $var$3 f64)
(local $var$4 f64)
- (block $label$0 f64
+ (block $label$0 (result f64)
(if
(f64.gt
(get_local $var$0)
@@ -191,13 +191,13 @@
(local $var$0 f64)
(set_local $var$0
(f64.sub
- (block $label$0 f64
+ (block $label$0 (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block $label$1 f64
+ (block $label$1 (result f64)
(drop
(f64.const 3.2)
)
@@ -207,7 +207,7 @@
)
)
(func $switcher (type $6) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(block $label$2
(block $label$3
@@ -305,7 +305,7 @@
)
(func $big_uint_div_u (type $5) (result i32)
(local $var$0 i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(set_local $var$0
(i32.and
(i32.div_u
@@ -354,7 +354,7 @@
(local $var$3 f64)
(block $label$0
(set_local $var$0
- (block $label$1 i32
+ (block $label$1 (result i32)
(set_local $var$1
(i32.const 0)
)
@@ -434,7 +434,7 @@
(nop)
)
(func $block_and_after (type $5) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -445,7 +445,7 @@
)
)
(func $loop-roundtrip (type $7) (param $var$0 f64) (result f64)
- (loop $label$0 f64
+ (loop $label$0 (result f64)
(drop
(get_local $var$0)
)
@@ -513,7 +513,7 @@
(unreachable)
)
(func $unreachable-block-with-br (type $5) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(drop
(i32.const 1)
diff --git a/test/unit.wast.fromBinary.noDebugInfo b/test/unit.wast.fromBinary.noDebugInfo
index 6818db1bb..bfcc12c6b 100644
--- a/test/unit.wast.fromBinary.noDebugInfo
+++ b/test/unit.wast.fromBinary.noDebugInfo
@@ -39,7 +39,7 @@
)
(func $1 (type $4) (result f64)
(local $var$0 f64)
- (block $label$0 f64
+ (block $label$0 (result f64)
(set_local $var$0
(f64.add
(f64.add
@@ -97,7 +97,7 @@
(local $var$2 i32)
(local $var$3 f64)
(local $var$4 f64)
- (block $label$0 f64
+ (block $label$0 (result f64)
(if
(f64.gt
(get_local $var$0)
@@ -191,13 +191,13 @@
(local $var$0 f64)
(set_local $var$0
(f64.sub
- (block $label$0 f64
+ (block $label$0 (result f64)
(drop
(f64.const 0.1)
)
(f64.const 5.1)
)
- (block $label$1 f64
+ (block $label$1 (result f64)
(drop
(f64.const 3.2)
)
@@ -207,7 +207,7 @@
)
)
(func $7 (type $6) (param $var$0 i32) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(block $label$2
(block $label$3
@@ -305,7 +305,7 @@
)
(func $10 (type $5) (result i32)
(local $var$0 i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(set_local $var$0
(i32.and
(i32.div_u
@@ -354,7 +354,7 @@
(local $var$3 f64)
(block $label$0
(set_local $var$0
- (block $label$1 i32
+ (block $label$1 (result i32)
(set_local $var$1
(i32.const 0)
)
@@ -434,7 +434,7 @@
(nop)
)
(func $19 (type $5) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(drop
(i32.const 1)
@@ -445,7 +445,7 @@
)
)
(func $20 (type $7) (param $var$0 f64) (result f64)
- (loop $label$0 f64
+ (loop $label$0 (result f64)
(drop
(get_local $var$0)
)
@@ -513,7 +513,7 @@
(unreachable)
)
(func $28 (type $5) (result i32)
- (block $label$0 i32
+ (block $label$0 (result i32)
(block $label$1
(drop
(i32.const 1)
diff --git a/test/use-import-and-drop.fromasm.clamp.no-opts b/test/use-import-and-drop.fromasm.clamp.no-opts
index 67f7fc368..332851f61 100644
--- a/test/use-import-and-drop.fromasm.clamp.no-opts
+++ b/test/use-import-and-drop.fromasm.clamp.no-opts
@@ -12,7 +12,7 @@
(local $$1$1 i32)
(local $$1$0 i32)
(return
- (block i32
+ (block (result i32)
(drop
(call $setTempRet0
(i32.or
diff --git a/test/use-import-and-drop.fromasm.imprecise.no-opts b/test/use-import-and-drop.fromasm.imprecise.no-opts
index 67f7fc368..332851f61 100644
--- a/test/use-import-and-drop.fromasm.imprecise.no-opts
+++ b/test/use-import-and-drop.fromasm.imprecise.no-opts
@@ -12,7 +12,7 @@
(local $$1$1 i32)
(local $$1$0 i32)
(return
- (block i32
+ (block (result i32)
(drop
(call $setTempRet0
(i32.or
diff --git a/test/use-import-and-drop.fromasm.no-opts b/test/use-import-and-drop.fromasm.no-opts
index 67f7fc368..332851f61 100644
--- a/test/use-import-and-drop.fromasm.no-opts
+++ b/test/use-import-and-drop.fromasm.no-opts
@@ -12,7 +12,7 @@
(local $$1$1 i32)
(local $$1$0 i32)
(return
- (block i32
+ (block (result i32)
(drop
(call $setTempRet0
(i32.or
diff --git a/test/wasm-only.fromasm b/test/wasm-only.fromasm
index 0cb1acb65..b8bda7fee 100644
--- a/test/wasm-only.fromasm
+++ b/test/wasm-only.fromasm
@@ -131,7 +131,7 @@
)
)
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -143,12 +143,12 @@
)
)
(func $i64s-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
(i64.const 0)
- (if i64
+ (if (result i64)
(i32.and
(i64.eq
(get_local $0)
@@ -168,7 +168,7 @@
)
)
(func $i64u-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -180,7 +180,7 @@
)
)
(func $i64s-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -317,7 +317,7 @@
)
)
(func $switch64 (param $0 i64) (result i32)
- (block $switch i32
+ (block $switch (result i32)
(block $switch-default
(block $switch-case0
(block $switch-case
diff --git a/test/wasm-only.fromasm.clamp b/test/wasm-only.fromasm.clamp
index 0cb1acb65..b8bda7fee 100644
--- a/test/wasm-only.fromasm.clamp
+++ b/test/wasm-only.fromasm.clamp
@@ -131,7 +131,7 @@
)
)
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -143,12 +143,12 @@
)
)
(func $i64s-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
(i64.const 0)
- (if i64
+ (if (result i64)
(i32.and
(i64.eq
(get_local $0)
@@ -168,7 +168,7 @@
)
)
(func $i64u-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -180,7 +180,7 @@
)
)
(func $i64s-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -317,7 +317,7 @@
)
)
(func $switch64 (param $0 i64) (result i32)
- (block $switch i32
+ (block $switch (result i32)
(block $switch-default
(block $switch-case0
(block $switch-case
diff --git a/test/wasm-only.fromasm.clamp.no-opts b/test/wasm-only.fromasm.clamp.no-opts
index da52d1955..97533d796 100644
--- a/test/wasm-only.fromasm.clamp.no-opts
+++ b/test/wasm-only.fromasm.clamp.no-opts
@@ -281,7 +281,7 @@
)
)
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -293,12 +293,12 @@
)
)
(func $i64s-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
(i64.const 0)
- (if i64
+ (if (result i64)
(i32.and
(i64.eq
(get_local $0)
@@ -318,7 +318,7 @@
)
)
(func $i64u-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -330,7 +330,7 @@
)
)
(func $i64s-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -1520,7 +1520,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$tobool36)
(get_local $$s$2)
(i32.const 0)
diff --git a/test/wasm-only.fromasm.imprecise b/test/wasm-only.fromasm.imprecise
index 14a2cedc6..e05da9799 100644
--- a/test/wasm-only.fromasm.imprecise
+++ b/test/wasm-only.fromasm.imprecise
@@ -232,7 +232,7 @@
)
)
(func $switch64 (param $0 i64) (result i32)
- (block $switch i32
+ (block $switch (result i32)
(block $switch-default
(block $switch-case0
(block $switch-case
diff --git a/test/wasm-only.fromasm.imprecise.no-opts b/test/wasm-only.fromasm.imprecise.no-opts
index 5bdb5bc00..8c49b41d5 100644
--- a/test/wasm-only.fromasm.imprecise.no-opts
+++ b/test/wasm-only.fromasm.imprecise.no-opts
@@ -1459,7 +1459,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$tobool36)
(get_local $$s$2)
(i32.const 0)
diff --git a/test/wasm-only.fromasm.no-opts b/test/wasm-only.fromasm.no-opts
index da52d1955..97533d796 100644
--- a/test/wasm-only.fromasm.no-opts
+++ b/test/wasm-only.fromasm.no-opts
@@ -281,7 +281,7 @@
)
)
(func $i64u-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -293,12 +293,12 @@
)
)
(func $i64s-div (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
(i64.const 0)
- (if i64
+ (if (result i64)
(i32.and
(i64.eq
(get_local $0)
@@ -318,7 +318,7 @@
)
)
(func $i64u-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -330,7 +330,7 @@
)
)
(func $i64s-rem (param $0 i64) (param $1 i64) (result i64)
- (if i64
+ (if (result i64)
(i64.eqz
(get_local $1)
)
@@ -1520,7 +1520,7 @@
)
)
(set_local $$cond
- (if i32
+ (if (result i32)
(get_local $$tobool36)
(get_local $$s$2)
(i32.const 0)