summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-23 11:39:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:06 -0700
commit14fe75e4d6e670d2e7f3e171d3d96c340b574eab (patch)
tree26e4122a719e557c48a5d7d7f4de52bdc86054af /test/unit.fromasm.no-opts
parent1d3f3dda67c24c148dce13734c21cdab487ddc87 (diff)
downloadbinaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.tar.gz
binaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.tar.bz2
binaryen-14fe75e4d6e670d2e7f3e171d3d96c340b574eab.zip
when replacing an if with its condition (when it has no body), we must drop it
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r--test/unit.fromasm.no-opts21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index fbbc6e7ff..222e0fa65 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -938,6 +938,27 @@
(nop)
)
)
+ (func $ifChainEmpty (param $label i32) (result i32)
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 4)
+ )
+ (return
+ (i32.const 0)
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 7)
+ )
+ (nop)
+ )
+ )
+ (return
+ (i32.const 0)
+ )
+ )
(func $z
(nop)
)