diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-06 11:19:03 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-08-06 11:24:52 -0700 |
commit | 323e0b489a2b26d144da440d8043189ebbf49db2 (patch) | |
tree | 033b9ed11eaa48e614badfbc452ca2626cd8a613 /test | |
parent | 7231e619004414c33b30f4a3dd55ff85c69e1406 (diff) | |
download | binaryen-323e0b489a2b26d144da440d8043189ebbf49db2.tar.gz binaryen-323e0b489a2b26d144da440d8043189ebbf49db2.tar.bz2 binaryen-323e0b489a2b26d144da440d8043189ebbf49db2.zip |
handle merging blocks with items after an unreachable, that if merged would be invalid. stop on the unreachable, it is easier and better
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.txt | 5 | ||||
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.wast | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index ff0d8b912..81386b10a 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -906,4 +906,9 @@ ) ) ) + (func $merging-with-unreachable-in-middle (type $4) (result i32) + (return + (i32.const 21536) + ) + ) ) diff --git a/test/passes/remove-unused-names_merge-blocks.wast b/test/passes/remove-unused-names_merge-blocks.wast index 2911203d1..bf1dc1fda 100644 --- a/test/passes/remove-unused-names_merge-blocks.wast +++ b/test/passes/remove-unused-names_merge-blocks.wast @@ -1068,4 +1068,18 @@ ) ) ) + (func $merging-with-unreachable-in-middle (result i32) + (block $label$1 (result i32) + (block + (return + (i32.const 21536) + ) + (block $label$15 + (br $label$15) + ) + (i32.const 19299) + ) + ) + ) ) + |