summaryrefslogtreecommitdiff
path: root/test/lit/passes/optimize-instructions-gc-extern.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-10-21 13:23:44 -0700
committerGitHub <noreply@github.com>2022-10-21 20:23:44 +0000
commit32423c6c83882c04ae37e90a18be78aa9db4a242 (patch)
treeddad6c517ef0849d89cfec500aa8482cd2184bc6 /test/lit/passes/optimize-instructions-gc-extern.wast
parent8967e4703f815a4c11f671348accd43ec696af7b (diff)
downloadbinaryen-32423c6c83882c04ae37e90a18be78aa9db4a242.tar.gz
binaryen-32423c6c83882c04ae37e90a18be78aa9db4a242.tar.bz2
binaryen-32423c6c83882c04ae37e90a18be78aa9db4a242.zip
Fix fuzzer to ignore externalize/internalize (#5176)
The fuzzer started to fail on the recent externalize/internalize test that was added in #5175 as we lack interpreter support. Move that to a separate file and ignore it in the fuzzer for now.
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-extern.wast')
-rw-r--r--test/lit/passes/optimize-instructions-gc-extern.wast59
1 files changed, 59 insertions, 0 deletions
diff --git a/test/lit/passes/optimize-instructions-gc-extern.wast b/test/lit/passes/optimize-instructions-gc-extern.wast
new file mode 100644
index 000000000..18c91f1bb
--- /dev/null
+++ b/test/lit/passes/optimize-instructions-gc-extern.wast
@@ -0,0 +1,59 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
+;; RUN: wasm-opt %s --optimize-instructions -all -S -o - \
+;; RUN: | filecheck %s
+
+(module
+ ;; CHECK: (func $extern.externalize (param $x anyref) (param $y externref)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (extern.externalize
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (extern.externalize
+ ;; CHECK-NEXT: (ref.as_non_null
+ ;; CHECK-NEXT: (local.get $x)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (extern.internalize
+ ;; CHECK-NEXT: (local.get $y)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (extern.internalize
+ ;; CHECK-NEXT: (ref.as_non_null
+ ;; CHECK-NEXT: (local.get $y)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ (func $extern.externalize (export "ext") (param $x (ref null any)) (param $y (ref null extern))
+ ;; We should not change anything here, and also not hit an internal error.
+ (drop
+ (extern.externalize
+ (local.get $x)
+ )
+ )
+ (drop
+ (extern.externalize
+ (ref.as_non_null
+ (local.get $x)
+ )
+ )
+ )
+ (drop
+ (extern.internalize
+ (local.get $y)
+ )
+ )
+ (drop
+ (extern.internalize
+ (ref.as_non_null
+ (local.get $y)
+ )
+ )
+ )
+ )
+)