diff options
Diffstat (limited to 'test/lit/legacy-static-casts.wast')
-rw-r--r-- | test/lit/legacy-static-casts.wast | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/test/lit/legacy-static-casts.wast b/test/lit/legacy-static-casts.wast index 893fb0a33..dfef240d3 100644 --- a/test/lit/legacy-static-casts.wast +++ b/test/lit/legacy-static-casts.wast @@ -5,11 +5,11 @@ ;; RUN: wasm-opt %s -all -S -o - | filecheck %s (module - ;; CHECK: (type $none_=>_none (func)) - ;; 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 @@ -26,6 +26,20 @@ ;; 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 @@ -43,5 +57,19 @@ (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) + ) + ) + ) ) ) |