Skip to content

Commit 5086816

Browse files
Fix test
1 parent 68971e4 commit 5086816

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

test/lit/passes/global-effects-closed-world-simplify-locals.wast

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
2-
;; RUN: foreach %s %t wasm-opt -all --closed-world --generate-global-effects --simplify-locals -S -o - | filecheck %s
2+
;; RUN: foreach %s %t wasm-opt --enable-gc --enable-reference-types --closed-world --generate-global-effects --simplify-locals -S -o - | filecheck %s
33

44
;; Tests for aggregating effects from indirect calls in GlobalEffects when
55
;; --closed-world is true. Continued from global-effects-closed-world.wast.
66

77
(module
8-
;; CHECK: (type $indirect-type (sub (func (param i32))))
9-
(type $indirect-type (sub (func (param i32))))
10-
;; CHECK: (type $1 (func (param (ref $indirect-type))))
8+
;; CHECK: (type $indirect-type-super (sub (func (param i32))))
9+
(type $indirect-type-super (sub (func (param i32))))
1110

12-
;; CHECK: (type $indirect-type-sub (sub $indirect-type (func (param i32))))
13-
(type $indirect-type-sub (sub $indirect-type (func (param i32))))
11+
;; CHECK: (type $1 (func (param (ref $indirect-type-super))))
12+
13+
;; CHECK: (type $indirect-type-sub (sub $indirect-type-super (func (param i32))))
14+
(type $indirect-type-sub (sub $indirect-type-super (func (param i32))))
1415

1516
;; CHECK: (global $g1 (mut i32) (i32.const 0))
1617
(global $g1 (mut i32) (i32.const 0))
@@ -23,12 +24,12 @@
2324

2425
;; CHECK: (export "impl2" (func $impl2))
2526

26-
;; CHECK: (func $impl1 (type $indirect-type) (param $i32 i32)
27+
;; CHECK: (func $impl1 (type $indirect-type-super) (param $i32 i32)
2728
;; CHECK-NEXT: (global.set $g1
2829
;; CHECK-NEXT: (local.get $i32)
2930
;; CHECK-NEXT: )
3031
;; CHECK-NEXT: )
31-
(func $impl1 (export "impl1") (type $indirect-type) (param $i32 i32)
32+
(func $impl1 (export "impl1") (type $indirect-type-super) (param $i32 i32)
3233
(global.set $g1 (local.get $i32))
3334
)
3435

@@ -41,18 +42,17 @@
4142
(global.set $g2 (local.get $i32))
4243
)
4344

44-
;; CHECK: (func $caller (type $1) (param $ref (ref $indirect-type))
45-
;; CHECK-NEXT: (call_ref $indirect-type
45+
;; CHECK: (func $caller (type $1) (param $ref (ref $indirect-type-super))
46+
;; CHECK-NEXT: (call_ref $indirect-type-super
4647
;; CHECK-NEXT: (i32.const 1)
4748
;; CHECK-NEXT: (local.get $ref)
4849
;; CHECK-NEXT: )
4950
;; CHECK-NEXT: )
50-
(func $caller (param $ref (ref $indirect-type))
51-
;; This inherits effects from $impl1 and $impl2, so may mutate $g1 and $g2.
52-
(call_ref $indirect-type (i32.const 1) (local.get $ref))
51+
(func $caller (param $ref (ref $indirect-type-super))
52+
(call_ref $indirect-type-super (i32.const 1) (local.get $ref))
5353
)
5454

55-
;; CHECK: (func $merges-multiple-effects (type $1) (param $ref (ref $indirect-type))
55+
;; CHECK: (func $test-merge (type $1) (param $ref (ref $indirect-type-super))
5656
;; CHECK-NEXT: (local $x i32)
5757
;; CHECK-NEXT: (local $y i32)
5858
;; CHECK-NEXT: (local $z i32)
@@ -62,9 +62,7 @@
6262
;; CHECK-NEXT: (local.set $y
6363
;; CHECK-NEXT: (global.get $g2)
6464
;; CHECK-NEXT: )
65-
;; CHECK-NEXT: (local.set $z
66-
;; CHECK-NEXT: (global.get $g3)
67-
;; CHECK-NEXT: )
65+
;; CHECK-NEXT: (nop)
6866
;; CHECK-NEXT: (call $caller
6967
;; CHECK-NEXT: (local.get $ref)
7068
;; CHECK-NEXT: )
@@ -75,10 +73,10 @@
7573
;; CHECK-NEXT: (local.get $y)
7674
;; CHECK-NEXT: )
7775
;; CHECK-NEXT: (drop
78-
;; CHECK-NEXT: (local.get $z)
76+
;; CHECK-NEXT: (global.get $g3)
7977
;; CHECK-NEXT: )
8078
;; CHECK-NEXT: )
81-
(func $merges-multiple-effects (param $ref (ref $indirect-type))
79+
(func $test-merge (param $ref (ref $indirect-type-super))
8280
(local $x i32)
8381
(local $y i32)
8482
(local $z i32)

0 commit comments

Comments
 (0)