summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names.wast
diff options
context:
space:
mode:
authorAlon Zakai (kripken) <alonzakai@gmail.com>2017-08-04 19:43:20 -0700
committerAlon Zakai (kripken) <alonzakai@gmail.com>2017-08-05 13:45:43 -0700
commit6303389c7540aaa4e52b61c732cb65d04d6585e4 (patch)
tree2bbf4f78282e2248619f2f85d557fac378615ad2 /test/passes/remove-unused-names.wast
parent5b9fff4399b959a4af28a6c82e8ab9243898f360 (diff)
downloadbinaryen-6303389c7540aaa4e52b61c732cb65d04d6585e4.tar.gz
binaryen-6303389c7540aaa4e52b61c732cb65d04d6585e4.tar.bz2
binaryen-6303389c7540aaa4e52b61c732cb65d04d6585e4.zip
merge blocks in remove-unused-names only when their type is identical, so branches to them are interchangeable
Diffstat (limited to 'test/passes/remove-unused-names.wast')
-rw-r--r--test/passes/remove-unused-names.wast16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names.wast b/test/passes/remove-unused-names.wast
index 0f8fe4dcc..dc882cf4c 100644
--- a/test/passes/remove-unused-names.wast
+++ b/test/passes/remove-unused-names.wast
@@ -77,4 +77,20 @@
)
)
)
+ (func $merge-typed-with-unreachable-child (result i32)
+ (local $0 f32)
+ (block $label$0 (result i32)
+ (block $label$1
+ (br_if $label$1
+ (i32.const 0)
+ (br_if $label$0
+ (i32.const 0)
+ (br $label$0
+ (i32.const 0)
+ )
+ )
+ )
+ )
+ )
+ )
)