diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-05-23 19:59:06 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-23 19:59:06 -0700 |
commit | 3a993f98daefc9a851824f5099b76b4a427f81ed (patch) | |
tree | 045fdedd5b5fab72f5ae5de135297b3fe2faa39f /test | |
parent | 57ec2122cf0971d7869e56699b768026268745ea (diff) | |
download | binaryen-3a993f98daefc9a851824f5099b76b4a427f81ed.tar.gz binaryen-3a993f98daefc9a851824f5099b76b4a427f81ed.tar.bz2 binaryen-3a993f98daefc9a851824f5099b76b4a427f81ed.zip |
add a pass to drop return values in set_local and store (#539)
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/drop-return-values.txt | 31 | ||||
-rw-r--r-- | test/passes/drop-return-values.wast | 9 |
2 files changed, 40 insertions, 0 deletions
diff --git a/test/passes/drop-return-values.txt b/test/passes/drop-return-values.txt new file mode 100644 index 000000000..8f372ea24 --- /dev/null +++ b/test/passes/drop-return-values.txt @@ -0,0 +1,31 @@ +(module + (memory 10) + (func $0 + (local $x i32) + (local $1 i32) + (i32.add + (block + (set_local $x + (i32.const 10) + ) + (get_local $x) + ) + (i32.const 20) + ) + (i32.add + (block + (block + (set_local $1 + (i32.const 40) + ) + (i32.store + (i32.const 30) + (get_local $1) + ) + ) + (get_local $1) + ) + (i32.const 50) + ) + ) +) diff --git a/test/passes/drop-return-values.wast b/test/passes/drop-return-values.wast new file mode 100644 index 000000000..76463cc8e --- /dev/null +++ b/test/passes/drop-return-values.wast @@ -0,0 +1,9 @@ +(module + (memory 10) + (func + (local $x i32) + (i32.add (set_local $x (i32.const 10)) (i32.const 20)) + (i32.add (i32.store (i32.const 30) (i32.const 40)) (i32.const 50)) + ) +) + |