diff options
author | Thomas Lively <tlively@google.com> | 2023-06-12 08:52:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 08:52:17 -0700 |
commit | dc30f42a8c2da6c62e287fd881671b59b1866baa (patch) | |
tree | 539d683f9a9bbd96915d65bc631d6f0e6c40a5be /test/lit/legacy-static-casts.wast | |
parent | 4ec79ce9826d96225d33dec77dfc344adab92606 (diff) | |
download | binaryen-dc30f42a8c2da6c62e287fd881671b59b1866baa.tar.gz binaryen-dc30f42a8c2da6c62e287fd881671b59b1866baa.tar.bz2 binaryen-dc30f42a8c2da6c62e287fd881671b59b1866baa.zip |
Update br_on_cast binary and text format (#5762)
The final versions of the br_on_cast and br_on_cast_fail instructions have two
reference type annotations: one for the input type and one for the cast target
type. In the binary format, this is represented as a flags byte followed by two
encoded heap types. Upgrade all of the tests at once to use the new versions of
the instructions and drop support for the old instructions from the text parser.
Keep support in the binary parser to avoid breaking users, though. Drop some
binary tests of deprecated instruction encodings that would be more effort to
update than they're worth.
Re-land with fixes of #5734
Diffstat (limited to 'test/lit/legacy-static-casts.wast')
-rw-r--r-- | test/lit/legacy-static-casts.wast | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/test/lit/legacy-static-casts.wast b/test/lit/legacy-static-casts.wast index dfef240d3..893fb0a33 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,20 +26,6 @@ ;; 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 @@ -57,19 +43,5 @@ (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) - ) - ) - ) ) ) |