diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/merge-blocks.txt | 26 | ||||
-rw-r--r-- | test/passes/merge-blocks.wast | 11 | ||||
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.txt | 4 |
3 files changed, 32 insertions, 9 deletions
diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt index b972a6421..f9ca7c3c1 100644 --- a/test/passes/merge-blocks.txt +++ b/test/passes/merge-blocks.txt @@ -14,12 +14,11 @@ ) (func $drop-block-br (type $0) (block $block - (block $x - (drop - (i32.const 1) - ) - (br $x) - (drop + (drop + (block $x (result i32) + (br $x + (i32.const 1) + ) (i32.const 0) ) ) @@ -95,8 +94,8 @@ (func $drop-block-squared-iloop (type $0) (drop (block $label$0 (result i32) - (block $label$1 - (drop + (drop + (block $label$1 (loop $label$2 (br $label$2) ) @@ -124,4 +123,15 @@ ) ) ) + (func $loop-block-drop-block-return (type $0) + (loop $label$4 + (block $label$5 + (drop + (block $label$6 (result i32) + (return) + ) + ) + ) + ) + ) ) diff --git a/test/passes/merge-blocks.wast b/test/passes/merge-blocks.wast index 81b70d1b5..d73612735 100644 --- a/test/passes/merge-blocks.wast +++ b/test/passes/merge-blocks.wast @@ -101,5 +101,16 @@ ) ) ) + (func $loop-block-drop-block-return + (loop $label$4 + (block $label$5 + (drop + (block $label$6 (result i32) + (return) + ) + ) + ) + ) + ) ) diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index 6bd9d348e..53424063d 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -840,7 +840,9 @@ (func $drop-unreachable (type $4) (result i32) (local $0 i32) (drop - (unreachable) + (block (result i32) + (unreachable) + ) ) (unreachable) ) |