diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/remove-unused-brs.txt | 122 | ||||
-rw-r--r-- | test/passes/remove-unused-brs.wast | 44 |
2 files changed, 162 insertions, 4 deletions
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt index b42347fc3..af5b9d1ed 100644 --- a/test/passes/remove-unused-brs.txt +++ b/test/passes/remove-unused-brs.txt @@ -44,6 +44,65 @@ ) ) ) + (func $b6 (param $i1 i32) + (block $topmost + (br_if + (i32.const 1) + $topmost + ) + ) + ) + (func $b7 (param $i1 i32) + (block $topmost + (br_if + (i32.const 1) + $topmost + (i32.const 0) + ) + ) + ) + (func $b8 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $topmost + ) + ) + ) + ) + (func $b9 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $inner + ) + ) + ) + ) + (func $b10 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $topmost + (i32.const 0) + ) + ) + ) + ) + (func $b11 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $inner + (i32.const 0) + ) + ) + ) + ) ) (module (memory 16777216 16777216) @@ -53,9 +112,7 @@ ) (func $b1 (param $i1 i32) (block $topmost - (br $topmost - (i32.const 0) - ) + (i32.const 0) ) ) (func $b2 (param $i1 i32) @@ -83,7 +140,64 @@ (func $b5 (param $i1 i32) (block $topmost (block $inner - (br $inner + (i32.const 0) + ) + ) + ) + (func $b6 (param $i1 i32) + (block $topmost + (br_if + (i32.const 1) + $topmost + ) + ) + ) + (func $b7 (param $i1 i32) + (block $topmost + (br_if + (i32.const 1) + $topmost + (i32.const 0) + ) + ) + ) + (func $b8 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $topmost + ) + ) + ) + ) + (func $b9 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $inner + ) + ) + ) + ) + (func $b10 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $topmost + (i32.const 0) + ) + ) + ) + ) + (func $b11 (param $i1 i32) + (block $topmost + (block $inner + (br_if + (i32.const 1) + $inner (i32.const 0) ) ) diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast index e03ba8847..b4a2cc5fe 100644 --- a/test/passes/remove-unused-brs.wast +++ b/test/passes/remove-unused-brs.wast @@ -44,5 +44,49 @@ ) ) ) + (func $b6 (param $i1 i32) + (block $topmost + (br_if (i32.const 1) $topmost) + ) + ) + (func $b7 (param $i1 i32) + (block $topmost + (br_if (i32.const 1) $topmost + (i32.const 0) + ) + ) + ) + (func $b8 (param $i1 i32) + (block $topmost + (block $inner + (br_if (i32.const 1) $topmost) + ) + ) + ) + (func $b9 (param $i1 i32) + (block $topmost + (block $inner + (br_if (i32.const 1) $inner) + ) + ) + ) + (func $b10 (param $i1 i32) + (block $topmost + (block $inner + (br_if (i32.const 1) $topmost + (i32.const 0) + ) + ) + ) + ) + (func $b11 (param $i1 i32) + (block $topmost + (block $inner + (br_if (i32.const 1) $inner + (i32.const 0) + ) + ) + ) + ) ) |