diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-23 20:34:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-23 20:34:56 -0700 |
commit | b6469ed600832887e8874d1a0407b993dd2c03e8 (patch) | |
tree | 325cafc1625265a8d7569a4f2b2a45910e4040fb /test/unit.fromasm.no-opts | |
parent | dc82f588309f1a4413be18460159699df74661c4 (diff) | |
parent | 7d5180a5b3e369634dbc1442117068d332d71049 (diff) | |
download | binaryen-b6469ed600832887e8874d1a0407b993dd2c03e8.tar.gz binaryen-b6469ed600832887e8874d1a0407b993dd2c03e8.tar.bz2 binaryen-b6469ed600832887e8874d1a0407b993dd2c03e8.zip |
Merge pull request #710 from WebAssembly/autodrop-fix
Autodrop fixes
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r-- | test/unit.fromasm.no-opts | 75 |
1 files changed, 57 insertions, 18 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 0684c1464..21e7ea79e 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -862,14 +862,14 @@ ) (func $smallIf (block $do-once$0 - (drop - (if - (i32.const 2) + (if + (i32.const 2) + (drop (call $lb (i32.const 3) ) - (br $do-once$0) ) + (br $do-once$0) ) (nop) ) @@ -936,23 +936,23 @@ ) (func $breakThroughMany (param $$s i32) (block $label$break$L1 - (drop - (if - (get_local $$s) - (loop $while-in$2 - (block $while-out$1 - (if - (i32.eqz - (get_local $$s) - ) - (br $label$break$L1) - ) - (call $zeroInit - (i32.const 0) + (if + (get_local $$s) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (get_local $$s) ) - (br $while-in$2) + (br $label$break$L1) + ) + (call $zeroInit + (i32.const 0) ) + (br $while-in$2) ) + ) + (drop (i32.const 1337) ) ) @@ -1630,4 +1630,43 @@ (get_local $temp) ) ) + (func $dropIgnoredImportInIf (param $$0 i32) (param $$1 i32) (param $$2 i32) + (block $do-once$0 + (if + (get_local $$0) + (block + (set_local $$0 + (i32.const 1) + ) + (drop + (call $lb + (get_local $$2) + ) + ) + ) + (br $do-once$0) + ) + (nop) + ) + (return) + ) + (func $dropIgnoredImportsInIf (param $$0 i32) (param $$1 i32) (param $$2 i32) + (block $do-once$0 + (if + (get_local $$0) + (drop + (call $lb + (get_local $$1) + ) + ) + (drop + (call $lb + (get_local $$2) + ) + ) + ) + (nop) + ) + (return) + ) ) |