blob: 3b284db04cf9a36003ee70d1df7dade6fd18a498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt -all %s -S --roundtrip -o - | filecheck %s
(module
;; CHECK: (type $struct (struct (field i32)))
(type $struct (struct i32))
;; CHECK: (func $ref.cast_nop (type $ref|any|_=>_ref|$struct|) (param $x (ref any)) (result (ref $struct))
;; CHECK-NEXT: (ref.cast_nop $struct
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $ref.cast_nop (param $x (ref any)) (result (ref $struct))
(ref.cast_nop $struct
(local.get $x)
)
)
;; CHECK: (func $ref.cast_nop.null (type $ref|any|_=>_ref|none|) (param $x (ref any)) (result (ref none))
;; CHECK-NEXT: (ref.cast_nop none
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $ref.cast_nop.null (param $x (ref any)) (result (ref none))
(ref.cast_nop none
(local.get $x)
)
)
)
|