diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/memory-packing_all-features.txt (renamed from test/passes/memory-packing.txt) | 27 | ||||
-rw-r--r-- | test/passes/memory-packing_all-features.wast (renamed from test/passes/memory-packing.wast) | 21 |
2 files changed, 47 insertions, 1 deletions
diff --git a/test/passes/memory-packing.txt b/test/passes/memory-packing_all-features.txt index 9805375f1..bf04ae91b 100644 --- a/test/passes/memory-packing.txt +++ b/test/passes/memory-packing_all-features.txt @@ -18,3 +18,30 @@ (import "env" "memory" (memory $0 2048 2048)) (import "env" "memoryBase" (global $memoryBase i32)) ) +(module + (type $FUNCSIG$v (func)) + (memory $0 1 1) + (func $foo (; 0 ;) (type $FUNCSIG$v) + (block + (drop + (i32.const 0) + ) + (drop + (i32.const 0) + ) + (drop + (i32.const 0) + ) + (unreachable) + ) + (unreachable) + ) + (func $bar (; 1 ;) (type $FUNCSIG$v) + (drop + (loop $loop-in (result i32) + (unreachable) + (i32.const 42) + ) + ) + ) +) diff --git a/test/passes/memory-packing.wast b/test/passes/memory-packing_all-features.wast index 6cdd453d1..e43bd0314 100644 --- a/test/passes/memory-packing.wast +++ b/test/passes/memory-packing_all-features.wast @@ -17,4 +17,23 @@ (import "env" "memoryBase" (global $memoryBase i32)) (data (i32.const 4066) "") ;; empty ) - +(module + (memory $0 1 1) + (data (i32.const 0) "") + (func $foo + (memory.init 0 + (i32.const 0) + (i32.const 0) + (i32.const 0) + ) + (data.drop 0) + ) + (func $bar + (drop + (loop (result i32) + (data.drop 0) + (i32.const 42) + ) + ) + ) +) |