diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-11-14 16:38:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-14 16:38:53 -0800 |
commit | c1e75fe5c79a5e47c0c861fe19f78d8aa700bd16 (patch) | |
tree | 2356549744f0c9dc48063d9e317367c96fe8776e /test/emcc_hello_world.fromasm | |
parent | a259699cfed19b56469ccff88e1c76c7199e4a45 (diff) | |
download | binaryen-c1e75fe5c79a5e47c0c861fe19f78d8aa700bd16.tar.gz binaryen-c1e75fe5c79a5e47c0c861fe19f78d8aa700bd16.tar.bz2 binaryen-c1e75fe5c79a5e47c0c861fe19f78d8aa700bd16.zip |
MergeBlocks: canonicalize loop exit block position on the inside (#1736)
* move a loop exit block (block with a name, and one child which is the loop) into the loop in MergeBlocks, as that is better for other passes
Diffstat (limited to 'test/emcc_hello_world.fromasm')
-rw-r--r-- | test/emcc_hello_world.fromasm | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index f730a33e7..c243b2c8e 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -269,32 +269,32 @@ (local $2 i32) (block $__rjto$1 (block $__rjti$1 - (block $__rjti$0 - (loop $while-in - (br_if $__rjti$0 - (i32.eq - (i32.load8_u offset=687 - (get_local $1) - ) - (get_local $0) + (loop $while-in + (if + (i32.ne + (i32.load8_u offset=687 + (get_local $1) ) + (get_local $0) ) - (br_if $while-in - (i32.ne - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) + (block + (br_if $while-in + (i32.ne + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) ) + (i32.const 87) ) + ) + (set_local $1 (i32.const 87) ) + (br $__rjti$1) ) ) - (set_local $1 - (i32.const 87) - ) - (br $__rjti$1) ) (br_if $__rjti$1 (get_local $1) @@ -780,8 +780,8 @@ ) (block $__rjto$1 (block $__rjti$1 - (block $__rjti$0 - (loop $while-in + (loop $while-in + (block $__rjti$0 (if (i32.load (i32.const 16) |