diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-08-01 08:06:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-01 08:06:04 -0700 |
commit | 5a07a930ad51003411b2bc827ea9bf08728ecc5a (patch) | |
tree | 7a599caa2977464e4b056c59457d17c4d7e1bd91 /test/passes/optimize-instructions.txt | |
parent | 76751bf1f9df4eb2ee6c216744af9ed1e097132e (diff) | |
parent | 44154e3d0895e2f5688861f0bc8d62af71ee6b6d (diff) | |
download | binaryen-5a07a930ad51003411b2bc827ea9bf08728ecc5a.tar.gz binaryen-5a07a930ad51003411b2bc827ea9bf08728ecc5a.tar.bz2 binaryen-5a07a930ad51003411b2bc827ea9bf08728ecc5a.zip |
Merge pull request #1116 from WebAssembly/fuzz
Fuzz fixes
Diffstat (limited to 'test/passes/optimize-instructions.txt')
-rw-r--r-- | test/passes/optimize-instructions.txt | 73 |
1 files changed, 64 insertions, 9 deletions
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index 604c9c3ea..a399a9096 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -6,6 +6,7 @@ (type $4 (func (param i32 i32))) (type $5 (func (param i32))) (type $6 (func (param i32 i32) (result i32))) + (type $7 (func (param i64) (result i64))) (memory $0 0) (export "load-off-2" (func $load-off-2)) (func $f (type $0) (param $i1 i32) (param $i2 i64) @@ -462,16 +463,16 @@ (i32.const 4) (get_local $0) ) - (i32.store - (i32.const 0) + (i32.store offset=2 + (i32.const -2) (get_local $0) ) (i32.store (i32.const 25) (get_local $0) ) - (i32.store - (i32.const -23) + (i32.store offset=2 + (i32.const -25) (get_local $0) ) (drop @@ -734,7 +735,7 @@ (i32.shr_s (i32.shl (i32.const 32) - (i32.const 59) + (i32.const 27) ) (i32.const 24) ) @@ -805,7 +806,7 @@ (i32.const -1) (i32.const 2147483647) ) - (i32.const 32) + (i32.const 31) ) ) (drop @@ -1083,19 +1084,19 @@ (drop (i32.shl (get_local $0) - (i32.const 211) + (i32.const 19) ) ) (drop (i32.shr_s (get_local $0) - (i32.const 211) + (i32.const 19) ) ) (drop (i32.shr_u (get_local $0) - (i32.const 211) + (i32.const 19) ) ) (drop @@ -2006,4 +2007,58 @@ (i32.const 1) ) ) + (func $neg-shifts-and-255 (type $2) (result i32) + (i32.and + (i32.shr_u + (i32.const -99) + (i32.const -32) + ) + (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) + ) + ) + (func $shifts-square-overflow (type $3) (param $x i32) (result i32) + (i32.shr_u + (i32.shr_u + (get_local $x) + (i32.const 65535) + ) + (i32.const 32767) + ) + ) + (func $shifts-square-no-overflow-small (type $3) (param $x i32) (result i32) + (i32.shr_u + (get_local $x) + (i32.const 9) + ) + ) + (func $shifts-square-overflow-64 (type $7) (param $x i64) (result i64) + (i64.shr_u + (i64.shr_u + (get_local $x) + (i64.const 65535) + ) + (i64.const 64767) + ) + ) + (func $shifts-square-no-overflow-small-64 (type $7) (param $x i64) (result i64) + (i64.shr_u + (get_local $x) + (i64.const 9) + ) + ) + (func $shifts-square-unreachable (type $3) (param $x i32) (result i32) + (i32.shr_u + (unreachable) + (i32.const 9) + ) + ) ) |