diff options
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) + ) + ) ) |