summaryrefslogtreecommitdiff
path: root/test/lit
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit')
-rw-r--r--test/lit/fuzz-types/isorecursive.test20
-rw-r--r--test/lit/fuzz-types/nominal.test20
-rw-r--r--test/lit/fuzz-types/structural.test22
-rw-r--r--test/lit/help/wasm-as.test4
-rw-r--r--test/lit/help/wasm-ctor-eval.test4
-rw-r--r--test/lit/help/wasm-dis.test4
-rw-r--r--test/lit/help/wasm-emscripten-finalize.test4
-rw-r--r--test/lit/help/wasm-fuzz-types.test16
-rw-r--r--test/lit/help/wasm-metadce.test4
-rw-r--r--test/lit/help/wasm-opt.test5
-rw-r--r--test/lit/help/wasm-reduce.test4
-rw-r--r--test/lit/help/wasm-split.test4
-rw-r--r--test/lit/help/wasm2js.test5
-rw-r--r--test/lit/lub-bug-3843.wast53
-rw-r--r--test/lit/nominal-good.wast60
-rw-r--r--test/lit/recursive-type-sort.wast30
16 files changed, 48 insertions, 211 deletions
diff --git a/test/lit/fuzz-types/isorecursive.test b/test/lit/fuzz-types/isorecursive.test
index ccbb63d5e..4a1725c07 100644
--- a/test/lit/fuzz-types/isorecursive.test
+++ b/test/lit/fuzz-types/isorecursive.test
@@ -1,26 +1,26 @@
;; RUN: wasm-fuzz-types --hybrid -v --seed=0 | filecheck %s
;; CHECK: (rec
-;; CHECK-NEXT: (type $0 (array_subtype (mut i64) data))
-;; CHECK-NEXT: (type $1 (func_subtype (param i32 (ref eq) (ref null $3)) (result v128) func))
-;; CHECK-NEXT: (type $2 (array_subtype (mut v128) data))
+;; CHECK-NEXT: (type $0 (array (mut i64)))
+;; CHECK-NEXT: (type $1 (func (param i32 (ref eq) (ref null $3)) (result v128)))
+;; CHECK-NEXT: (type $2 (array (mut v128)))
;; CHECK-NEXT: (type $3 (array_subtype (mut i64) $0))
-;; CHECK-NEXT: (type $4 (array_subtype i32 data))
+;; CHECK-NEXT: (type $4 (array i32))
;; CHECK-NEXT: (type $5 none)
;; CHECK-NEXT: (type $6 extern)
;; CHECK-NEXT: )
;; CHECK-NEXT: (rec
;; CHECK-NEXT: (type $7 (array_subtype (mut i64) $3))
-;; CHECK-NEXT: (type $8 (func_subtype (result v128) func))
+;; CHECK-NEXT: (type $8 (func (result v128)))
;; CHECK-NEXT: (type $9 (array_subtype (mut v128) $2))
;; CHECK-NEXT: (type $10 none)
;; CHECK-NEXT: (type $11 none)
;; CHECK-NEXT: (type $12 (array_subtype (mut v128) $2))
-;; CHECK-NEXT: (type $13 (func_subtype (param f32 (ref none) (ref null $3)) (result eqref) func))
+;; CHECK-NEXT: (type $13 (func (param f32 (ref none) (ref null $3)) (result eqref)))
;; CHECK-NEXT: (type $14 (array_subtype (mut i64) $7))
-;; CHECK-NEXT: (type $15 (func_subtype (param (ref null $17) v128 (ref i31)) func))
-;; CHECK-NEXT: (type $16 (array_subtype i32 data))
-;; CHECK-NEXT: (type $17 (func_subtype (param (ref i31)) (result v128) func))
-;; CHECK-NEXT: (type $18 (func_subtype (param f32) func))
+;; CHECK-NEXT: (type $15 (func (param (ref null $17) v128 (ref i31))))
+;; CHECK-NEXT: (type $16 (array i32))
+;; CHECK-NEXT: (type $17 (func (param (ref i31)) (result v128)))
+;; CHECK-NEXT: (type $18 (func (param f32)))
;; CHECK-NEXT: (type $19 (array_subtype (mut i64) $3))
;; CHECK-NEXT: )
diff --git a/test/lit/fuzz-types/nominal.test b/test/lit/fuzz-types/nominal.test
index bb84f6991..26802a4ba 100644
--- a/test/lit/fuzz-types/nominal.test
+++ b/test/lit/fuzz-types/nominal.test
@@ -1,22 +1,22 @@
;; RUN: wasm-fuzz-types --nominal -v --seed=0 | filecheck %s
-;; CHECK: (type $0 (array_subtype (mut (ref null $8)) data))
-;; CHECK-NEXT: (type $1 (func_subtype (param nullref) (result v128) func))
-;; CHECK-NEXT: (type $2 (struct_subtype (field (mut i64) (mut i8) (mut (ref $12)) (mut f32)) data))
+;; CHECK: (type $0 (array (mut (ref null $8))))
+;; CHECK-NEXT: (type $1 (func (param nullref) (result v128)))
+;; CHECK-NEXT: (type $2 (struct (field (mut i64) (mut i8) (mut (ref $12)) (mut f32))))
;; CHECK-NEXT: (type $3 (array_subtype (mut (ref null $8)) $0))
-;; CHECK-NEXT: (type $4 (array_subtype (mut i64) data))
+;; CHECK-NEXT: (type $4 (array (mut i64)))
;; CHECK-NEXT: (type $5 none)
;; CHECK-NEXT: (type $6 extern)
;; CHECK-NEXT: (type $7 (array_subtype (mut (ref null $8)) $3))
-;; CHECK-NEXT: (type $8 (func_subtype (result (ref $9)) func))
+;; CHECK-NEXT: (type $8 (func (result (ref $9))))
;; CHECK-NEXT: (type $9 (struct_subtype (field (mut i64) (mut i8) (mut (ref $12)) (mut f32) i16) $2))
;; CHECK-NEXT: (type $10 none)
;; CHECK-NEXT: (type $11 none)
;; CHECK-NEXT: (type $12 (struct_subtype (field (mut i64) (mut i8) (mut (ref $12)) (mut f32) (mut f32) (mut (ref $4))) $2))
-;; CHECK-NEXT: (type $13 (func_subtype (param dataref) func))
+;; CHECK-NEXT: (type $13 (func (param dataref)))
;; CHECK-NEXT: (type $14 (array_subtype (mut (ref null $8)) $7))
-;; CHECK-NEXT: (type $15 (func_subtype (param externref) func))
-;; CHECK-NEXT: (type $16 (array_subtype v128 data))
-;; CHECK-NEXT: (type $17 (func_subtype (result (ref extern)) func))
-;; CHECK-NEXT: (type $18 (func_subtype (param v128 i64) func))
+;; CHECK-NEXT: (type $15 (func (param externref)))
+;; CHECK-NEXT: (type $16 (array v128))
+;; CHECK-NEXT: (type $17 (func (result (ref extern))))
+;; CHECK-NEXT: (type $18 (func (param v128 i64)))
;; CHECK-NEXT: (type $19 (array_subtype (mut (ref null $8)) $3))
diff --git a/test/lit/fuzz-types/structural.test b/test/lit/fuzz-types/structural.test
deleted file mode 100644
index 3dcec3179..000000000
--- a/test/lit/fuzz-types/structural.test
+++ /dev/null
@@ -1,22 +0,0 @@
-;; RUN: wasm-fuzz-types --structural -v --seed=0 | filecheck %s
-
-;; CHECK: (type $0 (array (mut (ref null $8))))
-;; CHECK-NEXT: (type $1 (func (param nullref) (result v128)))
-;; CHECK-NEXT: (type $2 (struct (field (mut i64) (mut i8) (mut (ref $12)) (mut f32))))
-;; CHECK-NEXT: (type $3 identical to $0)
-;; CHECK-NEXT: (type $4 (array (mut i64)))
-;; CHECK-NEXT: (type $5 none)
-;; CHECK-NEXT: (type $6 extern)
-;; CHECK-NEXT: (type $7 identical to $0)
-;; CHECK-NEXT: (type $8 (func (result (ref $9))))
-;; CHECK-NEXT: (type $9 (struct (field (mut i64) (mut i8) (mut (ref $12)) (mut f32) i16)))
-;; CHECK-NEXT: (type $10 none)
-;; CHECK-NEXT: (type $11 none)
-;; CHECK-NEXT: (type $12 (struct (field (mut i64) (mut i8) (mut (ref $12)) (mut f32) (mut f32) (mut (ref $4)))))
-;; CHECK-NEXT: (type $13 (func (param dataref)))
-;; CHECK-NEXT: (type $14 identical to $0)
-;; CHECK-NEXT: (type $15 (func (param externref)))
-;; CHECK-NEXT: (type $16 (array v128))
-;; CHECK-NEXT: (type $17 (func (result (ref extern))))
-;; CHECK-NEXT: (type $18 (func (param v128 i64)))
-;; CHECK-NEXT: (type $19 identical to $0)
diff --git a/test/lit/help/wasm-as.test b/test/lit/help/wasm-as.test
index bbce25015..c94dab310 100644
--- a/test/lit/help/wasm-as.test
+++ b/test/lit/help/wasm-as.test
@@ -122,10 +122,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm-ctor-eval.test b/test/lit/help/wasm-ctor-eval.test
index c20ccc8c8..9295fc9d1 100644
--- a/test/lit/help/wasm-ctor-eval.test
+++ b/test/lit/help/wasm-ctor-eval.test
@@ -126,10 +126,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm-dis.test b/test/lit/help/wasm-dis.test
index f6baf0467..c0f0b6f38 100644
--- a/test/lit/help/wasm-dis.test
+++ b/test/lit/help/wasm-dis.test
@@ -115,10 +115,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm-emscripten-finalize.test b/test/lit/help/wasm-emscripten-finalize.test
index 45d3a3eae..1600bb823 100644
--- a/test/lit/help/wasm-emscripten-finalize.test
+++ b/test/lit/help/wasm-emscripten-finalize.test
@@ -162,10 +162,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm-fuzz-types.test b/test/lit/help/wasm-fuzz-types.test
index a282aa4a6..49e491358 100644
--- a/test/lit/help/wasm-fuzz-types.test
+++ b/test/lit/help/wasm-fuzz-types.test
@@ -9,23 +9,21 @@
;; CHECK-NEXT: wasm-fuzz-types options:
;; CHECK-NEXT: ------------------------
;; CHECK-NEXT:
-;; CHECK-NEXT: --seed Run a single workload generated by the given seed
+;; CHECK-NEXT: --seed Run a single workload generated by the given seed
;; CHECK-NEXT:
-;; CHECK-NEXT: --verbose,-v Print extra information
+;; CHECK-NEXT: --verbose,-v Print extra information
;; CHECK-NEXT:
-;; CHECK-NEXT: --nominal Use the nominal type system (default)
+;; CHECK-NEXT: --nominal Use the nominal type system
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Use the equirecursive type system
-;; CHECK-NEXT:
-;; CHECK-NEXT: --hybrid Use the isorecursive hybrid type system
+;; CHECK-NEXT: --hybrid Use the isorecursive hybrid type system (default)
;; CHECK-NEXT:
;; CHECK-NEXT:
;; CHECK-NEXT: General options:
;; CHECK-NEXT: ----------------
;; CHECK-NEXT:
-;; CHECK-NEXT: --version Output version information and exit
+;; CHECK-NEXT: --version Output version information and exit
;; CHECK-NEXT:
-;; CHECK-NEXT: --help,-h Show this help message and exit
+;; CHECK-NEXT: --help,-h Show this help message and exit
;; CHECK-NEXT:
-;; CHECK-NEXT: --debug,-d Print debug information to stderr
+;; CHECK-NEXT: --debug,-d Print debug information to stderr
;; CHECK-NEXT:
diff --git a/test/lit/help/wasm-metadce.test b/test/lit/help/wasm-metadce.test
index 10e67873a..a748d8198 100644
--- a/test/lit/help/wasm-metadce.test
+++ b/test/lit/help/wasm-metadce.test
@@ -163,10 +163,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test
index bc3d710ac..bdc4b9cd8 100644
--- a/test/lit/help/wasm-opt.test
+++ b/test/lit/help/wasm-opt.test
@@ -661,11 +661,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to
;; CHECK-NEXT: be parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to
-;; CHECK-NEXT: be parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the
-;; CHECK-NEXT: default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to
;; CHECK-NEXT: be parsed using the isorecursive
;; CHECK-NEXT: hybrid type system.
diff --git a/test/lit/help/wasm-reduce.test b/test/lit/help/wasm-reduce.test
index 9b394a7f7..c640cf5f7 100644
--- a/test/lit/help/wasm-reduce.test
+++ b/test/lit/help/wasm-reduce.test
@@ -151,10 +151,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm-split.test b/test/lit/help/wasm-split.test
index 8da75cca2..176ba1858 100644
--- a/test/lit/help/wasm-split.test
+++ b/test/lit/help/wasm-split.test
@@ -231,10 +231,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to be
;; CHECK-NEXT: parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to be
-;; CHECK-NEXT: parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to be
;; CHECK-NEXT: parsed using the isorecursive hybrid type
;; CHECK-NEXT: system.
diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test
index ce2748343..16c6c45fc 100644
--- a/test/lit/help/wasm2js.test
+++ b/test/lit/help/wasm2js.test
@@ -620,11 +620,6 @@
;; CHECK-NEXT: --nominal Force all GC type definitions to
;; CHECK-NEXT: be parsed as nominal.
;; CHECK-NEXT:
-;; CHECK-NEXT: --structural Force all GC type definitions to
-;; CHECK-NEXT: be parsed as structural (i.e.
-;; CHECK-NEXT: equirecursive). This is the
-;; CHECK-NEXT: default.
-;; CHECK-NEXT:
;; CHECK-NEXT: --hybrid Force all GC type definitions to
;; CHECK-NEXT: be parsed using the isorecursive
;; CHECK-NEXT: hybrid type system.
diff --git a/test/lit/lub-bug-3843.wast b/test/lit/lub-bug-3843.wast
deleted file mode 100644
index 8bf384c71..000000000
--- a/test/lit/lub-bug-3843.wast
+++ /dev/null
@@ -1,53 +0,0 @@
-;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
-;; RUN: wasm-opt %s -all --precompute --structural -S -o - | filecheck %s
-;; RUN: wasm-opt %s -all --precompute --nominal -S -o - | filecheck %s --check-prefix NOMNL
-
-;; Regression test for a bug (#3843) in which the LUB calculation done during
-;; the refinalization of the select incorrectly produced a new type rather than
-;; returning (ref null $A).
-
-(module
- ;; CHECK: (type $A (struct (field (ref null $C))))
- ;; NOMNL: (type $A (struct (field (ref null $C))))
- (type $A (struct (field (ref null $C))))
-
- ;; CHECK: (type $B (struct (field (ref null $D))))
- ;; NOMNL: (type $B (struct_subtype (field (ref null $D)) $A))
- (type $B (struct_subtype (field (ref null $D)) $A))
-
- ;; CHECK: (type $C (struct (field (mut (ref $A)))))
-
- ;; CHECK: (type $D (struct (field (mut (ref $A))) (field (mut (ref $A)))))
- ;; NOMNL: (type $C (struct (field (mut (ref $A)))))
-
- ;; NOMNL: (type $D (struct_subtype (field (mut (ref $A))) (field (mut (ref $A))) $C))
- (type $D (struct_subtype (field (mut (ref $A))) (field (mut (ref $A))) $C))
-
- (type $C (struct (field (mut (ref $A)))))
-
-
- ;; CHECK: (func $foo (param $a (ref null $A)) (param $b (ref null $B)) (result (ref null $A))
- ;; CHECK-NEXT: (select (result (ref null $A))
- ;; CHECK-NEXT: (local.get $a)
- ;; CHECK-NEXT: (local.get $b)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; NOMNL: (func $foo (type $ref?|$A|_ref?|$B|_=>_ref?|$A|) (param $a (ref null $A)) (param $b (ref null $B)) (result (ref null $A))
- ;; NOMNL-NEXT: (select (result (ref null $A))
- ;; NOMNL-NEXT: (local.get $a)
- ;; NOMNL-NEXT: (local.get $b)
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- (func $foo (param $a (ref null $A)) (param $b (ref null $B)) (result (ref null $A))
- ;; the select should have type $A
- (select (result (ref null $A))
- ;; one arm has type $A
- (local.get $a)
- ;; one arm has type $B (a subtype of $A)
- (local.get $b)
- (i32.const 0)
- )
- )
-)
diff --git a/test/lit/nominal-good.wast b/test/lit/nominal-good.wast
index ec64b466c..76863d637 100644
--- a/test/lit/nominal-good.wast
+++ b/test/lit/nominal-good.wast
@@ -1,69 +1,51 @@
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
-;; RUN: wasm-opt %s -all --nominal -S -o - | filecheck %s --check-prefix NOMINAL
-;; RUN: wasm-opt %s -all --nominal --roundtrip -S -o - | filecheck %s --check-prefix NOMINAL
-;; RUN: wasm-opt %s -all --hybrid -S -o - | filecheck %s --check-prefix NOMINAL
-;; RUN: wasm-opt %s -all --hybrid --roundtrip -S -o - | filecheck %s --check-prefix NOMINAL
-;; RUN: wasm-opt %s -all --structural -S -o - | filecheck %s --check-prefix EQUIREC
-;; RUN: wasm-opt %s -all --structural --roundtrip -S -o - | filecheck %s --check-prefix EQUIREC
+;; RUN: wasm-opt %s -all --nominal -S -o - | filecheck %s --check-prefix CHECK
+;; RUN: wasm-opt %s -all --nominal --roundtrip -S -o - | filecheck %s
+;; RUN: wasm-opt %s -all --hybrid -S -o - | filecheck %s --check-prefix CHECK
+;; RUN: wasm-opt %s -all --hybrid --roundtrip -S -o - | filecheck %s
-;; Note that --hybrid and --nominal have the same output, so they share the NOMINAL prefix.
+;; Note that --hybrid and --nominal have the same output, so they share the CHECK prefix.
(module
- ;; NOMINAL: (type $super-struct (struct (field i32)))
- ;; EQUIREC: (type $super-struct (struct (field i32)))
+ ;; CHECK: (type $super-struct (struct (field i32)))
(type $super-struct (struct i32))
- ;; NOMINAL: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct))
- ;; EQUIREC: (type $sub-struct (struct (field i32) (field i64)))
+ ;; CHECK: (type $sub-struct (struct_subtype (field i32) (field i64) $super-struct))
(type $sub-struct (struct_subtype i32 i64 $super-struct))
- ;; NOMINAL: (type $super-array (array (ref $super-struct)))
- ;; EQUIREC: (type $super-array (array (ref $super-struct)))
+ ;; CHECK: (type $super-array (array (ref $super-struct)))
(type $super-array (array (ref $super-struct)))
- ;; NOMINAL: (type $sub-array (array_subtype (ref $sub-struct) $super-array))
- ;; EQUIREC: (type $sub-array (array (ref $sub-struct)))
+ ;; CHECK: (type $sub-array (array_subtype (ref $sub-struct) $super-array))
(type $sub-array (array_subtype (ref $sub-struct) $super-array))
;; TODO: signature types as well, once functions store their HeapTypes.
- ;; NOMINAL: (func $make-super-struct (type $none_=>_ref|$super-struct|) (result (ref $super-struct))
- ;; NOMINAL-NEXT: (call $make-sub-struct)
- ;; NOMINAL-NEXT: )
- ;; EQUIREC: (func $make-super-struct (result (ref $super-struct))
- ;; EQUIREC-NEXT: (call $make-sub-struct)
- ;; EQUIREC-NEXT: )
+ ;; CHECK: (func $make-super-struct (type $none_=>_ref|$super-struct|) (result (ref $super-struct))
+ ;; CHECK-NEXT: (call $make-sub-struct)
+ ;; CHECK-NEXT: )
(func $make-super-struct (result (ref $super-struct))
(call $make-sub-struct)
)
- ;; NOMINAL: (func $make-sub-struct (type $none_=>_ref|$sub-struct|) (result (ref $sub-struct))
- ;; NOMINAL-NEXT: (unreachable)
- ;; NOMINAL-NEXT: )
- ;; EQUIREC: (func $make-sub-struct (result (ref $sub-struct))
- ;; EQUIREC-NEXT: (unreachable)
- ;; EQUIREC-NEXT: )
+ ;; CHECK: (func $make-sub-struct (type $none_=>_ref|$sub-struct|) (result (ref $sub-struct))
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
(func $make-sub-struct (result (ref $sub-struct))
(unreachable)
)
- ;; NOMINAL: (func $make-super-array (type $none_=>_ref|$super-array|) (result (ref $super-array))
- ;; NOMINAL-NEXT: (call $make-sub-array)
- ;; NOMINAL-NEXT: )
- ;; EQUIREC: (func $make-super-array (result (ref $super-array))
- ;; EQUIREC-NEXT: (call $make-sub-array)
- ;; EQUIREC-NEXT: )
+ ;; CHECK: (func $make-super-array (type $none_=>_ref|$super-array|) (result (ref $super-array))
+ ;; CHECK-NEXT: (call $make-sub-array)
+ ;; CHECK-NEXT: )
(func $make-super-array (result (ref $super-array))
(call $make-sub-array)
)
- ;; NOMINAL: (func $make-sub-array (type $none_=>_ref|$sub-array|) (result (ref $sub-array))
- ;; NOMINAL-NEXT: (unreachable)
- ;; NOMINAL-NEXT: )
- ;; EQUIREC: (func $make-sub-array (result (ref $sub-array))
- ;; EQUIREC-NEXT: (unreachable)
- ;; EQUIREC-NEXT: )
+ ;; CHECK: (func $make-sub-array (type $none_=>_ref|$sub-array|) (result (ref $sub-array))
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
(func $make-sub-array (result (ref $sub-array))
(unreachable)
)
diff --git a/test/lit/recursive-type-sort.wast b/test/lit/recursive-type-sort.wast
deleted file mode 100644
index 3b241fd96..000000000
--- a/test/lit/recursive-type-sort.wast
+++ /dev/null
@@ -1,30 +0,0 @@
-;; Test that multiple recursive types are sorted and emitted properly.
-;; Regression test for a bug in TypeComparator that made it fail to properly
-;; implement the C++ Compare requirements. See #3648.
-
-;; RUN: wasm-opt %s -all --roundtrip --structural -S -o - | filecheck %s
-;; RUN: wasm-opt %s -all --roundtrip --nominal -S -o - | filecheck %s
-
-;; Check that there's no crash.
-;; CHECK: module
-
-(module
- (type $a (func (param (ref null $b))))
- (type $b (struct (field (ref null $i))))
- (type $c (struct (field (ref null $l))))
- (type $d (func (param (ref null $b))))
- (type $e (func (result (ref null $g))))
- (type $f (func (result (ref null $c))))
- (type $g (struct (field (ref null $j))))
- (type $h (struct (field (ref null $k))))
- (type $i (struct (field (mut (ref null $a)))))
- (type $j (struct (field (mut (ref null $a))) (field (mut (ref null $a)))))
- (type $k (struct (field (mut (ref null $a))) (field (mut (ref null $a))) (field (mut (ref null $e)))))
- (type $l (struct (field (mut (ref null $a))) (field (mut (ref null $d))) (field (mut (ref null $f)))))
-
- (func $foo
- (local $1 (ref null $h))
- (local $2 (ref null $b))
- (local $3 (ref null $c))
- )
-)