diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/vacuum_all-features.txt | 7 | ||||
-rw-r--r-- | test/passes/vacuum_all-features.wast | 28 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/passes/vacuum_all-features.txt b/test/passes/vacuum_all-features.txt index c7c22572a..7de8ffa42 100644 --- a/test/passes/vacuum_all-features.txt +++ b/test/passes/vacuum_all-features.txt @@ -494,3 +494,10 @@ (nop) ) ) +(module + (type $none_=>_none (func)) + (global $global$0 (mut i32) (i32.const 10)) + (func $1 + (nop) + ) +) diff --git a/test/passes/vacuum_all-features.wast b/test/passes/vacuum_all-features.wast index 46678bd8e..c074fe234 100644 --- a/test/passes/vacuum_all-features.wast +++ b/test/passes/vacuum_all-features.wast @@ -885,3 +885,31 @@ ) ) ) +(module + (global $global$0 (mut i32) (i32.const 10)) + (func $1 + (drop + (block $block (result funcref i32) + ;; we can vaccum out all parts of this block: the br_if is not taken, there + ;; is a nop, and the tuple at the end goes to a dropped block anyhow. this + ;; test specifically verifies handling of tuples containing non-nullable + ;; types, for which we try to create a zero in an intermediate step along + ;; the way. + (drop + (br_if $block + (tuple.make + (ref.func $1) + (i32.const 0) + ) + (i32.const 0) + ) + ) + (nop) + (tuple.make + (ref.func $1) + (i32.const 1) + ) + ) + ) + ) +) |