diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-04-11 18:46:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 18:46:48 -0700 |
commit | a9d59bd033e98d6399a7efab81a57aafcf241be3 (patch) | |
tree | ea52e4acc7439caf5fd49b0ab27018792146d807 /test/passes/optimize-instructions.txt | |
parent | 61388bbd1fe6ef472e656298483efa2d81cd9ed3 (diff) | |
download | binaryen-a9d59bd033e98d6399a7efab81a57aafcf241be3.tar.gz binaryen-a9d59bd033e98d6399a7efab81a57aafcf241be3.tar.bz2 binaryen-a9d59bd033e98d6399a7efab81a57aafcf241be3.zip |
More math opts (#1507)
`xor` of 0, `and` and `or` of -1
Diffstat (limited to 'test/passes/optimize-instructions.txt')
-rw-r--r-- | test/passes/optimize-instructions.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index b1b4ce2d2..bc7221d3f 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -2850,6 +2850,33 @@ (i32.const 1) ) ) + (func $all_ones (; 68 ;) (type $0) (param $x i32) (param $y i64) + (drop + (get_local $x) + ) + (drop + (i32.const -1) + ) + (drop + (i32.or + (tee_local $x + (i32.const 1337) + ) + (i32.const -1) + ) + ) + (drop + (get_local $y) + ) + (drop + (i64.const -1) + ) + ) + (func $xor (; 69 ;) (type $0) (param $x i32) (param $y i64) + (drop + (get_local $x) + ) + ) ) (module (type $0 (func)) |