diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-06 10:32:02 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 18:41:22 -0700 |
commit | 8f0726cc87494f6721baab55ec035fa3facae0e3 (patch) | |
tree | 18ab09d83788f2121cd4117cdb373698f4286c1b /test/example | |
parent | 87f65f1623983bfc516ff4b222a3bb2537971837 (diff) | |
download | binaryen-8f0726cc87494f6721baab55ec035fa3facae0e3.tar.gz binaryen-8f0726cc87494f6721baab55ec035fa3facae0e3.tar.bz2 binaryen-8f0726cc87494f6721baab55ec035fa3facae0e3.zip |
use eqz as an optimization
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/relooper-fuzz.txt | 39 | ||||
-rw-r--r-- | test/example/relooper-fuzz1.txt | 29 |
2 files changed, 25 insertions, 43 deletions
diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index 151360306..b46932009 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -449,15 +449,9 @@ (i32.const 0) ) (if - (i32.eq - (i32.rem_u - (call $check) - (i32.const 2) - ) - (i32.const 0) - ) - (set_local $0 - (i32.const 6) + (i32.rem_u + (call $check) + (i32.const 2) ) (block (call_import $print @@ -467,6 +461,9 @@ (call $check) ) ) + (set_local $0 + (i32.const 6) + ) ) (loop $shape$3$continue (if @@ -482,20 +479,17 @@ (i32.const 5) ) (if - (i32.eq - (i32.rem_u - (call $check) - (i32.const 2) - ) - (i32.const 0) + (i32.rem_u + (call $check) + (i32.const 2) ) - (br $shape$3$continue) (block (set_local $0 (i32.const 6) ) (br $shape$3$continue) ) + (br $shape$3$continue) ) ) ) @@ -503,16 +497,12 @@ (i32.const 4) ) (if - (i32.eq - (i32.rem_u - (tee_local $1 - (call $check) - ) - (i32.const 3) + (i32.rem_u + (tee_local $1 + (call $check) ) - (i32.const 0) + (i32.const 3) ) - (br $shape$3$continue) (if (i32.eq (i32.rem_u @@ -528,6 +518,7 @@ (br $shape$3$continue) ) ) + (br $shape$3$continue) ) (call_import $print (i32.const 2) diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index be8130228..b4ad8b5a1 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -438,14 +438,11 @@ (i32.const 0) ) (if - (i32.ne - (i32.rem_u - (tee_local $0 - (call $check) - ) - (i32.const 4) + (i32.rem_u + (tee_local $0 + (call $check) ) - (i32.const 0) + (i32.const 4) ) (if (i32.eq @@ -460,12 +457,9 @@ (i32.const 7) ) (br_if $block$10$break - (i32.ne - (i32.rem_u - (call $check) - (i32.const 3) - ) - (i32.const 0) + (i32.rem_u + (call $check) + (i32.const 3) ) ) ) @@ -476,12 +470,9 @@ (i32.const 2) ) (br_if $block$10$break - (i32.ne - (i32.rem_u - (call $check) - (i32.const 2) - ) - (i32.const 0) + (i32.rem_u + (call $check) + (i32.const 2) ) ) ) |