diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-01-17 21:20:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 21:20:53 -0800 |
commit | 14cb0c01ee22fbcd2923db0502e11b1fc51df05d (patch) | |
tree | eb4c6c854a803482c2891e7235ea8700886d289c /test/passes/optimize-instructions.txt | |
parent | 692069c6eef63754c27e815fd948fea6185d7619 (diff) | |
download | binaryen-14cb0c01ee22fbcd2923db0502e11b1fc51df05d.tar.gz binaryen-14cb0c01ee22fbcd2923db0502e11b1fc51df05d.tar.bz2 binaryen-14cb0c01ee22fbcd2923db0502e11b1fc51df05d.zip |
optimize out 0-x, a zero only used to negate an int, when possible (#1365)
Diffstat (limited to 'test/passes/optimize-instructions.txt')
-rw-r--r-- | test/passes/optimize-instructions.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index 50858c81d..88709e2fe 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -2264,6 +2264,38 @@ ) ) ) + (func $subzero1 (; 56 ;) (type $3) (param $0 i32) (result i32) + (i32.sub + (i32.const 32) + (i32.clz + (get_local $0) + ) + ) + ) + (func $subzero2 (; 57 ;) (type $3) (param $0 i32) (result i32) + (i32.sub + (i32.const 32) + (i32.clz + (get_local $0) + ) + ) + ) + (func $subzero3 (; 58 ;) (type $6) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (get_local $1) + (i32.clz + (get_local $0) + ) + ) + ) + (func $subzero4 (; 59 ;) (type $6) (param $0 i32) (param $1 i32) (result i32) + (i32.sub + (get_local $0) + (i32.clz + (get_local $1) + ) + ) + ) ) (module (type $0 (func)) |