summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/merge-blocks.txt13
-rw-r--r--test/passes/merge-blocks.wast13
-rw-r--r--test/passes/remove-unused-brs.txt13
-rw-r--r--test/passes/remove-unused-brs.wast13
4 files changed, 52 insertions, 0 deletions
diff --git a/test/passes/merge-blocks.txt b/test/passes/merge-blocks.txt
index dd496df2f..545438b1d 100644
--- a/test/passes/merge-blocks.txt
+++ b/test/passes/merge-blocks.txt
@@ -87,4 +87,17 @@
)
)
)
+ (func $drop-block-squared-iloop (type $0)
+ (drop
+ (block $label$0 (result i32)
+ (block $label$1
+ (drop
+ (loop $label$2
+ (br $label$2)
+ )
+ )
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/merge-blocks.wast b/test/passes/merge-blocks.wast
index 4b2f248e2..e998060c4 100644
--- a/test/passes/merge-blocks.wast
+++ b/test/passes/merge-blocks.wast
@@ -69,5 +69,18 @@
)
)
)
+ (func $drop-block-squared-iloop
+ (drop
+ (block $label$0 (result i32) ;; this block's type should not change, so the drop remains none and valid
+ (drop
+ (block $label$1
+ (loop $label$2
+ (br $label$2)
+ )
+ )
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/remove-unused-brs.txt b/test/passes/remove-unused-brs.txt
index 417bd3728..355f8a531 100644
--- a/test/passes/remove-unused-brs.txt
+++ b/test/passes/remove-unused-brs.txt
@@ -1035,4 +1035,17 @@
)
)
)
+ (func $untaken-br-with-concrete-last-element (type $2) (result i32)
+ (block $label$8 (result i32)
+ (block $label$11 (result i32)
+ (block $label$14
+ (br_if $label$8
+ (br $label$11
+ (i32.const 103)
+ )
+ )
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/remove-unused-brs.wast b/test/passes/remove-unused-brs.wast
index d694bd4d0..e7c221fa4 100644
--- a/test/passes/remove-unused-brs.wast
+++ b/test/passes/remove-unused-brs.wast
@@ -919,5 +919,18 @@
)
)
)
+ (func $untaken-br-with-concrete-last-element (result i32)
+ (block $label$8 (result i32)
+ (block $label$11 (result i32)
+ (block $label$14
+ (br_if $label$14
+ (br $label$11
+ (i32.const 103)
+ )
+ )
+ )
+ )
+ )
+ )
)