summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/drop-return-values.txt31
-rw-r--r--test/passes/drop-return-values.wast9
2 files changed, 40 insertions, 0 deletions
diff --git a/test/passes/drop-return-values.txt b/test/passes/drop-return-values.txt
new file mode 100644
index 000000000..8f372ea24
--- /dev/null
+++ b/test/passes/drop-return-values.txt
@@ -0,0 +1,31 @@
+(module
+ (memory 10)
+ (func $0
+ (local $x i32)
+ (local $1 i32)
+ (i32.add
+ (block
+ (set_local $x
+ (i32.const 10)
+ )
+ (get_local $x)
+ )
+ (i32.const 20)
+ )
+ (i32.add
+ (block
+ (block
+ (set_local $1
+ (i32.const 40)
+ )
+ (i32.store
+ (i32.const 30)
+ (get_local $1)
+ )
+ )
+ (get_local $1)
+ )
+ (i32.const 50)
+ )
+ )
+)
diff --git a/test/passes/drop-return-values.wast b/test/passes/drop-return-values.wast
new file mode 100644
index 000000000..76463cc8e
--- /dev/null
+++ b/test/passes/drop-return-values.wast
@@ -0,0 +1,9 @@
+(module
+ (memory 10)
+ (func
+ (local $x i32)
+ (i32.add (set_local $x (i32.const 10)) (i32.const 20))
+ (i32.add (i32.store (i32.const 30) (i32.const 40)) (i32.const 50))
+ )
+)
+