diff options
-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) + ) ) ) |