diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-02-14 08:06:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-14 08:06:52 -0800 |
commit | e97d485bb1f1818e2c2118d28507d49cb61ea57b (patch) | |
tree | e1ef9db3f9b95ba4d279ec6c421e0b1c4f2a3b22 /test/example | |
parent | 41faf2409f3e1d8d2dcaf456141f4ce6ac6a3d75 (diff) | |
download | binaryen-e97d485bb1f1818e2c2118d28507d49cb61ea57b.tar.gz binaryen-e97d485bb1f1818e2c2118d28507d49cb61ea57b.tar.bz2 binaryen-e97d485bb1f1818e2c2118d28507d49cb61ea57b.zip |
More simple math opts (#1414)
* optimize more simple math operations: mul of 0, or of 0, and of 0, mul of 1, mul of a power of 2, urem of a power of 2
* fix asm2wasm callImport parsing: the optimizer may get rid of the added offset to a function table
* update js builds
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/relooper-fuzz.txt | 8 | ||||
-rw-r--r-- | test/example/relooper-fuzz1.txt | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt index e53ca13ce..aeee64325 100644 --- a/test/example/relooper-fuzz.txt +++ b/test/example/relooper-fuzz.txt @@ -449,9 +449,9 @@ (i32.const 0) ) (if - (i32.rem_u + (i32.and (call $check) - (i32.const 2) + (i32.const 1) ) (block (call $print @@ -480,9 +480,9 @@ ) (br_if $shape$3$continue (i32.eqz - (i32.rem_u + (i32.and (call $check) - (i32.const 2) + (i32.const 1) ) ) ) diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt index 6d0bba603..5da2f5ff3 100644 --- a/test/example/relooper-fuzz1.txt +++ b/test/example/relooper-fuzz1.txt @@ -438,17 +438,17 @@ (i32.const 0) ) (if - (i32.rem_u + (i32.and (tee_local $0 (call $check) ) - (i32.const 4) + (i32.const 3) ) (if (i32.eq - (i32.rem_u + (i32.and (get_local $0) - (i32.const 4) + (i32.const 3) ) (i32.const 2) ) @@ -470,9 +470,9 @@ (i32.const 2) ) (br_if $block$10$break - (i32.rem_u + (i32.and (call $check) - (i32.const 2) + (i32.const 1) ) ) ) |