diff options
-rw-r--r-- | test/passes/reorder-locals.txt | 11 | ||||
-rw-r--r-- | test/passes/reorder-locals.wast | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/passes/reorder-locals.txt b/test/passes/reorder-locals.txt index 63c98f674..b6ea71e6f 100644 --- a/test/passes/reorder-locals.txt +++ b/test/passes/reorder-locals.txt @@ -41,4 +41,15 @@ (get_local $b) ) ) + (func $zero + (local $b i32) + (local $c i32) + (local $a i32) + (get_local $b) + ) + (func $null + (local $c i32) + (local $a i32) + (nop) + ) ) diff --git a/test/passes/reorder-locals.wast b/test/passes/reorder-locals.wast index ff840e3ca..832889a78 100644 --- a/test/passes/reorder-locals.wast +++ b/test/passes/reorder-locals.wast @@ -14,5 +14,16 @@ (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b)) ) + (func $zero + (local $a i32) + (local $b i32) + (local $c i32) + (get_local $b) ;; a and c are untouched + ) + (func $null + (local $a i32) + (local $c i32) + (nop) ;; a and c are untouched + ) ) |