summaryrefslogtreecommitdiff
path: root/test/lit/binary/legacy-static-casts.test
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-05-23 10:38:00 -0700
committerGitHub <noreply@github.com>2023-05-23 10:38:00 -0700
commite8ac658a5db2fadc93c3d317d465eed253e191ed (patch)
tree29a02aa1bea161be7c25713a5ae435f708b42b87 /test/lit/binary/legacy-static-casts.test
parent5beebc6b249c6393e0dbf69f0ec2374eca5d387b (diff)
downloadbinaryen-e8ac658a5db2fadc93c3d317d465eed253e191ed.tar.gz
binaryen-e8ac658a5db2fadc93c3d317d465eed253e191ed.tar.bz2
binaryen-e8ac658a5db2fadc93c3d317d465eed253e191ed.zip
Revert "Update br_on_cast binary and text format (#5734)" (#5740)
This reverts commit b7b1d0df29df14634d2c680d1d2c351b624b4fbb. See comment at the end of #5734: It turns out that dropping the old opcodes causes problems for current users, so let's revert this for now, and later we can figure out how best to do the update.
Diffstat (limited to 'test/lit/binary/legacy-static-casts.test')
-rw-r--r--test/lit/binary/legacy-static-casts.test41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/lit/binary/legacy-static-casts.test b/test/lit/binary/legacy-static-casts.test
new file mode 100644
index 000000000..49ed204a7
--- /dev/null
+++ b/test/lit/binary/legacy-static-casts.test
@@ -0,0 +1,41 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+
+;; Test that the opcodes for the deprecated *_static cast instructions still parse.
+
+;; RUN: wasm-opt %s.wasm -all -S -o - | filecheck %s
+
+;; CHECK: (type ${} (struct ))
+
+;; CHECK: (type $none_=>_none (func))
+
+;; CHECK: (func $0 (type $none_=>_none)
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (ref.test ${}
+;; CHECK-NEXT: (ref.null none)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (ref.cast null none
+;; CHECK-NEXT: (ref.null none)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (ref.cast_nop none
+;; CHECK-NEXT: (ref.null none)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (block $label$1 (result (ref null ${}))
+;; CHECK-NEXT: (br_on_cast $label$1 ${}
+;; CHECK-NEXT: (ref.null none)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: (drop
+;; CHECK-NEXT: (block $label$2 (result (ref null ${}))
+;; CHECK-NEXT: (br_on_cast_fail $label$2 ${}
+;; CHECK-NEXT: (ref.null none)
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )
+;; CHECK-NEXT: )