diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-brs.txt | 11 | ||||
-rw-r--r-- | test/passes/remove-unused-brs.wast | 13 |
2 files changed, 19 insertions, 5 deletions
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index 5cc900abd..599459c57 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -1062,12 +1062,13 @@ ) (func $unreachable-if-that-could-be-a-br_if (type $7) (result i64) (loop $label$3 - (if - (unreachable) - (f64.const 1) - (br $label$3) - ) + (unreachable) (i64.const 1) ) ) + (func $nop-br-might-update-type (type $1) + (block $label$39 + (unreachable) + ) + ) ) diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index ecf70b758..32c4ece6a 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -953,5 +953,18 @@ (i64.const 1) ) ) + (func $nop-br-might-update-type + (block $label$39 + (if + (unreachable) + (if (result i32) + (i32.const 1) + (br $label$39) ;; if we nop this, then the parent type must change + (i32.const 0) + ) + (i32.const 0) + ) + ) + ) ) |