summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names_code-folding.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/remove-unused-names_code-folding.wast')
-rw-r--r--test/passes/remove-unused-names_code-folding.wast18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names_code-folding.wast b/test/passes/remove-unused-names_code-folding.wast
index 35d95ba90..1472c7871 100644
--- a/test/passes/remove-unused-names_code-folding.wast
+++ b/test/passes/remove-unused-names_code-folding.wast
@@ -1173,4 +1173,22 @@
)
(drop (i32.const 3))
)
+ (func $if-suffix (param $x i32) (result i32)
+ (if
+ (get_local $x)
+ (set_local $x (i32.const 1))
+ (block
+ (drop (call $if-suffix (i32.const -1)))
+ (set_local $x (i32.const 1))
+ )
+ )
+ (if (result i32)
+ (get_local $x)
+ (i32.const 2)
+ (block (result i32)
+ (drop (call $if-suffix (i32.const -2)))
+ (i32.const 2)
+ )
+ )
+ )
)