diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-10 19:02:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-11 13:48:05 -0700 |
commit | 2b195ce5d72da0786183c169d6e56e1d0c60042e (patch) | |
tree | b95012b316c6231a590efae317ffbdb94ba53da8 | |
parent | 2df4d555ae85e0748a26e7f2a278a64f13281c50 (diff) | |
download | binaryen-2b195ce5d72da0786183c169d6e56e1d0c60042e.tar.gz binaryen-2b195ce5d72da0786183c169d6e56e1d0c60042e.tar.bz2 binaryen-2b195ce5d72da0786183c169d6e56e1d0c60042e.zip |
add more simplify-locals tests
-rw-r--r-- | test/passes/simplify-locals.txt | 25 | ||||
-rw-r--r-- | test/passes/simplify-locals.wast | 23 |
2 files changed, 46 insertions, 2 deletions
diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index dd7366d6a..399eed554 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -266,7 +266,7 @@ (get_local $b) ) ) - (func $memories (param $i2 i32) (param $i3 i32) + (func $memories (param $i2 i32) (param $i3 i32) (param $bi2 i32) (param $bi3 i32) (param $ci3 i32) (param $di3 i32) (nop) (i32.store8 (get_local $i2) @@ -274,5 +274,28 @@ (i32.const 1) ) ) + (nop) + (i32.store8 + (set_local $bi3 + (i32.const 1) + ) + (get_local $bi3) + ) + (nop) + (i32.store8 + (get_local $bi3) + (set_local $ci3 + (get_local $bi3) + ) + ) + (set_local $di3 + (set_local $bi3 + (i32.const 123) + ) + ) + (i32.store8 + (get_local $bi3) + (get_local $di3) + ) ) ) diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index 70d798ea2..48fb4d910 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -158,7 +158,7 @@ (get_local $b) ) ) - (func $memories (param $i2 i32) (param $i3 i32) + (func $memories (param $i2 i32) (param $i3 i32) (param $bi2 i32) (param $bi3 i32) (param $ci3 i32) (param $di3 i32) (set_local $i3 (i32.const 1) ) @@ -166,6 +166,27 @@ (get_local $i2) (get_local $i3) ) + (set_local $bi3 + (i32.const 1) + ) + (i32.store8 + (get_local $bi3) + (get_local $bi3) + ) + (set_local $ci3 + (get_local $bi3) + ) + (i32.store8 + (get_local $bi3) + (get_local $ci3) + ) + (set_local $di3 + (set_local $bi3 (i32.const 123)) + ) + (i32.store8 + (get_local $bi3) + (get_local $di3) + ) ) ) |