summaryrefslogtreecommitdiff
path: root/test/passes/code-folding.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/code-folding.wast')
-rw-r--r--test/passes/code-folding.wast23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/passes/code-folding.wast b/test/passes/code-folding.wast
new file mode 100644
index 000000000..2310f9721
--- /dev/null
+++ b/test/passes/code-folding.wast
@@ -0,0 +1,23 @@
+(module
+ (type $13 (func (param f32)))
+ (table 282 282 anyfunc)
+ (memory $0 1 1)
+ (func $0
+ (block $label$1
+ (if
+ (i32.const 1)
+ (block $label$3
+ (call_indirect $13
+ (block $label$4 (result f32) ;; but this type may change dangerously
+ (nop) ;; fold this
+ (br $label$3)
+ )
+ (i32.const 105)
+ )
+ (nop) ;; with this
+ )
+ )
+ )
+ )
+)
+