summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai (kripken) <alonzakai@gmail.com>2017-07-10 15:43:21 -0700
committerAlon Zakai (kripken) <alonzakai@gmail.com>2017-07-11 11:07:45 -0700
commit5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c (patch)
tree1e4a19d462d105d006f2413e10f2b7cd91d42d42 /test
parent987003944456c3d04f74c12067ac950feca1a81e (diff)
downloadbinaryen-5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c.tar.gz
binaryen-5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c.tar.bz2
binaryen-5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c.zip
properly handle if arm removal in vacuum
Diffstat (limited to 'test')
-rw-r--r--test/passes/vacuum.txt12
-rw-r--r--test/passes/vacuum.wast30
2 files changed, 42 insertions, 0 deletions
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt
index 30474280e..cb85838ac 100644
--- a/test/passes/vacuum.txt
+++ b/test/passes/vacuum.txt
@@ -235,4 +235,16 @@
)
)
)
+ (func $executed-if-in-block (type $0)
+ (unreachable)
+ )
+ (func $executed-if-in-block2 (type $0)
+ (unreachable)
+ )
+ (func $executed-if-in-block3 (type $0)
+ (block $label$0
+ (br $label$0)
+ )
+ (unreachable)
+ )
)
diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast
index 594554846..2b8486384 100644
--- a/test/passes/vacuum.wast
+++ b/test/passes/vacuum.wast
@@ -534,4 +534,34 @@
(f64.const 2097914503796645752267195e31)
)
)
+ (func $executed-if-in-block
+ (block $label$0
+ (if
+ (i32.const 170996275)
+ (unreachable)
+ (br $label$0)
+ )
+ )
+ (unreachable)
+ )
+ (func $executed-if-in-block2
+ (block $label$0
+ (if
+ (i32.const 170996275)
+ (nop)
+ (br $label$0)
+ )
+ )
+ (unreachable)
+ )
+ (func $executed-if-in-block3
+ (block $label$0
+ (if
+ (i32.const 170996275)
+ (br $label$0)
+ (nop)
+ )
+ )
+ (unreachable)
+ )
)