diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-brs.txt | 23 | ||||
-rw-r--r-- | test/passes/remove-unused-brs.wast | 22 |
2 files changed, 45 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index a44a62c20..774110e23 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -2208,4 +2208,27 @@ (br $label$1) ) ) + (func $refinalize-need-br-value (; 101 ;) (type $2) (result i32) + (loop $label$3 (result i32) + (block $label$6 (result i32) + (block $label$10 (result i32) + (unreachable) + (block $label$503 (result i32) + (br_if $label$3 + (block $label$530 (result i32) + (block + (unreachable) + (drop + (i32.const 0) + ) + ) + (i32.const 0) + ) + ) + (i32.const 127) + ) + ) + ) + ) + ) ) diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index 7a1943c14..d1afba4a5 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -1815,5 +1815,27 @@ (br $label$1) ) ) + (func $refinalize-need-br-value (result i32) + (loop $label$3 (result i32) + (block $label$6 (result i32) + (block $label$10 + (unreachable) + (block $label$503 ;; this block will get a value flowing out + (br_if $label$3 + (block $label$530 (result i32) + (br_if $label$503 ;; while this br does not send a value + (i32.const 0) + ) + (i32.const 0) + ) + ) + (return + (i32.const 127) + ) + ) + ) + ) + ) + ) ) |