diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-04-11 00:49:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 00:49:51 -0700 |
commit | 4905c3d3b4be20a89920ea2a56c1868294e77b65 (patch) | |
tree | ef8d5f9ddc1490cced51c656708da0d20784871b /test/passes/simplify-locals.wast | |
parent | 6b517f6f70d5af72ed5d217a307a0b9b9284be24 (diff) | |
download | binaryen-4905c3d3b4be20a89920ea2a56c1868294e77b65.tar.gz binaryen-4905c3d3b4be20a89920ea2a56c1868294e77b65.tar.bz2 binaryen-4905c3d3b4be20a89920ea2a56c1868294e77b65.zip |
Bulk memory side effects (#1998)
Diffstat (limited to 'test/passes/simplify-locals.wast')
-rw-r--r-- | test/passes/simplify-locals.wast | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index 1f25f5427..34a93d442 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -1546,3 +1546,112 @@ (call $tee-chain (local.get $x) (local.get $z) (local.get $t1) (local.get $t2) (local.get $t3)) ) ) +(module + (memory 256 256) + (data passive "hello, there!") + (func $memory-init-load + (local $x i32) + (local.set $x + (i32.load (i32.const 0)) + ) + (memory.init 0 (i32.const 0) (i32.const 0) (i32.const 5)) + (drop + (local.get $x) + ) + ) + (func $memory-init-store + (local $x i32) + (local.set $x + (block i32 + (i32.store (i32.const 0) (i32.const 42)) + (i32.const 0) + ) + ) + (memory.init 0 (i32.const 0) (i32.const 0) (i32.const 5)) + (drop + (local.get $x) + ) + ) + (func $memory-copy-load + (local $x i32) + (local.set $x + (i32.load (i32.const 0)) + ) + (memory.copy (i32.const 0) (i32.const 8) (i32.const 8)) + (drop + (local.get $x) + ) + ) + (func $memory-copy-store + (local $x i32) + (local.set $x + (block i32 + (i32.store (i32.const 0) (i32.const 42)) + (i32.const 0) + ) + ) + (memory.copy (i32.const 0) (i32.const 8) (i32.const 8)) + (drop + (local.get $x) + ) + ) + (func $memory-fill-load + (local $x i32) + (local.set $x + (i32.load (i32.const 0)) + ) + (memory.fill (i32.const 0) (i32.const 42) (i32.const 8)) + (drop + (local.get $x) + ) + ) + (func $memory-fill-store + (local $x i32) + (local.set $x + (block i32 + (i32.store (i32.const 0) (i32.const 42)) + (i32.const 0) + ) + ) + (memory.fill (i32.const 0) (i32.const 8) (i32.const 8)) + (drop + (local.get $x) + ) + ) + (func $data-drop-load + (local $x i32) + (local.set $x + (i32.load (i32.const 0)) + ) + (data.drop 0) + (drop + (local.get $x) + ) + ) + (func $data-drop-store + (local $x i32) + (local.set $x + (block i32 + (i32.store (i32.const 0) (i32.const 42)) + (i32.const 0) + ) + ) + (data.drop 0) + (drop + (local.get $x) + ) + ) + (func $data-drop-memory-init + (local $x i32) + (local.set $x + (block i32 + (memory.init 0 (i32.const 0) (i32.const 0) (i32.const 5)) + (i32.const 0) + ) + ) + (data.drop 0) + (drop + (local.get $x) + ) + ) +) |