Skip to content

Commit 5a2f00e

Browse files
committed
update tests
1 parent 0ea089e commit 5a2f00e

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

test/lit/array-new-seg-note-count.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
;; CHECK: (data "")
1212
(data "")
13-
;; CHECK: (func $test (result (ref $vec))
13+
;; CHECK: (func $test (type $none_=>_ref|$vec|) (result (ref $vec))
1414
;; CHECK-NEXT: (array.new_data $vec 0
1515
;; CHECK-NEXT: (i32.const 0)
1616
;; CHECK-NEXT: (i32.const 0)

test/lit/passes/gufa-refs.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
;; CHECK: (type $none_=>_ref|any| (func (result (ref any))))
1616

17-
;; CHECK: (type $none_=>_funcref (func_subtype (result funcref) func))
17+
;; CHECK: (type $none_=>_funcref (func (result funcref)))
1818

1919
;; CHECK: (import "a" "b" (func $import (result i32)))
2020
(import "a" "b" (func $import (result i32)))

test/lit/passes/monomorphize.wast

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
;; RUN: foreach %s %t wasm-opt --nominal --monomorphize -all -S -o - | filecheck %s --check-prefix CAREFUL
88

99
(module
10-
;; ALWAYS: (type $A (struct_subtype data))
11-
;; CAREFUL: (type $A (struct_subtype data))
10+
;; ALWAYS: (type $A (struct ))
11+
;; CAREFUL: (type $A (struct ))
1212
(type $A (struct_subtype data))
1313
;; ALWAYS: (type $B (struct_subtype $A))
1414
;; CAREFUL: (type $B (struct_subtype $A))
1515
(type $B (struct_subtype $A))
1616

17-
;; ALWAYS: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
17+
;; ALWAYS: (type $ref|$A|_=>_none (func (param (ref $A))))
1818

19-
;; ALWAYS: (type $none_=>_none (func_subtype func))
19+
;; ALWAYS: (type $none_=>_none (func))
2020

21-
;; ALWAYS: (type $ref|$B|_=>_none (func_subtype (param (ref $B)) func))
21+
;; ALWAYS: (type $ref|$B|_=>_none (func (param (ref $B))))
2222

2323
;; ALWAYS: (import "a" "b" (func $import (param (ref $A))))
24-
;; CAREFUL: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
24+
;; CAREFUL: (type $ref|$A|_=>_none (func (param (ref $A))))
2525

26-
;; CAREFUL: (type $none_=>_none (func_subtype func))
26+
;; CAREFUL: (type $none_=>_none (func))
2727

2828
;; CAREFUL: (import "a" "b" (func $import (param (ref $A))))
2929
(import "a" "b" (func $import (param (ref $A))))
@@ -124,29 +124,29 @@
124124
;; As above, but now the refinable function uses the local in a way that
125125
;; requires a fixup.
126126

127-
;; ALWAYS: (type $A (struct_subtype data))
128-
;; CAREFUL: (type $none_=>_none (func_subtype func))
127+
;; ALWAYS: (type $A (struct ))
128+
;; CAREFUL: (type $none_=>_none (func))
129129

130-
;; CAREFUL: (type $A (struct_subtype data))
130+
;; CAREFUL: (type $A (struct ))
131131
(type $A (struct_subtype data))
132132
;; ALWAYS: (type $B (struct_subtype $A))
133133
;; CAREFUL: (type $B (struct_subtype $A))
134134
(type $B (struct_subtype $A))
135135

136136

137137

138-
;; ALWAYS: (type $none_=>_none (func_subtype func))
138+
;; ALWAYS: (type $none_=>_none (func))
139139

140-
;; ALWAYS: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
140+
;; ALWAYS: (type $ref|$A|_=>_none (func (param (ref $A))))
141141

142-
;; ALWAYS: (type $ref|$B|_=>_none (func_subtype (param (ref $B)) func))
142+
;; ALWAYS: (type $ref|$B|_=>_none (func (param (ref $B))))
143143

144144
;; ALWAYS: (func $calls (type $none_=>_none)
145145
;; ALWAYS-NEXT: (call $refinable_0
146146
;; ALWAYS-NEXT: (struct.new_default $B)
147147
;; ALWAYS-NEXT: )
148148
;; ALWAYS-NEXT: )
149-
;; CAREFUL: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
149+
;; CAREFUL: (type $ref|$A|_=>_none (func (param (ref $A))))
150150

151151
;; CAREFUL: (func $calls (type $none_=>_none)
152152
;; CAREFUL-NEXT: (call $refinable
@@ -204,28 +204,28 @@
204204
(module
205205
;; Multiple refinings of the same function, and of different functions.
206206

207-
;; ALWAYS: (type $A (struct_subtype data))
208-
;; CAREFUL: (type $none_=>_none (func_subtype func))
207+
;; ALWAYS: (type $A (struct ))
208+
;; CAREFUL: (type $none_=>_none (func))
209209

210-
;; CAREFUL: (type $A (struct_subtype data))
210+
;; CAREFUL: (type $A (struct ))
211211
(type $A (struct_subtype data))
212212
;; ALWAYS: (type $B (struct_subtype $A))
213213
;; CAREFUL: (type $B (struct_subtype $A))
214214
(type $B (struct_subtype $A))
215215

216-
;; ALWAYS: (type $none_=>_none (func_subtype func))
216+
;; ALWAYS: (type $none_=>_none (func))
217217

218218
;; ALWAYS: (type $C (struct_subtype $B))
219-
;; CAREFUL: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
219+
;; CAREFUL: (type $ref|$A|_=>_none (func (param (ref $A))))
220220

221221
;; CAREFUL: (type $C (struct_subtype $B))
222222
(type $C (struct_subtype $B))
223223

224-
;; ALWAYS: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
224+
;; ALWAYS: (type $ref|$A|_=>_none (func (param (ref $A))))
225225

226-
;; ALWAYS: (type $ref|$B|_=>_none (func_subtype (param (ref $B)) func))
226+
;; ALWAYS: (type $ref|$B|_=>_none (func (param (ref $B))))
227227

228-
;; ALWAYS: (type $ref|$C|_=>_none (func_subtype (param (ref $C)) func))
228+
;; ALWAYS: (type $ref|$C|_=>_none (func (param (ref $C))))
229229

230230
;; ALWAYS: (func $calls1 (type $none_=>_none)
231231
;; ALWAYS-NEXT: (call $refinable1
@@ -327,28 +327,28 @@
327327
;; A case where even CAREFUL mode will monomorphize, as it helps the target
328328
;; function get optimized better.
329329

330-
;; ALWAYS: (type $A (struct_subtype data))
331-
;; CAREFUL: (type $A (struct_subtype data))
330+
;; ALWAYS: (type $A (struct ))
331+
;; CAREFUL: (type $A (struct ))
332332
(type $A (struct_subtype data))
333333

334334
;; ALWAYS: (type $B (struct_subtype $A))
335335
;; CAREFUL: (type $B (struct_subtype $A))
336336
(type $B (struct_subtype $A))
337337

338-
;; ALWAYS: (type $ref|$B|_=>_none (func_subtype (param (ref $B)) func))
338+
;; ALWAYS: (type $ref|$B|_=>_none (func (param (ref $B))))
339339

340-
;; ALWAYS: (type $none_=>_none (func_subtype func))
340+
;; ALWAYS: (type $none_=>_none (func))
341341

342-
;; ALWAYS: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
342+
;; ALWAYS: (type $ref|$A|_=>_none (func (param (ref $A))))
343343

344344
;; ALWAYS: (import "a" "b" (func $import (param (ref $B))))
345345

346346
;; ALWAYS: (global $global (mut i32) (i32.const 1))
347-
;; CAREFUL: (type $ref|$B|_=>_none (func_subtype (param (ref $B)) func))
347+
;; CAREFUL: (type $ref|$B|_=>_none (func (param (ref $B))))
348348

349-
;; CAREFUL: (type $none_=>_none (func_subtype func))
349+
;; CAREFUL: (type $none_=>_none (func))
350350

351-
;; CAREFUL: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
351+
;; CAREFUL: (type $ref|$A|_=>_none (func (param (ref $A))))
352352

353353
;; CAREFUL: (import "a" "b" (func $import (param (ref $B))))
354354

@@ -558,12 +558,12 @@
558558
(module
559559
;; Test that we avoid recursive calls.
560560

561-
;; ALWAYS: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
561+
;; ALWAYS: (type $ref|$A|_=>_none (func (param (ref $A))))
562562

563-
;; ALWAYS: (type $A (struct_subtype data))
564-
;; CAREFUL: (type $ref|$A|_=>_none (func_subtype (param (ref $A)) func))
563+
;; ALWAYS: (type $A (struct ))
564+
;; CAREFUL: (type $ref|$A|_=>_none (func (param (ref $A))))
565565

566-
;; CAREFUL: (type $A (struct_subtype data))
566+
;; CAREFUL: (type $A (struct ))
567567
(type $A (struct_subtype data))
568568
;; ALWAYS: (type $B (struct_subtype $A))
569569
;; CAREFUL: (type $B (struct_subtype $A))

0 commit comments

Comments
 (0)