diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/code-folding.txt | 16 | ||||
-rw-r--r-- | test/passes/code-folding.wast | 19 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/passes/code-folding.txt b/test/passes/code-folding.txt index e11999ac8..33b5da6a7 100644 --- a/test/passes/code-folding.txt +++ b/test/passes/code-folding.txt @@ -106,4 +106,20 @@ ) (return) ) + (func $leave-inner-block-type (; 6 ;) (type $1) + (block $label$1 + (drop + (block $label$2 (result i32) + (br_if $label$2 + (unreachable) + (unreachable) + ) + (br $label$1) + ) + ) + ) + (drop + (i32.const 1) + ) + ) ) diff --git a/test/passes/code-folding.wast b/test/passes/code-folding.wast index 2064f2db6..56eea3a59 100644 --- a/test/passes/code-folding.wast +++ b/test/passes/code-folding.wast @@ -114,5 +114,24 @@ ) ) ) + (func $leave-inner-block-type + (block $label$1 + (drop + (block $label$2 (result i32) ;; leave this alone (otherwise, if we make it unreachable, we need to do more updating) + (br_if $label$2 + (unreachable) + (unreachable) + ) + (drop + (i32.const 1) + ) + (br $label$1) + ) + ) + (drop + (i32.const 1) + ) + ) + ) ) |