diff options
Diffstat (limited to 'test/lit/basic')
-rw-r--r-- | test/lit/basic/shared-types.wast | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/lit/basic/shared-types.wast b/test/lit/basic/shared-types.wast new file mode 100644 index 000000000..d3720c2e9 --- /dev/null +++ b/test/lit/basic/shared-types.wast @@ -0,0 +1,47 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -S -o - | filecheck %s +;; RUN: wasm-opt %s -all --roundtrip -S -o - | filecheck %s + +(module + (rec + ;; CHECK: (rec + ;; CHECK-NEXT: (type $final (shared (struct ))) + (type $final (shared (struct))) + ;; CHECK: (type $top (sub (shared (struct )))) + (type $top (sub (shared (struct)))) + ;; CHECK: (type $mid (sub $top (shared (struct (field i32))))) + (type $mid (sub $top (shared (struct i32)))) + ;; CHECK: (type $bot (sub final $mid (shared (struct (field i32) (field i32))))) + (type $bot (sub final $mid (shared (struct i32 i32)))) + + ;; CHECK: (type $func (shared (func))) + (type $func (shared (func))) + ;; CHECK: (type $array (shared (array i8))) + (type $array (shared (array i8))) + ;; CHECK: (type $cont (shared (cont $func))) + (type $cont (shared (cont $func))) + ) + + ;; CHECK: (type $7 (func)) + + ;; CHECK: (func $use-types (type $7) + ;; CHECK-NEXT: (local $0 (ref $final)) + ;; CHECK-NEXT: (local $1 (ref $top)) + ;; CHECK-NEXT: (local $2 (ref $mid)) + ;; CHECK-NEXT: (local $3 (ref $bot)) + ;; CHECK-NEXT: (local $4 (ref $func)) + ;; CHECK-NEXT: (local $5 (ref $array)) + ;; CHECK-NEXT: (local $6 (ref $cont)) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ) + (func $use-types + (local (ref $final)) + (local (ref $top)) + (local (ref $mid)) + (local (ref $bot)) + (local (ref $func)) + (local (ref $array)) + (local (ref $cont)) + ) +) |