summaryrefslogtreecommitdiff
path: root/test/lit/passes/dae-gc.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes/dae-gc.wast')
-rw-r--r--test/lit/passes/dae-gc.wast29
1 files changed, 28 insertions, 1 deletions
diff --git a/test/lit/passes/dae-gc.wast b/test/lit/passes/dae-gc.wast
index 899087e7f..3cc1c8653 100644
--- a/test/lit/passes/dae-gc.wast
+++ b/test/lit/passes/dae-gc.wast
@@ -1,14 +1,18 @@
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s -all --dae -S -o - | filecheck %s
-;; RUN: wasm-opt %s -all --dae --nominal -S -o - | filecheck %s
+;; RUN: wasm-opt %s -all --dae --nominal -S -o - | filecheck %s --check-prefix=NOMNL
(module
;; CHECK: (type ${} (struct ))
+ ;; NOMNL: (type ${} (struct_subtype data))
(type ${} (struct))
;; CHECK: (func $foo
;; CHECK-NEXT: (call $bar)
;; CHECK-NEXT: )
+ ;; NOMNL: (func $foo
+ ;; NOMNL-NEXT: (call $bar)
+ ;; NOMNL-NEXT: )
(func $foo
(call $bar
(i31.new
@@ -31,6 +35,21 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; NOMNL: (func $bar
+ ;; NOMNL-NEXT: (local $0 (ref null i31))
+ ;; NOMNL-NEXT: (drop
+ ;; NOMNL-NEXT: (ref.as_non_null
+ ;; NOMNL-NEXT: (local.tee $0
+ ;; NOMNL-NEXT: (i31.new
+ ;; NOMNL-NEXT: (i32.const 2)
+ ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: (local.tee $0
+ ;; NOMNL-NEXT: (unreachable)
+ ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: )
(func $bar (param $0 i31ref)
(drop
;; after the parameter is removed, we create a nullable local to replace it,
@@ -55,6 +74,9 @@
;; CHECK: (func $get-rtt (param $0 (rtt ${}))
;; CHECK-NEXT: (nop)
;; CHECK-NEXT: )
+ ;; NOMNL: (func $get-rtt (param $0 (rtt ${}))
+ ;; NOMNL-NEXT: (nop)
+ ;; NOMNL-NEXT: )
(func $get-rtt (param $0 (rtt ${}))
(nop)
)
@@ -63,6 +85,11 @@
;; CHECK-NEXT: (rtt.canon ${})
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; NOMNL: (func $send-rtt
+ ;; NOMNL-NEXT: (call $get-rtt
+ ;; NOMNL-NEXT: (rtt.canon ${})
+ ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: )
(func $send-rtt
(call $get-rtt
(rtt.canon ${})