diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/vacuum.txt | 26 | ||||
-rw-r--r-- | test/passes/vacuum.wast | 49 |
2 files changed, 75 insertions, 0 deletions
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index 2d274a6d7..04a04efc0 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -181,4 +181,30 @@ (func $drop-get-global (type $0) (call $drop-get-global) ) + (func $relooperJumpThreading1 (type $0) + (local $$vararg_ptr5 i32) + (local $$11 i32) + (loop $while-in$1 + (drop + (block $jumpthreading$outer$8 + (block $jumpthreading$inner$8 + (br $jumpthreading$outer$8 + (i32.const 0) + ) + ) + (i32.store + (get_local $$vararg_ptr5) + (get_local $$11) + ) + (i32.const 0) + ) + ) + ) + ) + (func $relooperJumpThreading2 (type $0) + (nop) + ) + (func $relooperJumpThreading3 (type $0) + (nop) + ) ) diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast index 5d443380f..84f3eeb6f 100644 --- a/test/passes/vacuum.wast +++ b/test/passes/vacuum.wast @@ -363,4 +363,53 @@ ) ) ) + (func $relooperJumpThreading1 + (local $$vararg_ptr5 i32) + (local $$11 i32) + (loop $while-in$1 + (drop + (block $jumpthreading$outer$8 + (block $jumpthreading$inner$8 + (br $jumpthreading$outer$8 ;; the rest is dead in the outer block, but be careful to leave the return value! + (i32.const 0) + ) + ) + (i32.store + (get_local $$vararg_ptr5) + (get_local $$11) + ) + (i32.const 0) + ) + ) + ) + ) + (func $relooperJumpThreading2 + (loop $while-in$1 + (drop + (block $jumpthreading$outer$8 + (block $jumpthreading$inner$8 + (br $jumpthreading$outer$8 + (i32.const 0) + ) + ) + (i32.const 0) + ) + ) + ) + ) + (func $relooperJumpThreading3 + (loop $while-in$1 + (drop + (block $jumpthreading$outer$8 + (br $jumpthreading$outer$8 ;; code after this is dead, can kill it, but preserve the return value at the end! + (i32.const 0) + ) + (drop (i32.const 3)) + (drop (i32.const 2)) + (drop (i32.const 1)) + (i32.const 0) + ) + ) + ) + ) ) |