diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-brs.txt | 57 | ||||
-rw-r--r-- | test/passes/remove-unused-brs.wast | 56 |
2 files changed, 113 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index b5bcce9f2..03eb7b716 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -1946,4 +1946,61 @@ ) ) ) + (func $drop-restructure-if (; 81 ;) (type $3) (param $x i32) (param $y i32) (result i32) + (if (result i32) + (get_local $y) + (get_local $x) + (block $label$2 (result i32) + (nop) + (i32.const 0) + ) + ) + ) + (func $drop-restructure-if-final (; 82 ;) (type $3) (param $x i32) (param $y i32) (result i32) + (if (result i32) + (get_local $y) + (get_local $x) + (block $label$2 (result i32) + (nop) + (unreachable) + ) + ) + ) + (func $drop-restructure-if-middle (; 83 ;) (type $3) (param $x i32) (param $y i32) (result i32) + (if (result i32) + (get_local $y) + (get_local $x) + (block $label$2 (result i32) + (nop) + (nop) + (i32.const 0) + ) + ) + ) + (func $drop-restructure-if-bad (; 84 ;) (type $3) (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (tee_local $y + (get_local $x) + ) + (get_local $y) + ) + ) + (i32.const 0) + ) + ) + (func $drop-restructure-if-bad-2 (; 85 ;) (type $3) (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (get_local $y) + (tee_local $y + (get_local $x) + ) + ) + ) + (i32.const 0) + ) + ) ) diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index 8325b47ac..7f77fd00c 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -1561,5 +1561,61 @@ ) ) ) + (func $drop-restructure-if (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (get_local $x) + (get_local $y) + ) + ) + (i32.const 0) + ) + ) + (func $drop-restructure-if-final (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (get_local $x) + (get_local $y) + ) + ) + (unreachable) + ) + ) + (func $drop-restructure-if-middle (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (get_local $x) + (get_local $y) + ) + ) + (nop) ;; the middle + (i32.const 0) + ) + ) + (func $drop-restructure-if-bad (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (tee_local $y (get_local $x)) + (get_local $y) + ) + ) + (i32.const 0) + ) + ) + (func $drop-restructure-if-bad-2 (param $x i32) (param $y i32) (result i32) + (block $label$2 (result i32) + (drop + (br_if $label$2 + (get_local $y) + (tee_local $y (get_local $x)) + ) + ) + (i32.const 0) + ) + ) ) |