summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/passes/tuple-optimization.wast20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lit/passes/tuple-optimization.wast b/test/lit/passes/tuple-optimization.wast
index 1788b91e9..766f51e81 100644
--- a/test/lit/passes/tuple-optimization.wast
+++ b/test/lit/passes/tuple-optimization.wast
@@ -569,6 +569,7 @@
;; CHECK: (func $unreachability (type $0)
;; CHECK-NEXT: (local $tuple (i32 i32))
+ ;; CHECK-NEXT: (local $nontuple f64)
;; CHECK-NEXT: (local.set $tuple
;; CHECK-NEXT: (tuple.make
;; CHECK-NEXT: (i32.const 1)
@@ -590,9 +591,17 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (drop
+ ;; CHECK-NEXT: (local.tee $tuple
+ ;; CHECK-NEXT: (local.tee $nontuple
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $unreachability
(local $tuple (i32 i32))
+ (local $nontuple f64)
(local.set $tuple
(tuple.make
(i32.const 1)
@@ -615,6 +624,17 @@
)
)
)
+ ;; Teeing a nontuple into a tuple is allowed in unreachable code (the input
+ ;; to the outer tee is simply unreachable, so there is no checking that we
+ ;; are copying a local into another local of a compatible type). We should
+ ;; not error here.
+ (drop
+ (local.tee $tuple
+ (local.tee $nontuple
+ (unreachable)
+ )
+ )
+ )
)
;; CHECK: (func $tee-chain (type $0)