diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-28 11:26:38 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2017-08-28 11:26:38 -0700 |
commit | 3c8be1c57c3c30168d795e46a4389ec878156215 (patch) | |
tree | 9dc686ef59e413da587a785ae1975c063a3b0523 /test | |
parent | 8c89a7baae740013b038865fc4e290439b91eb6f (diff) | |
download | binaryen-3c8be1c57c3c30168d795e46a4389ec878156215.tar.gz binaryen-3c8be1c57c3c30168d795e46a4389ec878156215.tar.bz2 binaryen-3c8be1c57c3c30168d795e46a4389ec878156215.zip |
fix remove-unused-brs bug with merging br_ifs with unreachable code
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1.txt | 20 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_shrink-level=1.wast | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs_shrink-level=1.txt b/test/passes/remove-unused-brs_shrink-level=1.txt index a26f4ebf4..fb739356c 100644 --- a/test/passes/remove-unused-brs_shrink-level=1.txt +++ b/test/passes/remove-unused-brs_shrink-level=1.txt @@ -139,4 +139,24 @@ ) ) ) + (func $br-if-unreachable-pair (type $1) + (block $label$14 + (br_if $label$14 + (unreachable) + ) + (br_if $label$14 + (i32.const 0) + ) + ) + ) + (func $br-if-unreachable-pair2 (type $1) + (block $label$14 + (br_if $label$14 + (i32.const 0) + ) + (br_if $label$14 + (unreachable) + ) + ) + ) ) diff --git a/test/passes/remove-unused-brs_shrink-level=1.wast b/test/passes/remove-unused-brs_shrink-level=1.wast index 88977be9e..11510dea7 100644 --- a/test/passes/remove-unused-brs_shrink-level=1.wast +++ b/test/passes/remove-unused-brs_shrink-level=1.wast @@ -93,5 +93,25 @@ ) ) ) + (func $br-if-unreachable-pair + (block $label$14 + (br_if $label$14 + (unreachable) + ) + (br_if $label$14 + (i32.const 0) + ) + ) + ) + (func $br-if-unreachable-pair2 + (block $label$14 + (br_if $label$14 + (i32.const 0) + ) + (br_if $label$14 + (unreachable) + ) + ) + ) ) |