diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-07-28 15:41:10 -0700 |
---|---|---|
committer | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-07-29 19:18:54 -0700 |
commit | bd7f7ca58a93f438bd278e6ecb13afb685e5ed6e (patch) | |
tree | 55d612d534d939d03079810c86ad737795a5b3d7 /test | |
parent | 1de12041904d5571ead6e64b5e51a3e26c8cfce1 (diff) | |
download | binaryen-bd7f7ca58a93f438bd278e6ecb13afb685e5ed6e.tar.gz binaryen-bd7f7ca58a93f438bd278e6ecb13afb685e5ed6e.tar.bz2 binaryen-bd7f7ca58a93f438bd278e6ecb13afb685e5ed6e.zip |
fix shl shift computation in getMaxBits
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/optimize-instructions.txt | 9 | ||||
-rw-r--r-- | test/passes/optimize-instructions.wast | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index 68359d9fb..f7948860c 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -2015,4 +2015,13 @@ (i32.const 255) ) ) + (func $neg-shifts-and-255-b (type $2) (result i32) + (i32.and + (i32.shl + (i32.const -2349025) + (i32.const -32) + ) + (i32.const 255) + ) + ) ) diff --git a/test/passes/optimize-instructions.wast b/test/passes/optimize-instructions.wast index 5300b8da8..107451b87 100644 --- a/test/passes/optimize-instructions.wast +++ b/test/passes/optimize-instructions.wast @@ -2442,4 +2442,13 @@ (i32.const 255) ) ) + (func $neg-shifts-and-255-b (result i32) + (i32.and + (i32.shl + (i32.const -2349025) + (i32.const -32) ;; this shift does nothing + ) + (i32.const 255) + ) + ) ) |