summaryrefslogtreecommitdiff
path: root/test/lit/passes/tuple-optimization.wast
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-04-11 09:22:04 -0700
committerGitHub <noreply@github.com>2024-04-11 09:22:04 -0700
commitadea6e0f80c68108691f28ab4aa81b8f8973ac35 (patch)
treef14db2e43e7307a3472e297e014f109b8fb28f7c /test/lit/passes/tuple-optimization.wast
parentdd092420b9468450fa7cbded8adbdc8489857a0e (diff)
downloadbinaryen-adea6e0f80c68108691f28ab4aa81b8f8973ac35.tar.gz
binaryen-adea6e0f80c68108691f28ab4aa81b8f8973ac35.tar.bz2
binaryen-adea6e0f80c68108691f28ab4aa81b8f8973ac35.zip
Ensure printed tuple.extract arity is valid (#6487)
We previously printed the size of the tuple operand as the arity, but that printed `1` when the operand is unreachable. We don't allow our text input to use `1` as the arity, so don't print it, either. Instead, print the smallest valid arity, `2`, in this case.
Diffstat (limited to 'test/lit/passes/tuple-optimization.wast')
-rw-r--r--test/lit/passes/tuple-optimization.wast4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lit/passes/tuple-optimization.wast b/test/lit/passes/tuple-optimization.wast
index a7e952fba..d092d479f 100644
--- a/test/lit/passes/tuple-optimization.wast
+++ b/test/lit/passes/tuple-optimization.wast
@@ -580,12 +580,12 @@
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.extract 1 0
+ ;; CHECK-NEXT: (tuple.extract 2 0
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.extract 1 1
+ ;; CHECK-NEXT: (tuple.extract 2 1
;; CHECK-NEXT: (local.tee $tuple
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )