summaryrefslogtreecommitdiff
path: root/test/lit/passes
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes')
-rw-r--r--test/lit/passes/dae-gc-refine-return.wast14
-rw-r--r--test/lit/passes/gufa-tnh.wast6
-rw-r--r--test/lit/passes/gufa-vs-cfp.wast10
-rw-r--r--test/lit/passes/optimize-instructions-gc.wast18
-rw-r--r--test/lit/passes/precompute-partial.wast6
-rw-r--r--test/lit/passes/simplify-locals-gc.wast16
6 files changed, 34 insertions, 36 deletions
diff --git a/test/lit/passes/dae-gc-refine-return.wast b/test/lit/passes/dae-gc-refine-return.wast
index abc1154da..5e1f9d4e7 100644
--- a/test/lit/passes/dae-gc-refine-return.wast
+++ b/test/lit/passes/dae-gc-refine-return.wast
@@ -55,7 +55,7 @@
)
;; Refine the return type based on the value flowing out.
- ;; CHECK: (func $refine-return-flow (type $3) (result i31ref)
+ ;; CHECK: (func $refine-return-flow (type $4) (result i31ref)
;; CHECK-NEXT: (local $temp anyref)
;; CHECK-NEXT: (local $i31 i31ref)
;; CHECK-NEXT: (local.set $temp
@@ -71,7 +71,7 @@
(local.get $i31)
)
- ;; CHECK: (func $call-refine-return-flow (type $3) (result i31ref)
+ ;; CHECK: (func $call-refine-return-flow (type $4) (result i31ref)
;; CHECK-NEXT: (local $temp anyref)
;; CHECK-NEXT: (local.set $temp
;; CHECK-NEXT: (call $call-refine-return-flow)
@@ -105,7 +105,7 @@
)
;; Refine the return type based on a return.
- ;; CHECK: (func $refine-return-return (type $3) (result i31ref)
+ ;; CHECK: (func $refine-return-return (type $4) (result i31ref)
;; CHECK-NEXT: (local $temp anyref)
;; CHECK-NEXT: (local $i31 i31ref)
;; CHECK-NEXT: (local.set $temp
@@ -125,7 +125,7 @@
)
;; Refine the return type based on multiple values.
- ;; CHECK: (func $refine-return-many (type $3) (result i31ref)
+ ;; CHECK: (func $refine-return-many (type $4) (result i31ref)
;; CHECK-NEXT: (local $temp anyref)
;; CHECK-NEXT: (local $i31 i31ref)
;; CHECK-NEXT: (local.set $temp
@@ -353,7 +353,7 @@
)
(return_call $tail-callee)
)
- ;; CHECK: (func $tail-call-caller (type $4)
+ ;; CHECK: (func $tail-call-caller (type $5)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (call $tail-caller-yes)
;; CHECK-NEXT: )
@@ -410,7 +410,7 @@
)
(return_call_indirect (type $"return_{}") (i32.const 0))
)
- ;; CHECK: (func $tail-call-caller-indirect (type $4)
+ ;; CHECK: (func $tail-call-caller-indirect (type $5)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (call $tail-caller-indirect-yes)
;; CHECK-NEXT: )
@@ -484,7 +484,7 @@
;; should not hit an assertion on such things.
(return_call_ref $"return_{}" (unreachable))
)
- ;; CHECK: (func $tail-call-caller-call_ref (type $4)
+ ;; CHECK: (func $tail-call-caller-call_ref (type $5)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (call $tail-caller-call_ref-yes)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/gufa-tnh.wast b/test/lit/passes/gufa-tnh.wast
index e645c4560..31183da37 100644
--- a/test/lit/passes/gufa-tnh.wast
+++ b/test/lit/passes/gufa-tnh.wast
@@ -1346,8 +1346,6 @@
(type $A (sub (struct (field (mut i32)))))
(rec
- ;; CHECK: (type $1 (func (param (ref null $A))))
-
;; CHECK: (rec
;; CHECK-NEXT: (type $B1 (sub $A (struct (field (mut i32)))))
(type $B1 (sub $A (struct (field (mut i32)))))
@@ -1359,11 +1357,13 @@
(type $C1 (sub $B1 (struct (field (mut i32)))))
)
+ ;; CHECK: (type $4 (func (param (ref null $A))))
+
;; CHECK: (type $5 (func (param anyref)))
;; CHECK: (export "caller" (func $caller))
- ;; CHECK: (func $called (type $1) (param $x (ref null $A))
+ ;; CHECK: (func $called (type $4) (param $x (ref null $A))
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (ref.cast (ref $B1)
;; CHECK-NEXT: (local.get $x)
diff --git a/test/lit/passes/gufa-vs-cfp.wast b/test/lit/passes/gufa-vs-cfp.wast
index 4e64ed350..bd731d891 100644
--- a/test/lit/passes/gufa-vs-cfp.wast
+++ b/test/lit/passes/gufa-vs-cfp.wast
@@ -1145,11 +1145,11 @@
;; different values in the sub-most type. Create the top and bottom types, but
;; not the middle one.
(module
- ;; CHECK: (type $0 (func))
-
;; CHECK: (type $struct1 (sub (struct (field i32) (field i32))))
(type $struct1 (sub (struct i32 i32)))
+ ;; CHECK: (type $1 (func))
+
;; CHECK: (type $struct2 (sub $struct1 (struct (field i32) (field i32) (field f64) (field f64))))
(type $struct2 (sub $struct1 (struct i32 i32 f64 f64)))
@@ -1200,7 +1200,7 @@
)
)
- ;; CHECK: (func $get-1 (type $0)
+ ;; CHECK: (func $get-1 (type $1)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (drop
@@ -1235,7 +1235,7 @@
)
)
- ;; CHECK: (func $get-2 (type $0)
+ ;; CHECK: (func $get-2 (type $1)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (drop
@@ -1295,7 +1295,7 @@
)
)
- ;; CHECK: (func $get-3 (type $0)
+ ;; CHECK: (func $get-3 (type $1)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (drop
diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast
index 954cb1999..21d6291a9 100644
--- a/test/lit/passes/optimize-instructions-gc.wast
+++ b/test/lit/passes/optimize-instructions-gc.wast
@@ -89,7 +89,7 @@
)
;; Stored values automatically truncate unneeded bytes.
- ;; CHECK: (func $store-trunc (type $10) (param $x (ref null $struct))
+ ;; CHECK: (func $store-trunc (type $11) (param $x (ref null $struct))
;; CHECK-NEXT: (struct.set $struct $i8
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: (i32.const 35)
@@ -402,7 +402,7 @@
(unreachable)
)
- ;; CHECK: (func $ref-eq (type $9) (param $x eqref) (param $y eqref)
+ ;; CHECK: (func $ref-eq (type $10) (param $x eqref) (param $y eqref)
;; CHECK-NEXT: (local $lx eqref)
;; CHECK-NEXT: (local $ly eqref)
;; CHECK-NEXT: (drop
@@ -920,7 +920,7 @@
)
)
- ;; CHECK: (func $ref-eq-possible (type $9) (param $x eqref) (param $y eqref)
+ ;; CHECK: (func $ref-eq-possible (type $10) (param $x eqref) (param $y eqref)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (ref.eq
;; CHECK-NEXT: (ref.cast (ref null $struct)
@@ -947,7 +947,7 @@
)
)
- ;; CHECK: (func $ref-eq-impossible (type $9) (param $x eqref) (param $y eqref)
+ ;; CHECK: (func $ref-eq-impossible (type $10) (param $x eqref) (param $y eqref)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (drop
@@ -1039,7 +1039,7 @@
)
)
- ;; CHECK: (func $ref-eq-possible-b (type $9) (param $x eqref) (param $y eqref)
+ ;; CHECK: (func $ref-eq-possible-b (type $10) (param $x eqref) (param $y eqref)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (ref.eq
;; CHECK-NEXT: (ref.cast (ref $A)
@@ -1144,7 +1144,7 @@
)
)
- ;; CHECK: (func $incompatible-cast-of-null (type $10) (param $x (ref null $struct))
+ ;; CHECK: (func $incompatible-cast-of-null (type $11) (param $x (ref null $struct))
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
@@ -1179,7 +1179,7 @@
)
)
- ;; CHECK: (func $incompatible-cast-of-unknown (type $10) (param $struct (ref null $struct))
+ ;; CHECK: (func $incompatible-cast-of-unknown (type $11) (param $struct (ref null $struct))
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (ref.cast nullref
;; CHECK-NEXT: (local.get $struct)
@@ -1194,7 +1194,7 @@
)
)
- ;; CHECK: (func $incompatible-test (type $10) (param $struct (ref null $struct))
+ ;; CHECK: (func $incompatible-test (type $11) (param $struct (ref null $struct))
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result i32)
;; CHECK-NEXT: (drop
@@ -2214,7 +2214,7 @@
)
)
- ;; CHECK: (func $ref-boolean (type $9) (param $x eqref) (param $y eqref)
+ ;; CHECK: (func $ref-boolean (type $10) (param $x eqref) (param $y eqref)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (ref.eq
;; CHECK-NEXT: (local.get $x)
diff --git a/test/lit/passes/precompute-partial.wast b/test/lit/passes/precompute-partial.wast
index 86a55f56a..5d530e23e 100644
--- a/test/lit/passes/precompute-partial.wast
+++ b/test/lit/passes/precompute-partial.wast
@@ -538,7 +538,7 @@
(ref.func $B$func)
))
- ;; CHECK: (func $test-expanded (type $0) (param $x i32) (result funcref)
+ ;; CHECK: (func $test-expanded (type $4) (param $x i32) (result funcref)
;; CHECK-NEXT: (select (result (ref $specific-func))
;; CHECK-NEXT: (ref.func $A$func)
;; CHECK-NEXT: (ref.func $B$func)
@@ -561,7 +561,7 @@
)
)
- ;; CHECK: (func $test-subtyping (type $0) (param $x i32) (result funcref)
+ ;; CHECK: (func $test-subtyping (type $4) (param $x i32) (result funcref)
;; CHECK-NEXT: (select (result (ref $specific-func))
;; CHECK-NEXT: (ref.func $A$func)
;; CHECK-NEXT: (ref.func $B$func)
@@ -657,7 +657,7 @@
)
)
- ;; CHECK: (func $test-trap (type $0) (param $x i32) (result funcref)
+ ;; CHECK: (func $test-trap (type $4) (param $x i32) (result funcref)
;; CHECK-NEXT: (struct.get $vtable 0
;; CHECK-NEXT: (select (result (ref null $vtable))
;; CHECK-NEXT: (ref.null none)
diff --git a/test/lit/passes/simplify-locals-gc.wast b/test/lit/passes/simplify-locals-gc.wast
index 2eb784664..b3f6ac2fc 100644
--- a/test/lit/passes/simplify-locals-gc.wast
+++ b/test/lit/passes/simplify-locals-gc.wast
@@ -4,22 +4,20 @@
;; RUN: | filecheck %s
(module
- ;; CHECK: (type $struct (struct (field (mut i32))))
- (type $struct (struct (field (mut i32))))
-
;; CHECK: (type $A (sub (struct (field structref))))
-
- ;; CHECK: (type $B (sub $A (struct (field (ref struct)))))
-
- ;; CHECK: (type $struct-immutable (struct (field i32)))
- (type $struct-immutable (struct (field i32)))
-
(type $A (sub (struct (field (ref null struct)))))
;; $B is a subtype of $A, and its field has a more refined type (it is non-
;; nullable).
+ ;; CHECK: (type $B (sub $A (struct (field (ref struct)))))
(type $B (sub $A (struct (field (ref struct)))))
+ ;; CHECK: (type $struct (struct (field (mut i32))))
+ (type $struct (struct (field (mut i32))))
+
+ ;; CHECK: (type $struct-immutable (struct (field i32)))
+ (type $struct-immutable (struct (field i32)))
+
;; Writes to heap objects cannot be reordered with reads.
;; CHECK: (func $no-reorder-past-write (type $5) (param $x (ref $struct)) (result i32)
;; CHECK-NEXT: (local $temp i32)