From 5447c53b612c8d0f0d0902efe5053f2f81bd1595 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 5 Nov 2016 16:38:34 -0700 Subject: add variants of simplify-locals with and without teeing and structural opts --- test/passes/simplify-locals-nostructure.wast | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/passes/simplify-locals-nostructure.wast (limited to 'test/passes/simplify-locals-nostructure.wast') diff --git a/test/passes/simplify-locals-nostructure.wast b/test/passes/simplify-locals-nostructure.wast new file mode 100644 index 000000000..fb938b8c5 --- /dev/null +++ b/test/passes/simplify-locals-nostructure.wast @@ -0,0 +1,15 @@ +(module + (func $contrast ;; check for tee and structure sinking + (local $x i32) + (local $y i32) + (local $z i32) + (set_local $x (i32.const 1)) + (if (get_local $x) (nop)) + (if (get_local $x) (nop)) + (set_local $y (if i32 (i32.const 2) (i32.const 3) (i32.const 4))) + (drop (get_local $y)) + (set_local $z (block i32 (i32.const 5))) + (drop (get_local $z)) + ) +) + -- cgit v1.2.3