summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/vacuum.txt29
-rw-r--r--test/passes/vacuum.wast11
2 files changed, 37 insertions, 3 deletions
diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt
index d1a388333..ec6e3ad44 100644
--- a/test/passes/vacuum.txt
+++ b/test/passes/vacuum.txt
@@ -28,16 +28,25 @@
(nop)
)
(func $unary (type $2) (result f32)
- (unreachable)
+ (f32.abs
+ (unreachable)
+ )
)
(func $binary (type $2) (result f32)
(drop
- (unreachable)
+ (f32.add
+ (unreachable)
+ (f32.const 3)
+ )
)
)
(func $select (type $3) (result i32)
(drop
- (unreachable)
+ (select
+ (unreachable)
+ (i32.const 4)
+ (i32.const 5)
+ )
)
)
(func $block-to-one (type $0)
@@ -198,4 +207,18 @@
(local $2 i32)
(nop)
)
+ (func $a (type $0)
+ (block $block
+ (i32.store
+ (i32.const 1)
+ (i32.const 2)
+ )
+ (f64.div
+ (f64.const -nan:0xfffffffffa361)
+ (loop $label$1
+ (br $label$1)
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/vacuum.wast b/test/passes/vacuum.wast
index c1a84d646..20bbfe625 100644
--- a/test/passes/vacuum.wast
+++ b/test/passes/vacuum.wast
@@ -509,4 +509,15 @@
)
)
)
+ (func $a
+ (block
+ (i32.store (i32.const 1) (i32.const 2))
+ (f64.div
+ (f64.const -nan:0xfffffffffa361)
+ (loop $label$1 ;; unreachable, so the div is too. keep
+ (br $label$1)
+ )
+ )
+ )
+ )
)