Skip to content

Commit 5e0aa68

Browse files
author
Harlan Haskins
committed
[test] Update SILGen matching code for 5.1 differences
1 parent d796159 commit 5e0aa68

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

test/SILGen/implicit_property_initializers.swift

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ struct HasDefaultTupleOfNils {
2121

2222
// CHECK: sil [transparent] [ossa] @$[[X_VALUE_INIT:s30implicit_property_initializers21HasDefaultTupleOfNilsV1xSiSg_AEtvpfi]] : $@convention(thin) () -> (Optional<Int>, Optional<Int>) {
2323
// CHECK: bb0:
24-
// CHECK: %0 = enum $Optional<Int>, #Optional.none!enumelt
25-
// CHECK: %1 = enum $Optional<Int>, #Optional.none!enumelt
26-
// CHECK: %2 = tuple (%0 : $Optional<Int>, %1 : $Optional<Int>)
27-
// CHECK: return %2 : $(Optional<Int>, Optional<Int>)
24+
// CHECK: %[[OPT1:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
25+
// CHECK: %[[OPT2:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
26+
// CHECK: %[[TUPLE:[0-9]+]] = tuple (%[[OPT1]] : $Optional<Int>, %[[OPT2]] : $Optional<Int>)
27+
// CHECK: return %[[TUPLE]] : $(Optional<Int>, Optional<Int>)
2828
// CHECK: }
2929

3030
// The default value initializer for 'y' should have type Optional<Int>
3131

3232
//CHECK: sil [transparent] [ossa] @$s30implicit_property_initializers21HasDefaultTupleOfNilsV1ySiSgvpfi : $@convention(thin) () -> Optional<Int> {
3333
//CHECK: bb0:
34-
//CHECK: %0 = enum $Optional<Int>, #Optional.none!enumelt // user: %1
35-
//CHECK: return %0 : $Optional<Int> // id: %1
34+
//CHECK: %[[OPT:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
35+
//CHECK: return %[[OPT]] : $Optional<Int>
3636
//CHECK: }
3737

3838
// There should not be a default value initializer for 'z'.
@@ -43,23 +43,23 @@ struct HasDefaultTupleOfNils {
4343

4444
//CHECK: sil [transparent] [ossa] @$[[W_VALUE_INIT:s30implicit_property_initializers21HasDefaultTupleOfNilsV1wSiSg_ytAEt_AE_AEttvpfi]] : $@convention(thin) () -> (Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>) {
4545
//CHECK: bb0:
46-
//CHECK: %0 = enum $Optional<Int>, #Optional.none!enumelt // user: %4
47-
//CHECK: %1 = enum $Optional<Int>, #Optional.none!enumelt // user: %4
48-
//CHECK: %2 = enum $Optional<Int>, #Optional.none!enumelt // user: %4
49-
//CHECK: %3 = enum $Optional<Int>, #Optional.none!enumelt // user: %4
50-
//CHECK: %4 = tuple (%0 : $Optional<Int>, %1 : $Optional<Int>, %2 : $Optional<Int>, %3 : $Optional<Int>) // user: %5
51-
//CHECK: return %4 : $(Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>) // id: %5
46+
//CHECK: %[[OPT0:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
47+
//CHECK: %[[OPT1:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
48+
//CHECK: %[[OPT2:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
49+
//CHECK: %[[OPT3:[0-9]+]] = enum $Optional<Int>, #Optional.none!enumelt
50+
//CHECK: %[[TUPLE:[0-9]+]] = tuple (%[[OPT0]] : $Optional<Int>, %[[OPT1]] : $Optional<Int>, %[[OPT2]] : $Optional<Int>, %[[OPT3]] : $Optional<Int>)
51+
//CHECK: return %[[TUPLE]] : $(Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
5252
//CHECK: }
5353

5454
// The default arg generator for 'x' inside the memberwise init should have type (Optional<Int>, Optional<Int>)
5555

5656
// CHECK: sil [ossa] @$s30implicit_property_initializers21HasDefaultTupleOfNilsV1x1y1z1wACSiSg_AHt_AHSiAH_ytAHt_AH_AHtttcfcfA_ : $@convention(thin) () -> (Optional<Int>, Optional<Int>) {
5757
// CHECK: bb0:
58-
// CHECK: %0 = function_ref @$[[X_VALUE_INIT]] : $@convention(thin) () -> (Optional<Int>, Optional<Int>) // user: %1
59-
// CHECK: %1 = apply %0() : $@convention(thin) () -> (Optional<Int>, Optional<Int>)
60-
// CHECK: (%2, %3) = destructure_tuple %1 : $(Optional<Int>, Optional<Int>)
61-
// CHECK: %4 = tuple (%2 : $Optional<Int>, %3 : $Optional<Int>)
62-
// CHECK: return %4 : $(Optional<Int>, Optional<Int>)
58+
// CHECK: %[[INIT_FN:[0-9]+]] = function_ref @$[[X_VALUE_INIT]] : $@convention(thin) () -> (Optional<Int>, Optional<Int>)
59+
// CHECK: %[[RESULT:[0-9]+]] = apply %[[INIT_FN]]() : $@convention(thin) () -> (Optional<Int>, Optional<Int>)
60+
// CHECK: (%[[OPT1:[0-9]+]], %[[OPT2:[0-9]+]]) = destructure_tuple %[[RESULT]] : $(Optional<Int>, Optional<Int>)
61+
// CHECK: %[[TUPLE:[0-9]]] = tuple (%[[OPT1]] : $Optional<Int>, %[[OPT2]] : $Optional<Int>)
62+
// CHECK: return %[[TUPLE]] : $(Optional<Int>, Optional<Int>)
6363
// CHECK: }
6464

6565
// There should not be a default arg generator for 'y' because it's just a nil literal and clients construct it directly.
@@ -74,9 +74,9 @@ struct HasDefaultTupleOfNils {
7474

7575
// CHECK: sil [ossa] @$s30implicit_property_initializers21HasDefaultTupleOfNilsV1x1y1z1wACSiSg_AHt_AHSiAH_ytAHt_AH_AHtttcfcfA2_ : $@convention(thin) () -> (Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>) {
7676
// CHECK: bb0:
77-
// CHECK: %0 = function_ref @$[[W_VALUE_INIT]] : $@convention(thin) () -> (Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
78-
// CHECK: %1 = apply %0() : $@convention(thin) () -> (Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
79-
// CHECK: (%2, %3, %4, %5) = destructure_tuple %1 : $(Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
80-
// CHECK: %6 = tuple (%2 : $Optional<Int>, %3 : $Optional<Int>, %4 : $Optional<Int>, %5 : $Optional<Int>)
81-
// CHECK: return %6 : $(Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
77+
// CHECK: %[[INIT_FN:[0-9]+]] = function_ref @$[[W_VALUE_INIT]] : $@convention(thin) () -> (Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
78+
// CHECK: %[[RESULT:[0-9]+]] = apply %[[INIT_FN:[0-9]+]]() : $@convention(thin) () -> (Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
79+
// CHECK: (%[[OPT1:[0-9]+]], %[[OPT2:[0-9]+]], %[[OPT3:[0-9]+]], %[[OPT4:[0-9]+]]) = destructure_tuple %[[RESULT]] : $(Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
80+
// CHECK: %[[TUPLE:[0-9]]] = tuple (%[[OPT1]] : $Optional<Int>, %[[OPT2]] : $Optional<Int>, %[[OPT3]] : $Optional<Int>, %[[OPT4]] : $Optional<Int>)
81+
// CHECK: return %[[TUPLE]] : $(Optional<Int>, Optional<Int>, Optional<Int>, Optional<Int>)
8282
// CHECK: }

0 commit comments

Comments
 (0)