summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-brs_shrink-level=1.txt
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-10-27 14:24:43 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-10-27 14:24:43 -0700
commitaf021c52634d66db1a3815f553602b9f9464e023 (patch)
treeb48249f3614dae74644ec99a9cd3d3d3a539138a /test/passes/remove-unused-brs_shrink-level=1.txt
parent498210cf0b006ff86e57bd6a68816bda2467266b (diff)
downloadbinaryen-af021c52634d66db1a3815f553602b9f9464e023.tar.gz
binaryen-af021c52634d66db1a3815f553602b9f9464e023.tar.bz2
binaryen-af021c52634d66db1a3815f553602b9f9464e023.zip
merge adjacent br_ifs
Diffstat (limited to 'test/passes/remove-unused-brs_shrink-level=1.txt')
-rw-r--r--test/passes/remove-unused-brs_shrink-level=1.txt78
1 files changed, 78 insertions, 0 deletions
diff --git a/test/passes/remove-unused-brs_shrink-level=1.txt b/test/passes/remove-unused-brs_shrink-level=1.txt
index 0356cc1da..68015f73f 100644
--- a/test/passes/remove-unused-brs_shrink-level=1.txt
+++ b/test/passes/remove-unused-brs_shrink-level=1.txt
@@ -16,4 +16,82 @@
)
)
)
+ (func $join-br_ifs (type $1)
+ (block $out
+ (br_if $out
+ (i32.or
+ (i32.const 1)
+ (i32.const 2)
+ )
+ )
+ (nop)
+ (br_if $out
+ (i32.const 3)
+ )
+ )
+ (block $out2
+ (block $out3
+ (br_if $out2
+ (i32.const 1)
+ )
+ (br_if $out3
+ (i32.const 2)
+ )
+ (br_if $out2
+ (i32.const 3)
+ )
+ )
+ (unreachable)
+ )
+ (block $out4
+ (block $out5
+ (br_if $out4
+ (i32.const 1)
+ )
+ (br_if $out5
+ (i32.or
+ (i32.const 2)
+ (i32.const 3)
+ )
+ )
+ (nop)
+ )
+ (unreachable)
+ )
+ (block $out6
+ (block $out7
+ (br_if $out6
+ (i32.or
+ (i32.const 1)
+ (i32.const 2)
+ )
+ )
+ (nop)
+ (br_if $out7
+ (i32.const 3)
+ )
+ )
+ (unreachable)
+ )
+ (if
+ (i32.eqz
+ (i32.or
+ (call $b14)
+ (i32.const 0)
+ )
+ )
+ (block
+ (nop)
+ (nop)
+ )
+ )
+ (block $out80
+ (br_if $out80
+ (i32.const 1)
+ )
+ (br_if $out80
+ (call $b14)
+ )
+ )
+ )
)