summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/vacuum.txt4
-rw-r--r--test/passes/vacuum.wast9
-rw-r--r--test/unit.fromasm6
-rw-r--r--test/unit.fromasm.imprecise6
4 files changed, 17 insertions, 8 deletions
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt
index f64db152f..2d274a6d7 100644
--- a/test/passes/vacuum.txt
+++ b/test/passes/vacuum.txt
@@ -7,6 +7,7 @@
(type $4 (func (param i32 f64 i32 i32)))
(type $FUNCSIG$i (func (result i32)))
(import "env" "int" (func $int (result i32)))
+ (global $Int i32 (i32.const 0))
(func $b (type $0)
(nop)
)
@@ -177,4 +178,7 @@
)
)
)
+ (func $drop-get-global (type $0)
+ (call $drop-get-global)
+ )
)
diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast
index 9da5fe6bc..5d443380f 100644
--- a/test/passes/vacuum.wast
+++ b/test/passes/vacuum.wast
@@ -6,6 +6,7 @@
(type $3 (func (result i32)))
(type $4 (func (param i32 f64 i32 i32)))
(import $int "env" "int" (result i32))
+ (global $Int i32 (i32.const 0))
(func $b (type $0)
(drop
(i32.const 50)
@@ -354,4 +355,12 @@
)
)
)
+ (func $drop-get-global
+ (drop
+ (block
+ (call $drop-get-global)
+ (get_global $Int) ;; this is not needed due to the block being drop'd, but make sure the call is not then dropped either
+ )
+ )
+ )
)
diff --git a/test/unit.fromasm b/test/unit.fromasm
index 42b67a72c..a1103f064 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -534,10 +534,8 @@
(call $phi)
)
(func $useSetGlobal (result i32)
- (drop
- (set_global $Int
- (i32.const 10)
- )
+ (set_global $Int
+ (i32.const 10)
)
(set_global $Int
(i32.const 20)
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index 634356f9f..db854cac0 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -515,10 +515,8 @@
(call $phi)
)
(func $useSetGlobal (result i32)
- (drop
- (set_global $Int
- (i32.const 10)
- )
+ (set_global $Int
+ (i32.const 10)
)
(set_global $Int
(i32.const 20)