diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-05 11:53:48 -0700 |
---|---|---|
committer | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-08-05 13:46:02 -0700 |
commit | cc193a49fa612142fdea016ed8fe8a527be7c835 (patch) | |
tree | ad3fe7ac6265afd1abfe08e65be69d137b80a639 /test | |
parent | 077c531131be9404e97e94147fc5c5af9006ef07 (diff) | |
download | binaryen-cc193a49fa612142fdea016ed8fe8a527be7c835.tar.gz binaryen-cc193a49fa612142fdea016ed8fe8a527be7c835.tar.bz2 binaryen-cc193a49fa612142fdea016ed8fe8a527be7c835.zip |
don't turn untaken br_ifs into ifs in remove-unused-brs
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-brs.txt | 11 | ||||
-rw-r--r-- | test/passes/remove-unused-brs.wast | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index 355f8a531..fe0c59fca 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -1048,4 +1048,15 @@ ) ) ) + (func $untaken-br_if-then-if (type $1) + (block $label$0 + (br_if $label$0 + (unreachable) + ) + (if + (i32.const 0) + (nop) + ) + ) + ) ) diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index e7c221fa4..996b05264 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -932,5 +932,16 @@ ) ) ) + (func $untaken-br_if-then-if + (block $label$0 + (br_if $label$0 + (unreachable) + ) + (if + (i32.const 0) + (nop) + ) + ) + ) ) |