summaryrefslogtreecommitdiff
path: root/test/lit/passes/gufa-refs.wast
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-03-08 08:10:37 -0800
committerGitHub <noreply@github.com>2024-03-08 08:10:37 -0800
commit7af0b474304c30134ef875567668bb6cd36e21aa (patch)
treeeb7aeba1ef0f84e172afe720c138db5f513bd6e4 /test/lit/passes/gufa-refs.wast
parentd6c5e4ab15df271521df7b35665c7463b2c490ca (diff)
downloadbinaryen-7af0b474304c30134ef875567668bb6cd36e21aa.tar.gz
binaryen-7af0b474304c30134ef875567668bb6cd36e21aa.tar.bz2
binaryen-7af0b474304c30134ef875567668bb6cd36e21aa.zip
Fix printing of bulk array ops (#6387)
When the bulk array ops had unreachable or null array types, they were replaced with blocks, but not using the correct code that also prints all their children as dropped followed by an unreachable. This meant that the text output in those cases did not parse as a valid module. Fix the bug. A follow-up PR will simplify the code to prevent similar bugs from occurring in the future.
Diffstat (limited to 'test/lit/passes/gufa-refs.wast')
-rw-r--r--test/lit/passes/gufa-refs.wast17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index e6e5d0bde..4be45e4ca 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -5632,11 +5632,20 @@
(data $0 "")
;; CHECK: (func $test (type $0)
- ;; CHECK-NEXT: (block
+ ;; CHECK-NEXT: (block ;; (replaces unreachable ArrayInitData we can't emit)
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (i32.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (i32.const 1)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: (unreachable)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $test