summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-13 17:50:17 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-13 17:50:17 -0700
commitda407c06333857f153f9fd1dba780dfbc64677bc (patch)
tree81de6f348b5f21831a608732bcb304618b9a188d /test/unit.fromasm.no-opts
parent6cb6d65dd0c19dc5cba43d9367bcbdf691f80df3 (diff)
downloadbinaryen-da407c06333857f153f9fd1dba780dfbc64677bc.tar.gz
binaryen-da407c06333857f153f9fd1dba780dfbc64677bc.tar.bz2
binaryen-da407c06333857f153f9fd1dba780dfbc64677bc.zip
drop if-else arms as necessary
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r--test/unit.fromasm.no-opts48
1 files changed, 46 insertions, 2 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index d2c1beec7..846ef21a0 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -1578,9 +1578,53 @@
(br $while-in$1)
)
)
- (call $lb
- (i32.const 1)
+ (drop
+ (call $lb
+ (i32.const 1)
+ )
+ )
+ )
+ )
+ (func $jumpThreadDrop (result i32)
+ (local $label i32)
+ (local $temp i32)
+ (set_local $temp
+ (call_import $return_int)
+ )
+ (loop $while-in$1
+ (block $while-out$0
+ (set_local $label
+ (i32.const 14)
+ )
+ (br $while-out$0)
+ (br $while-in$1)
+ )
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 10)
+ )
+ (nop)
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 12)
+ )
+ (drop
+ (call_import $return_int)
+ )
+ (if
+ (i32.eq
+ (get_local $label)
+ (i32.const 14)
+ )
+ (nop)
+ )
)
)
+ (return
+ (get_local $temp)
+ )
)
)