summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/merge-blocks.txt12
-rw-r--r--test/passes/merge-blocks.wast16
2 files changed, 28 insertions, 0 deletions
diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt
index 33f16785a..dd496df2f 100644
--- a/test/passes/merge-blocks.txt
+++ b/test/passes/merge-blocks.txt
@@ -1,6 +1,7 @@
(module
(type $0 (func))
(type $1 (func (param i32)))
+ (type $2 (func (result i32)))
(memory $0 0)
(func $drop-block (type $0)
(block $block
@@ -75,4 +76,15 @@
)
)
)
+ (func $drop-unreachable-br_if (type $2) (result i32)
+ (block $label$0 (result i32)
+ (block $label$2
+ (drop
+ (br $label$0
+ (i32.const 538976371)
+ )
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/merge-blocks.wast b/test/passes/merge-blocks.wast
index a61027778..4b2f248e2 100644
--- a/test/passes/merge-blocks.wast
+++ b/test/passes/merge-blocks.wast
@@ -53,5 +53,21 @@
)
)
)
+ (func $drop-unreachable-br_if (result i32)
+ (block $label$0 (result i32)
+ (drop
+ (block $label$2
+ (drop
+ (br_if $label$2
+ (br $label$0
+ (i32.const 538976371)
+ )
+ (i32.const 1918987552)
+ )
+ )
+ )
+ )
+ )
+ )
)