summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/remove-unused-brs.txt11
-rw-r--r--test/passes/remove-unused-brs.wast10
2 files changed, 21 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt
index fe0c59fca..5cc900abd 100644
--- a/test/passes/remove-unused-brs.txt
+++ b/test/passes/remove-unused-brs.txt
@@ -6,6 +6,7 @@
(type $4 (func (param i32 i32)))
(type $5 (func (param f32 i32 f32 i32 i32 f64 f32) (result i32)))
(type $6 (func (param i32) (result i64)))
+ (type $7 (func (result i64)))
(memory $0 256 256)
(func $b0-yes (type $0) (param $i1 i32)
(block $topmost
@@ -1059,4 +1060,14 @@
)
)
)
+ (func $unreachable-if-that-could-be-a-br_if (type $7) (result i64)
+ (loop $label$3
+ (if
+ (unreachable)
+ (f64.const 1)
+ (br $label$3)
+ )
+ (i64.const 1)
+ )
+ )
)
diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast
index 996b05264..ecf70b758 100644
--- a/test/passes/remove-unused-brs.wast
+++ b/test/passes/remove-unused-brs.wast
@@ -943,5 +943,15 @@
)
)
)
+ (func $unreachable-if-that-could-be-a-br_if (result i64)
+ (loop $label$3
+ (if
+ (unreachable)
+ (f64.const 1)
+ (br $label$3)
+ )
+ (i64.const 1)
+ )
+ )
)