diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-05-25 17:54:56 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-25 17:54:56 -0700 |
commit | 5b6918ec2245a6e3c512dcee45766731b49805cc (patch) | |
tree | f141de12023928196c0a0ef9a07b83db5b666425 /test | |
parent | bbff98549d2c29b050ea1b867c226ec09c9d78f5 (diff) | |
download | binaryen-5b6918ec2245a6e3c512dcee45766731b49805cc.tar.gz binaryen-5b6918ec2245a6e3c512dcee45766731b49805cc.tar.bz2 binaryen-5b6918ec2245a6e3c512dcee45766731b49805cc.zip |
add a merge-block test
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.txt | 13 | ||||
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.wast | 15 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index 585f079ed..a0ed7ea32 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -16,6 +16,19 @@ (func $b0-yes (param $i1 i32) (i32.const 10) ) + (func $b0-no (param $i1 i32) + (block $topmost + (block $block0 + (br $block0) + ) + (br $topmost) + ) + ) + (func $b0-br-but-ok (param $i1 i32) + (block $topmost + (br $topmost) + ) + ) (func $b1-yes (param $i1 i32) (i32.const 10) ) diff --git a/test/passes/remove-unused-names_merge-blocks.wast b/test/passes/remove-unused-names_merge-blocks.wast index a4a9873e9..85bb11da6 100644 --- a/test/passes/remove-unused-names_merge-blocks.wast +++ b/test/passes/remove-unused-names_merge-blocks.wast @@ -17,6 +17,21 @@ ) ) ) + (func $b0-no (param $i1 i32) + (block $topmost + (block $block0 + (br $block0) + ) + (br $topmost) + ) + ) + (func $b0-br-but-ok (param $i1 i32) + (block $topmost + (block $block0 + (br $topmost) + ) + ) + ) (func $b1-yes (param $i1 i32) (block $topmost (block |