diff options
Diffstat (limited to 'test/passes')
-rw-r--r-- | test/passes/flatten_i64-to-i32-lowering.txt | 275 | ||||
-rw-r--r-- | test/passes/flatten_i64-to-i32-lowering.wast | 13 |
2 files changed, 288 insertions, 0 deletions
diff --git a/test/passes/flatten_i64-to-i32-lowering.txt b/test/passes/flatten_i64-to-i32-lowering.txt index 52995f993..967610194 100644 --- a/test/passes/flatten_i64-to-i32-lowering.txt +++ b/test/passes/flatten_i64-to-i32-lowering.txt @@ -1,6 +1,8 @@ (module (type $FUNCSIG$j (func (result i32))) + (type $1 (func)) (import "env" "func" (func $import (result i32))) + (memory $0 1 1) (global $i64toi32_i32$HIGH_BITS (mut i32) (i32.const 0)) (func $defined (; 1 ;) (type $FUNCSIG$j) (result i32) (local $0 i32) @@ -141,6 +143,279 @@ ) (unreachable) ) + (func $mem (; 5 ;) (type $1) + (local $0 i32) + (local $0$hi i32) + (local $1 i32) + (local $1$hi i32) + (local $2 i32) + (local $2$hi i32) + (local $3 i32) + (local $3$hi i32) + (local $4 i32) + (local $4$hi i32) + (local $i64toi32_i32$0 i32) + (local $i64toi32_i32$1 i32) + (local $i64toi32_i32$2 i32) + (block + (block + (local.set $0 + (block (result i32) + (local.set $i64toi32_i32$2 + (i32.const 0) + ) + (local.set $i64toi32_i32$0 + (i32.load + (local.get $i64toi32_i32$2) + ) + ) + (local.set $i64toi32_i32$1 + (i32.load offset=4 + (local.get $i64toi32_i32$2) + ) + ) + (local.get $i64toi32_i32$0) + ) + ) + (local.set $0$hi + (local.get $i64toi32_i32$1) + ) + ) + (drop + (block (result i32) + (local.set $i64toi32_i32$1 + (local.get $0$hi) + ) + (local.get $0) + ) + ) + (nop) + (block + (local.set $1 + (block (result i32) + (local.set $i64toi32_i32$2 + (i32.const 0) + ) + (local.set $i64toi32_i32$1 + (i32.load + (local.get $i64toi32_i32$2) + ) + ) + (local.set $i64toi32_i32$0 + (i32.load offset=4 + (local.get $i64toi32_i32$2) + ) + ) + (local.get $i64toi32_i32$1) + ) + ) + (local.set $1$hi + (local.get $i64toi32_i32$0) + ) + ) + (drop + (block (result i32) + (local.set $i64toi32_i32$0 + (local.get $1$hi) + ) + (local.get $1) + ) + ) + (nop) + (block + (local.set $2 + (block (result i32) + (local.set $i64toi32_i32$2 + (i32.const 0) + ) + (local.set $i64toi32_i32$0 + (i32.load align=2 + (local.get $i64toi32_i32$2) + ) + ) + (local.set $i64toi32_i32$1 + (i32.load offset=4 align=2 + (local.get $i64toi32_i32$2) + ) + ) + (local.get $i64toi32_i32$0) + ) + ) + (local.set $2$hi + (local.get $i64toi32_i32$1) + ) + ) + (drop + (block (result i32) + (local.set $i64toi32_i32$1 + (local.get $2$hi) + ) + (local.get $2) + ) + ) + (nop) + (block + (local.set $3 + (block (result i32) + (local.set $i64toi32_i32$2 + (i32.const 0) + ) + (local.set $i64toi32_i32$1 + (i32.load align=1 + (local.get $i64toi32_i32$2) + ) + ) + (local.set $i64toi32_i32$0 + (i32.load offset=4 align=1 + (local.get $i64toi32_i32$2) + ) + ) + (local.get $i64toi32_i32$1) + ) + ) + (local.set $3$hi + (local.get $i64toi32_i32$0) + ) + ) + (drop + (block (result i32) + (local.set $i64toi32_i32$0 + (local.get $3$hi) + ) + (local.get $3) + ) + ) + (nop) + (block + (local.set $4 + (block (result i32) + (local.set $i64toi32_i32$2 + (i32.const 0) + ) + (local.set $i64toi32_i32$0 + (i32.load + (local.get $i64toi32_i32$2) + ) + ) + (local.set $i64toi32_i32$1 + (i32.load offset=4 + (local.get $i64toi32_i32$2) + ) + ) + (local.get $i64toi32_i32$0) + ) + ) + (local.set $4$hi + (local.get $i64toi32_i32$1) + ) + ) + (drop + (block (result i32) + (local.set $i64toi32_i32$1 + (local.get $4$hi) + ) + (local.get $4) + ) + ) + (nop) + (block + (local.set $i64toi32_i32$0 + (i32.const 0) + ) + (i32.store + (local.get $i64toi32_i32$0) + (block (result i32) + (local.set $i64toi32_i32$1 + (i32.const 0) + ) + (i32.const 1) + ) + ) + (i32.store offset=4 + (local.get $i64toi32_i32$0) + (local.get $i64toi32_i32$1) + ) + ) + (nop) + (block + (local.set $i64toi32_i32$0 + (i32.const 0) + ) + (i32.store + (local.get $i64toi32_i32$0) + (block (result i32) + (local.set $i64toi32_i32$1 + (i32.const 0) + ) + (i32.const 2) + ) + ) + (i32.store offset=4 + (local.get $i64toi32_i32$0) + (local.get $i64toi32_i32$1) + ) + ) + (nop) + (block + (local.set $i64toi32_i32$0 + (i32.const 0) + ) + (i32.store align=2 + (local.get $i64toi32_i32$0) + (block (result i32) + (local.set $i64toi32_i32$1 + (i32.const 0) + ) + (i32.const 3) + ) + ) + (i32.store offset=4 align=2 + (local.get $i64toi32_i32$0) + (local.get $i64toi32_i32$1) + ) + ) + (nop) + (block + (local.set $i64toi32_i32$0 + (i32.const 0) + ) + (i32.store align=1 + (local.get $i64toi32_i32$0) + (block (result i32) + (local.set $i64toi32_i32$1 + (i32.const 0) + ) + (i32.const 4) + ) + ) + (i32.store offset=4 align=1 + (local.get $i64toi32_i32$0) + (local.get $i64toi32_i32$1) + ) + ) + (nop) + (block + (local.set $i64toi32_i32$0 + (i32.const 0) + ) + (i32.store + (local.get $i64toi32_i32$0) + (block (result i32) + (local.set $i64toi32_i32$1 + (i32.const 0) + ) + (i32.const 5) + ) + ) + (i32.store offset=4 + (local.get $i64toi32_i32$0) + (local.get $i64toi32_i32$1) + ) + ) + (nop) + ) + (nop) + ) ) (module (type $0 (func (param i32 i32))) diff --git a/test/passes/flatten_i64-to-i32-lowering.wast b/test/passes/flatten_i64-to-i32-lowering.wast index 2f3bb37ca..9b75e683f 100644 --- a/test/passes/flatten_i64-to-i32-lowering.wast +++ b/test/passes/flatten_i64-to-i32-lowering.wast @@ -1,4 +1,5 @@ (module + (memory 1 1) (import "env" "func" (func $import (result i64))) (func $defined (result i64) (i64.add (i64.const 1) (i64.const 2)) @@ -24,6 +25,18 @@ (unreachable) ) ) + (func $mem + (drop (i64.load align=8 (i32.const 0))) + (drop (i64.load align=4 (i32.const 0))) + (drop (i64.load align=2 (i32.const 0))) + (drop (i64.load align=1 (i32.const 0))) + (drop (i64.load (i32.const 0))) + (i64.store align=8 (i32.const 0) (i64.const 1)) + (i64.store align=4 (i32.const 0) (i64.const 2)) + (i64.store align=2 (i32.const 0) (i64.const 3)) + (i64.store align=1 (i32.const 0) (i64.const 4)) + (i64.store (i32.const 0) (i64.const 5)) + ) ) (module (global $f (mut i64) (i64.const 0x12345678ABCDEFAF)) |