diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-06 14:00:55 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-08-06 14:00:55 -0700 |
commit | e17202e4d20bf79bd285425bac606a31bf3a8131 (patch) | |
tree | bdb3eccb020f791d34e544b7fbb86d404b646ce4 /test | |
parent | 323e0b489a2b26d144da440d8043189ebbf49db2 (diff) | |
download | binaryen-e17202e4d20bf79bd285425bac606a31bf3a8131.tar.gz binaryen-e17202e4d20bf79bd285425bac606a31bf3a8131.tar.bz2 binaryen-e17202e4d20bf79bd285425bac606a31bf3a8131.zip |
properly handle merging of blocks with concrete unreachable elements in the middle
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.txt | 17 | ||||
-rw-r--r-- | test/passes/remove-unused-names_merge-blocks.wast | 12 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names_merge-blocks.txt b/test/passes/remove-unused-names_merge-blocks.txt index 81386b10a..19f03c662 100644 --- a/test/passes/remove-unused-names_merge-blocks.txt +++ b/test/passes/remove-unused-names_merge-blocks.txt @@ -854,6 +854,9 @@ ) (func $concrete_finale_in_unreachable (type $5) (result f64) (unreachable) + (drop + (f64.const 6.322092475576799e-96) + ) (f64.const -1) ) (func $dont-move-unreachable (type $3) @@ -910,5 +913,19 @@ (return (i32.const 21536) ) + (block $label$15 + (br $label$15) + ) + (i32.const 19299) + ) + (func $remove-br-after-unreachable (type $3) + (block $label$9 + (drop + (block + (return) + (br $label$9) + ) + ) + ) ) ) diff --git a/test/passes/remove-unused-names_merge-blocks.wast b/test/passes/remove-unused-names_merge-blocks.wast index bf1dc1fda..6f6dd92b9 100644 --- a/test/passes/remove-unused-names_merge-blocks.wast +++ b/test/passes/remove-unused-names_merge-blocks.wast @@ -1081,5 +1081,17 @@ ) ) ) + (func $remove-br-after-unreachable + (block $label$9 + (drop + (block + (block + (return) + (br $label$9) ;; removing this leads to the block becoming unreachable + ) + ) + ) + ) + ) ) |