summaryrefslogtreecommitdiff
path: root/test/passes
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes')
-rw-r--r--test/passes/optimize-instructions.txt17
-rw-r--r--test/passes/optimize-instructions.wast17
2 files changed, 34 insertions, 0 deletions
diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt
index 1bd410822..226f1766e 100644
--- a/test/passes/optimize-instructions.txt
+++ b/test/passes/optimize-instructions.txt
@@ -375,4 +375,21 @@
)
(i32.const 1)
)
+ (func $recurse-bool (type $1)
+ (if
+ (if i32
+ (i32.const 1)
+ (call $ne0)
+ (call $ne0)
+ )
+ (nop)
+ )
+ (if
+ (block $block i32
+ (nop)
+ (call $ne0)
+ )
+ (nop)
+ )
+ )
)
diff --git a/test/passes/optimize-instructions.wast b/test/passes/optimize-instructions.wast
index 56e9d08fb..dfa6365f9 100644
--- a/test/passes/optimize-instructions.wast
+++ b/test/passes/optimize-instructions.wast
@@ -296,4 +296,21 @@
)
(i32.const 1)
)
+ (func $recurse-bool
+ (if
+ (if i32
+ (i32.const 1)
+ (i32.ne (call $ne0) (i32.const 0))
+ (i32.ne (call $ne0) (i32.const 0))
+ )
+ (nop)
+ )
+ (if
+ (block i32
+ (nop)
+ (i32.ne (call $ne0) (i32.const 0))
+ )
+ (nop)
+ )
+ )
)