diff options
author | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-07-11 09:45:10 -0700 |
---|---|---|
committer | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-07-11 11:07:46 -0700 |
commit | 6159fb42fcd2dae593ee61ebb7e3e163445ae9d0 (patch) | |
tree | 1d18ee1367f2ce10594719b335a5a630ad3ce87d /test | |
parent | e5ebae7cc965f3272e03cf29cc114c638b00eb3a (diff) | |
download | binaryen-6159fb42fcd2dae593ee61ebb7e3e163445ae9d0.tar.gz binaryen-6159fb42fcd2dae593ee61ebb7e3e163445ae9d0.tar.bz2 binaryen-6159fb42fcd2dae593ee61ebb7e3e163445ae9d0.zip |
fix handling of unreachable br values in merge-blocks
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/merge-blocks.txt | 12 | ||||
-rw-r--r-- | test/passes/merge-blocks.wast | 16 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt index 33f16785a..dd496df2f 100644 --- a/test/passes/merge-blocks.txt +++ b/test/passes/merge-blocks.txt @@ -1,6 +1,7 @@ (module (type $0 (func)) (type $1 (func (param i32))) + (type $2 (func (result i32))) (memory $0 0) (func $drop-block (type $0) (block $block @@ -75,4 +76,15 @@ ) ) ) + (func $drop-unreachable-br_if (type $2) (result i32) + (block $label$0 (result i32) + (block $label$2 + (drop + (br $label$0 + (i32.const 538976371) + ) + ) + ) + ) + ) ) diff --git a/test/passes/merge-blocks.wast b/test/passes/merge-blocks.wast index a61027778..4b2f248e2 100644 --- a/test/passes/merge-blocks.wast +++ b/test/passes/merge-blocks.wast @@ -53,5 +53,21 @@ ) ) ) + (func $drop-unreachable-br_if (result i32) + (block $label$0 (result i32) + (drop + (block $label$2 + (drop + (br_if $label$2 + (br $label$0 + (i32.const 538976371) + ) + (i32.const 1918987552) + ) + ) + ) + ) + ) + ) ) |