summaryrefslogtreecommitdiff
path: root/test/lit/passes
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes')
-rw-r--r--test/lit/passes/asyncify_enable-multivalue.wast2
-rw-r--r--test/lit/passes/coalesce-locals-gc-nn.wast8
-rw-r--r--test/lit/passes/coalesce-locals-gc.wast24
-rw-r--r--test/lit/passes/dae-gc-refine-return.wast4
-rw-r--r--test/lit/passes/gufa-refs.wast4
-rw-r--r--test/lit/passes/local-subtyping.wast4
-rw-r--r--test/lit/passes/optimize-instructions-multivalue.wast8
-rw-r--r--test/lit/passes/optimize-stack-ir.wast4
-rw-r--r--test/lit/passes/outlining.wast2
-rw-r--r--test/lit/passes/poppify-globals.wast4
-rw-r--r--test/lit/passes/poppify.wast18
-rw-r--r--test/lit/passes/precompute-gc.wast4
-rw-r--r--test/lit/passes/remove-unused-brs.wast8
-rw-r--r--test/lit/passes/roundtrip.wast4
-rw-r--r--test/lit/passes/simplify-locals-gc-nn.wast8
-rw-r--r--test/lit/passes/stack-ir-non-nullable.wast24
-rw-r--r--test/lit/passes/tuple-optimization.wast70
-rw-r--r--test/lit/passes/unsubtyping.wast4
-rw-r--r--test/lit/passes/vacuum_all-features.wast4
19 files changed, 104 insertions, 104 deletions
diff --git a/test/lit/passes/asyncify_enable-multivalue.wast b/test/lit/passes/asyncify_enable-multivalue.wast
index b82d53f94..bfc154f81 100644
--- a/test/lit/passes/asyncify_enable-multivalue.wast
+++ b/test/lit/passes/asyncify_enable-multivalue.wast
@@ -1758,7 +1758,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.load
;; CHECK-NEXT: (local.get $5)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/coalesce-locals-gc-nn.wast b/test/lit/passes/coalesce-locals-gc-nn.wast
index 4dfce0242..1611a106e 100644
--- a/test/lit/passes/coalesce-locals-gc-nn.wast
+++ b/test/lit/passes/coalesce-locals-gc-nn.wast
@@ -6,13 +6,13 @@
;; CHECK-NEXT: (local $1 ((ref any) (ref any)))
;; CHECK-NEXT: (local $2 ((ref any) (ref any)))
;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $2
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
@@ -48,13 +48,13 @@
;; of current limitations on tuple handling in this pass, so we are mainly
;; testing for not crashing here.
(local.set $x
- (tuple.make
+ (tuple.make 2
(local.get $any)
(local.get $any)
)
)
(local.set $y
- (tuple.make
+ (tuple.make 2
(local.get $any)
(local.get $any)
)
diff --git a/test/lit/passes/coalesce-locals-gc.wast b/test/lit/passes/coalesce-locals-gc.wast
index 5122fc23b..320cebb84 100644
--- a/test/lit/passes/coalesce-locals-gc.wast
+++ b/test/lit/passes/coalesce-locals-gc.wast
@@ -16,13 +16,13 @@
;; CHECK: (global $global (ref null $array) (ref.null none))
(global $global (ref null $array) (ref.null $array))
- ;; CHECK: (global $nn-tuple-global (mut ((ref any) i32)) (tuple.make
+ ;; CHECK: (global $nn-tuple-global (mut ((ref any) i32)) (tuple.make 2
;; CHECK-NEXT: (ref.i31
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: ))
- (global $nn-tuple-global (mut ((ref any) i32)) (tuple.make (ref.i31 (i32.const 0)) (i32.const 1)))
+ (global $nn-tuple-global (mut ((ref any) i32)) (tuple.make 2 (ref.i31 (i32.const 0)) (i32.const 1)))
;; CHECK: (func $test-dead-get-non-nullable (type $6) (param $0 (ref struct))
@@ -286,7 +286,7 @@
;; CHECK: (func $test (type $10) (param $0 (ref any)) (result (ref any) i32)
;; CHECK-NEXT: (local $1 (anyref i32))
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: )
@@ -294,13 +294,13 @@
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.set $1
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -311,7 +311,7 @@
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (if (type $1) (result (ref any) i32)
;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.as_non_null
;; CHECK-NEXT: (tuple.extract 0
;; CHECK-NEXT: (local.get $1)
@@ -321,7 +321,7 @@
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.as_non_null
;; CHECK-NEXT: (tuple.extract 0
;; CHECK-NEXT: (local.get $1)
@@ -333,7 +333,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.as_non_null
;; CHECK-NEXT: (tuple.extract 0
;; CHECK-NEXT: (local.get $1)
@@ -345,7 +345,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.as_non_null
;; CHECK-NEXT: (tuple.extract 0
;; CHECK-NEXT: (local.get $1)
@@ -361,7 +361,7 @@
(local $y ((ref any) i32))
;; This store is dead and will be removed.
(local.set $x
- (tuple.make
+ (tuple.make 2
(local.get $any)
(i32.const 0)
)
@@ -370,13 +370,13 @@
(i32.const 0)
;; These two sets will remain.
(local.set $x
- (tuple.make
+ (tuple.make 2
(local.get $any)
(i32.const 1)
)
)
(local.set $x
- (tuple.make
+ (tuple.make 2
(local.get $any)
(i32.const 2)
)
diff --git a/test/lit/passes/dae-gc-refine-return.wast b/test/lit/passes/dae-gc-refine-return.wast
index 595a562e8..857f79a06 100644
--- a/test/lit/passes/dae-gc-refine-return.wast
+++ b/test/lit/passes/dae-gc-refine-return.wast
@@ -243,7 +243,7 @@
;; CHECK-NEXT: (call $refine-return-tuple)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (local.get $i31)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
@@ -258,7 +258,7 @@
)
)
- (tuple.make
+ (tuple.make 2
(local.get $i31)
(i32.const 1)
)
diff --git a/test/lit/passes/gufa-refs.wast b/test/lit/passes/gufa-refs.wast
index 11a72b644..18490fa91 100644
--- a/test/lit/passes/gufa-refs.wast
+++ b/test/lit/passes/gufa-refs.wast
@@ -4206,7 +4206,7 @@
;; CHECK: (func $tuples (type $0)
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -4214,7 +4214,7 @@
;; CHECK-NEXT: )
(func $tuples
(drop
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
diff --git a/test/lit/passes/local-subtyping.wast b/test/lit/passes/local-subtyping.wast
index 38571e703..17ad5dc13 100644
--- a/test/lit/passes/local-subtyping.wast
+++ b/test/lit/passes/local-subtyping.wast
@@ -302,7 +302,7 @@
;; CHECK: (func $nondefaultable (type $0)
;; CHECK-NEXT: (local $x (funcref funcref))
;; CHECK-NEXT: (local.set $x
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.func $i32)
;; CHECK-NEXT: (ref.func $i32)
;; CHECK-NEXT: )
@@ -313,7 +313,7 @@
;; This tuple is assigned non-nullable values, which means the subtype is
;; nondefaultable, and we must not apply it.
(local.set $x
- (tuple.make
+ (tuple.make 2
(ref.func $i32)
(ref.func $i32)
)
diff --git a/test/lit/passes/optimize-instructions-multivalue.wast b/test/lit/passes/optimize-instructions-multivalue.wast
index 1e456f20f..b7a871ce2 100644
--- a/test/lit/passes/optimize-instructions-multivalue.wast
+++ b/test/lit/passes/optimize-instructions-multivalue.wast
@@ -68,7 +68,7 @@
(func $extract-make (param $x i32) (param $y i32) (result i32)
;; An extraction from a make can be simplified to just get the right lane.
(tuple.extract 0
- (tuple.make
+ (tuple.make 2
(local.get $x)
(local.get $y)
)
@@ -87,7 +87,7 @@
(func $extract-make-2 (param $x i32) (param $y i32) (result i32)
;; As above, but the second lane.
(tuple.extract 1
- (tuple.make
+ (tuple.make 2
(local.get $x)
(local.get $y)
)
@@ -96,7 +96,7 @@
;; CHECK: (func $extract-make-unreachable (param $x i32) (param $y i32) (result i32)
;; CHECK-NEXT: (tuple.extract 0
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: (local.get $y)
;; CHECK-NEXT: )
@@ -104,7 +104,7 @@
;; CHECK-NEXT: )
(func $extract-make-unreachable (param $x i32) (param $y i32) (result i32)
(tuple.extract 0
- (tuple.make
+ (tuple.make 2
(unreachable) ;; because of this we should do nothing
(local.get $y)
)
diff --git a/test/lit/passes/optimize-stack-ir.wast b/test/lit/passes/optimize-stack-ir.wast
index d937f7257..5efccdb3a 100644
--- a/test/lit/passes/optimize-stack-ir.wast
+++ b/test/lit/passes/optimize-stack-ir.wast
@@ -1404,7 +1404,7 @@
;; CHECK-NEXT: (local $f32 f32)
;; CHECK-NEXT: f32.const 0
;; CHECK-NEXT: i32.const 0
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $pair
;; CHECK-NEXT: local.get $pair
;; CHECK-NEXT: tuple.extract 0
@@ -1416,7 +1416,7 @@
;; We should not optimize out this get-set pair in Stack IR since we can do
;; better in the binary writer.
(local.set $pair
- (tuple.make
+ (tuple.make 2
(f32.const 0)
(i32.const 0)
)
diff --git a/test/lit/passes/outlining.wast b/test/lit/passes/outlining.wast
index b42ac54de..f74b887b1 100644
--- a/test/lit/passes/outlining.wast
+++ b/test/lit/passes/outlining.wast
@@ -634,7 +634,7 @@
;; CHECK: (type $1 (func))
;; CHECK: (func $outline$ (type $0) (result i32 i32)
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: )
diff --git a/test/lit/passes/poppify-globals.wast b/test/lit/passes/poppify-globals.wast
index b27c5e714..26af942b5 100644
--- a/test/lit/passes/poppify-globals.wast
+++ b/test/lit/passes/poppify-globals.wast
@@ -14,7 +14,7 @@
(global $tuple$1 f64 (f64.const 0)) ;; interfering name!
(global $tuple (mut (i32 i64 f32))
- (tuple.make (global.get $foo) (i64.const 1) (f32.const 2))
+ (tuple.make 3 (global.get $foo) (i64.const 1) (f32.const 2))
)
(global $other-tuple (i32 i64 f32) (global.get $tuple))
@@ -56,7 +56,7 @@
;; CHECK-NEXT: )
(func $global-set-tuple
(global.set $tuple
- (tuple.make
+ (tuple.make 3
(i32.const 0)
(i64.const 1)
(f32.const 2)
diff --git a/test/lit/passes/poppify.wast b/test/lit/passes/poppify.wast
index 4aa44a3d5..6cd11092c 100644
--- a/test/lit/passes/poppify.wast
+++ b/test/lit/passes/poppify.wast
@@ -282,7 +282,7 @@
;; CHECK-NEXT: (i64.const 1)
;; CHECK-NEXT: )
(func $tuple (result i32 i64)
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(i64.const 1)
)
@@ -301,7 +301,7 @@
;; CHECK-NEXT: )
(func $extract-first (result i32)
(tuple.extract 0
- (tuple.make
+ (tuple.make 3
(i32.const 0)
(i64.const 1)
(f32.const 2)
@@ -327,7 +327,7 @@
;; CHECK-NEXT: )
(func $extract-middle (result i64)
(tuple.extract 1
- (tuple.make
+ (tuple.make 3
(i32.const 0)
(i64.const 1)
(f32.const 2)
@@ -353,7 +353,7 @@
;; CHECK-NEXT: )
(func $extract-last (result f32)
(tuple.extract 2
- (tuple.make
+ (tuple.make 3
(i32.const 0)
(i64.const 1)
(f32.const 2)
@@ -385,7 +385,7 @@
;; CHECK-NEXT: )
(func $drop-tuple
(drop
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(i64.const 1)
)
@@ -434,7 +434,7 @@
(func $local-set-tuple
(local $x (i32 i64))
(local.set $x
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(i64.const 1)
)
@@ -458,7 +458,7 @@
(func $local-tee-tuple (result i32 i64)
(local $x (i32 i64))
(local.tee $x
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(i64.const 1)
)
@@ -477,7 +477,7 @@
(func $break-tuple (result i32 i64)
(block $l (result i32 i64)
(br $l
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(i64.const 1)
)
@@ -494,7 +494,7 @@
;; CHECK-NEXT: )
(func $return-tuple (result i32 i64)
(return
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(i64.const 1)
)
diff --git a/test/lit/passes/precompute-gc.wast b/test/lit/passes/precompute-gc.wast
index 901ad5c24..3e026daa3 100644
--- a/test/lit/passes/precompute-gc.wast
+++ b/test/lit/passes/precompute-gc.wast
@@ -767,7 +767,7 @@
;; CHECK: (func $odd-cast-and-get-tuple (type $3)
;; CHECK-NEXT: (local $temp ((ref null $B) i32))
;; CHECK-NEXT: (local.set $temp
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.null none)
;; CHECK-NEXT: (i32.const 10)
;; CHECK-NEXT: )
@@ -785,7 +785,7 @@
(local $temp ((ref null $B) i32))
;; As above, but with a tuple.
(local.set $temp
- (tuple.make
+ (tuple.make 2
(ref.cast (ref null $B)
(ref.null $A)
)
diff --git a/test/lit/passes/remove-unused-brs.wast b/test/lit/passes/remove-unused-brs.wast
index 8392dfe86..1027fafdd 100644
--- a/test/lit/passes/remove-unused-brs.wast
+++ b/test/lit/passes/remove-unused-brs.wast
@@ -330,7 +330,7 @@
;; CHECK-NEXT: (block $block (type $2) (result i32 i32)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (br_if $block
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (call $restructure-br_if
;; CHECK-NEXT: (i32.const 2)
@@ -339,7 +339,7 @@
;; CHECK-NEXT: (i32.const 3)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 4)
;; CHECK-NEXT: (i32.const 5)
;; CHECK-NEXT: )
@@ -351,7 +351,7 @@
(block $block (result i32 i32)
(drop
(br_if $block
- (tuple.make
+ (tuple.make 2
(i32.const 1)
;; Add a side effect to prevent us turning $block into a
;; restructured if - instead, we will try a restructured select.
@@ -364,7 +364,7 @@
(i32.const 3)
)
)
- (tuple.make
+ (tuple.make 2
(i32.const 4)
(i32.const 5)
)
diff --git a/test/lit/passes/roundtrip.wast b/test/lit/passes/roundtrip.wast
index 2f3fd4009..34cfa72b7 100644
--- a/test/lit/passes/roundtrip.wast
+++ b/test/lit/passes/roundtrip.wast
@@ -9,7 +9,7 @@
;; CHECK-NEXT: (local $1 funcref)
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $label$1 (type $1) (result funcref (ref $none))
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.null nofunc)
;; CHECK-NEXT: (ref.func $foo)
;; CHECK-NEXT: )
@@ -35,7 +35,7 @@
(drop
;; a tuple type with a non-nullable element, that must be carefully handled
(block $block (result funcref (ref $none))
- (tuple.make
+ (tuple.make 2
(ref.null func)
(ref.func $foo)
)
diff --git a/test/lit/passes/simplify-locals-gc-nn.wast b/test/lit/passes/simplify-locals-gc-nn.wast
index c691ebb3f..793a40f65 100644
--- a/test/lit/passes/simplify-locals-gc-nn.wast
+++ b/test/lit/passes/simplify-locals-gc-nn.wast
@@ -55,7 +55,7 @@
;; CHECK-NEXT: (try $try
;; CHECK-NEXT: (do
;; CHECK-NEXT: (local.set $nn
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 3
;; CHECK-NEXT: (i32.const 0)
;; CHECK-NEXT: (ref.as_non_null
;; CHECK-NEXT: (ref.null none)
@@ -66,7 +66,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (catch_all
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 3
;; CHECK-NEXT: (tuple.extract 0
;; CHECK-NEXT: (local.get $nn)
;; CHECK-NEXT: )
@@ -87,7 +87,7 @@
;; Same as above, but now the local is a tuple containing a non-nullable element
(local $nn (i32 (ref any) i64))
(local.set $nn
- (tuple.make
+ (tuple.make 3
(i32.const 0)
(ref.as_non_null
(ref.null any)
@@ -166,7 +166,7 @@
(if
(i32.const 0)
(local.set $temp
- (tuple.make
+ (tuple.make 2
(ref.func $if-return-tuple-nn)
(ref.null none)
)
diff --git a/test/lit/passes/stack-ir-non-nullable.wast b/test/lit/passes/stack-ir-non-nullable.wast
index 0dfc4d370..f397aa22e 100644
--- a/test/lit/passes/stack-ir-non-nullable.wast
+++ b/test/lit/passes/stack-ir-non-nullable.wast
@@ -343,7 +343,7 @@
;; CHECK-NEXT: (local $temp (i32 (ref eq)))
;; CHECK-NEXT: i32.const 0
;; CHECK-NEXT: local.get $param
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $temp
;; CHECK-NEXT: local.get $temp
;; CHECK-NEXT: tuple.extract 1
@@ -354,13 +354,13 @@
;; CHECK-NEXT: i32.const 2
;; CHECK-NEXT: i32.const 3
;; CHECK-NEXT: ref.i31
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $temp
;; CHECK-NEXT: else
;; CHECK-NEXT: i32.const 4
;; CHECK-NEXT: i32.const 5
;; CHECK-NEXT: ref.i31
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $temp
;; CHECK-NEXT: end
;; CHECK-NEXT: local.get $temp
@@ -372,7 +372,7 @@
;; than a non-nullable reference by itself. We cannot remove the first set
;; here.
(local.set $temp
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(local.get $param)
)
@@ -387,7 +387,7 @@
)
)
(local.set $temp
- (tuple.make
+ (tuple.make 2
(i32.const 2)
(i31.new
(i32.const 3)
@@ -395,7 +395,7 @@
)
)
(local.set $temp
- (tuple.make
+ (tuple.make 2
(i32.const 4)
(i31.new
(i32.const 5)
@@ -412,7 +412,7 @@
;; CHECK-NEXT: (local $temp (i32 eqref))
;; CHECK-NEXT: i32.const 0
;; CHECK-NEXT: local.get $param
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $temp
;; CHECK-NEXT: local.get $temp
;; CHECK-NEXT: tuple.extract 1
@@ -423,13 +423,13 @@
;; CHECK-NEXT: i32.const 2
;; CHECK-NEXT: i32.const 3
;; CHECK-NEXT: ref.i31
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $temp
;; CHECK-NEXT: else
;; CHECK-NEXT: i32.const 4
;; CHECK-NEXT: i32.const 5
;; CHECK-NEXT: ref.i31
- ;; CHECK-NEXT: tuple.make
+ ;; CHECK-NEXT: tuple.make 2
;; CHECK-NEXT: local.set $temp
;; CHECK-NEXT: end
;; CHECK-NEXT: local.get $temp
@@ -440,7 +440,7 @@
;; As the last testcase, but now $temp is a defaultable tuple. We still do not
;; optimize away the set here, as we ignore tuples in local2stack.
(local.set $temp
- (tuple.make
+ (tuple.make 2
(i32.const 0)
(local.get $param)
)
@@ -455,7 +455,7 @@
)
)
(local.set $temp
- (tuple.make
+ (tuple.make 2
(i32.const 2)
(i31.new
(i32.const 3)
@@ -463,7 +463,7 @@
)
)
(local.set $temp
- (tuple.make
+ (tuple.make 2
(i32.const 4)
(i31.new
(i32.const 5)
diff --git a/test/lit/passes/tuple-optimization.wast b/test/lit/passes/tuple-optimization.wast
index 6884f95c5..4174bea24 100644
--- a/test/lit/passes/tuple-optimization.wast
+++ b/test/lit/passes/tuple-optimization.wast
@@ -18,7 +18,7 @@
;; This tuple local can be optimized into separate locals per lane. The
;; tuple local itself then has no uses and other passes will remove it.
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -108,7 +108,7 @@
(func $set-and-gets
(local $tuple (i32 i32))
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -172,7 +172,7 @@
(local $tuple2 (i32 i32))
(local.set $tuple
(local.tee $tuple2
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -225,7 +225,7 @@
(drop
(tuple.extract 0
(local.tee $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -237,7 +237,7 @@
;; CHECK: (func $just-tee-bad (type $1) (result i32 i32)
;; CHECK-NEXT: (local $tuple (i32 i32))
;; CHECK-NEXT: (local.tee $tuple
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -247,7 +247,7 @@
(local $tuple (i32 i32))
;; This tee goes somewhere we cannot handle, so we do not optimize here.
(local.tee $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -283,7 +283,7 @@
;; still optimize both.
(local.set $tuple
(local.tee $tuple2
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -296,7 +296,7 @@
;; CHECK-NEXT: (local $tuple2 (i32 i32))
;; CHECK-NEXT: (local.set $tuple
;; CHECK-NEXT: (local.tee $tuple2
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -311,7 +311,7 @@
;; being optimized too, due to the copy between them.
(local.set $tuple
(local.tee $tuple2
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -325,7 +325,7 @@
;; CHECK-NEXT: (local $tuple2 (i32 i32))
;; CHECK-NEXT: (local.set $tuple
;; CHECK-NEXT: (local.tee $tuple2
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -339,7 +339,7 @@
;; As above, but now the set is bad.
(local.set $tuple
(local.tee $tuple2
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -385,7 +385,7 @@
(local $tuple2 (i32 i32))
;; We can optimize both these tuples.
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -403,7 +403,7 @@
;; CHECK-NEXT: (local $tuple (i32 i32))
;; CHECK-NEXT: (local $tuple2 (i32 i32))
;; CHECK-NEXT: (local.set $tuple
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -417,7 +417,7 @@
(local $tuple (i32 i32))
(local $tuple2 (i32 i32))
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -433,7 +433,7 @@
;; CHECK-NEXT: (local $tuple (i32 i32))
;; CHECK-NEXT: (local $tuple2 (i32 i32))
;; CHECK-NEXT: (local.set $tuple
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -447,7 +447,7 @@
(local $tuple (i32 i32))
(local $tuple2 (i32 i32))
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -482,7 +482,7 @@
;; CHECK: (func $make-extract-no-local (type $0)
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 0
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -494,7 +494,7 @@
;; help on this kind of thing.
(drop
(tuple.extract 0
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -516,7 +516,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 0
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -526,7 +526,7 @@
(func $make-extract-no-local-but-other
(local $tuple (i32 i32))
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -535,7 +535,7 @@
;; is an unrelated local that can be optimized. We should remain as before.
(drop
(tuple.extract 0
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -547,7 +547,7 @@
;; CHECK-NEXT: (local $tuple (i32 i32))
;; CHECK-NEXT: (local.set $tuple
;; CHECK-NEXT: (block (type $1) (result i32 i32)
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -559,7 +559,7 @@
;; We do not handle blocks yet, so this is not optimized.
(local.set $tuple
(block (result i32 i32)
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -571,7 +571,7 @@
;; CHECK-NEXT: (local $tuple (i32 i32))
;; CHECK-NEXT: (local $nontuple f64)
;; CHECK-NEXT: (local.set $tuple
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -603,7 +603,7 @@
(local $tuple (i32 i32))
(local $nontuple f64)
(local.set $tuple
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -686,7 +686,7 @@
(local.tee $tuple
(local.tee $tuple2
(local.tee $tuple3
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -759,7 +759,7 @@
(local $tuple3 (i32 i32 i32))
;; A chain of 3 copied tuples.
(local.set $tuple
- (tuple.make
+ (tuple.make 3
(i32.const 1)
(i32.const 2)
(i32.const 3)
@@ -794,7 +794,7 @@
;; CHECK-NEXT: (local $tuple2 (i32 i32 i32))
;; CHECK-NEXT: (local $tuple3 (i32 i32 i32))
;; CHECK-NEXT: (local.set $tuple
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 3
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: (i32.const 3)
@@ -830,7 +830,7 @@
;; As above, but a get at the very end prevents the entire chain from being
;; optimized.
(local.set $tuple
- (tuple.make
+ (tuple.make 3
(i32.const 1)
(i32.const 2)
(i32.const 3)
@@ -871,7 +871,7 @@
;; CHECK-NEXT: (local.get $tuple)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (i32.const 1)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )
@@ -887,7 +887,7 @@
(local.get $tuple)
)
)
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
@@ -931,13 +931,13 @@
(local $tuple2 (i32 i32))
(local $tuple3 (i32 i32 i32))
(local.set $tuple2
- (tuple.make
+ (tuple.make 2
(i32.const 1)
(i32.const 2)
)
)
(local.set $tuple3
- (tuple.make
+ (tuple.make 3
(tuple.extract 0
(local.get $tuple2)
)
@@ -998,14 +998,14 @@
(local $tuple2 (i32 i32))
(local $tuple3 (i32 i32 i32))
(local.set $tuple3
- (tuple.make
+ (tuple.make 3
(i32.const 1)
(i32.const 2)
(i32.const 3)
)
)
(local.set $tuple2
- (tuple.make
+ (tuple.make 2
(tuple.extract 0
(local.get $tuple3)
)
diff --git a/test/lit/passes/unsubtyping.wast b/test/lit/passes/unsubtyping.wast
index 836aec036..df7e6c033 100644
--- a/test/lit/passes/unsubtyping.wast
+++ b/test/lit/passes/unsubtyping.wast
@@ -705,7 +705,7 @@
;; CHECK: (func $return-many (type $4) (result (ref $super1) (ref $super2))
;; CHECK-NEXT: (return
- ;; CHECK-NEXT: (tuple.make
+ ;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (struct.new_default $sub1)
;; CHECK-NEXT: (struct.new_default $sub2)
;; CHECK-NEXT: )
@@ -714,7 +714,7 @@
(func $return-many (result (ref $super1) (ref $super2))
;; This requires $sub1 <: $super1 and $sub2 <: super2.
(return
- (tuple.make
+ (tuple.make 2
(struct.new $sub1)
(struct.new $sub2)
)
diff --git a/test/lit/passes/vacuum_all-features.wast b/test/lit/passes/vacuum_all-features.wast
index 2465c315c..f85d21692 100644
--- a/test/lit/passes/vacuum_all-features.wast
+++ b/test/lit/passes/vacuum_all-features.wast
@@ -1295,7 +1295,7 @@
;; the way.
(drop
(br_if $block
- (tuple.make
+ (tuple.make 2
(ref.func $1)
(i32.const 0)
)
@@ -1303,7 +1303,7 @@
)
)
(nop)
- (tuple.make
+ (tuple.make 2
(ref.func $1)
(i32.const 1)
)