diff options
Diffstat (limited to 'test/lit/legacy-static-casts.wast')
-rw-r--r-- | test/lit/legacy-static-casts.wast | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/test/lit/legacy-static-casts.wast b/test/lit/legacy-static-casts.wast new file mode 100644 index 000000000..0cbd30a2d --- /dev/null +++ b/test/lit/legacy-static-casts.wast @@ -0,0 +1,75 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; Check that the deprecated *_static instruction names are still parsed correctly. + +;; RUN: wasm-opt %s -all -S -o - | filecheck %s + +(module + ;; CHECK: (type $struct (struct )) + (type $struct (struct)) + + ;; CHECK: (type $none_=>_none (func)) + + ;; CHECK: (func $test (type $none_=>_none) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (ref.test $struct + ;; CHECK-NEXT: (ref.null none) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (ref.cast null $struct + ;; CHECK-NEXT: (ref.null none) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (ref.cast_nop $struct + ;; CHECK-NEXT: (ref.null none) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (block $l1 (result (ref null $struct)) + ;; CHECK-NEXT: (br_on_cast $l1 $struct + ;; CHECK-NEXT: (ref.null none) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (block $l2 (result (ref null $struct)) + ;; CHECK-NEXT: (br_on_cast_fail $l2 $struct + ;; CHECK-NEXT: (ref.null none) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $test + (drop + (ref.test_static $struct + (ref.null none) + ) + ) + (drop + (ref.cast_static $struct + (ref.null none) + ) + ) + (drop + (ref.cast_nop_static $struct + (ref.null none) + ) + ) + (drop + (block $l1 (result (ref null $struct)) + (br_on_cast_static $l1 $struct + (ref.null none) + ) + ) + ) + (drop + (block $l2 (result (ref null $struct)) + (br_on_cast_static_fail $l2 $struct + (ref.null none) + ) + ) + ) + ) +) |