diff options
Diffstat (limited to 'test/passes/remove-unused-brs.wast')
-rw-r--r-- | test/passes/remove-unused-brs.wast | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index d1afba4a5..fe195317d 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -1837,5 +1837,158 @@ ) ) ) + (func $selectify (param $x i32) + (drop + (if (result i32) + (i32.eq + (get_local $x) + (i32.const 1) + ) + (i32.mul + (i32.const 2) + (i32.const 3) + ) + (i32.mul + (i32.const 2) + (i32.const 3) + ) + ) + ) + (drop + (if (result i32) + (i32.eq + (get_local $x) + (i32.const 1) + ) + (i32.add + (i32.const 2) + (i32.const 3) + ) + (i32.add + (i32.const 2) + (i32.const 3) + ) + ) + ) + ) + (func $if-one-side (result i32) + (local $x i32) + (set_local $x + (if (result i32) + (i32.const 1) + (i32.const 2) + (get_local $x) + ) + ) + (get_local $x) + ) + (func $if-one-side-b (result i32) + (local $x i32) + (set_local $x + (if (result i32) + (i32.const 1) + (get_local $x) + (i32.const 2) + ) + ) + (get_local $x) + ) + (func $if-one-side-tee-etc (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $x i32) + (local $y i32) + (local $z i32) + (drop + (call $if-one-side-tee-etc + (tee_local $x + (if (result i32) + (i32.const -3) + (i32.const -4) + (get_local $x) + ) + ) + ) + ) + (i32.const 0) + ) + (func $ifs-copies-recursive (param $20 i32) (result i32) + (set_local $20 + (if (result i32) + (i32.const 1) + (if (result i32) + (i32.const 2) + (if (result i32) + (i32.const 3) + (i32.const 4) + (get_local $20) + ) + (get_local $20) + ) + (get_local $20) + ) + ) + (get_local $20) + ) + (func $if-copy1 + (local $x i32) + (local $y i32) + (loop $top + (set_local $x + (if (result i32) + (i32.const 1) + (get_local $x) + (get_local $y) + ) + ) + (br $top) + ) + ) + (func $if-copy3 + (local $x i32) + (local $y i32) + (loop $top + (set_local $x + (if (result i32) + (i32.const 1) + (unreachable) + (get_local $x) + ) + ) + (br $top) + ) + ) + (func $if-copy4 + (local $x i32) + (local $y i32) + (loop $top + (set_local $x + (if (result i32) + (i32.const 1) + (unreachable) + (get_local $y) + ) + ) + (br $top) + ) + ) + (func $if-copy-tee + (local $x i32) + (local $y i32) + (loop $top + (drop + (tee_local $x + (if (result i32) + (i32.const 1) + (get_local $x) + (i32.const 2) + ) + ) + ) + (br $top) + ) + ) ) |