@@ -13,19 +13,19 @@ struct Foo {
13
13
// CHECK-LABEL: @_T018field_type_vectors3BarVMn = hidden constant
14
14
// CHECK: %swift.type** (%swift.type*)* [[BAR_TYPES_ACCESSOR:@[A-Za-z0-9_]*]]
15
15
// CHECK-LABEL: @_T018field_type_vectors3BarVMP = internal global
16
- // -- There should be 4 words between the address point and the field type
17
- // vector slot, with type %swift.type**
18
- // CHECK: i64, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32 }>*, i64, %swift.type*, %swift.type* *
16
+ // -- There should be 1 word between the field type vector slot, with type %swift.type**,
17
+ // and the address point
18
+ // CHECK: %swift.type**, i8**, i64, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32 }>*, i64, %swift.type*
19
19
struct Bar<T> {
20
20
var y: Int
21
21
}
22
22
23
23
// CHECK-LABEL: @_T018field_type_vectors3BasVMn = hidden constant
24
24
// CHECK: %swift.type** (%swift.type*)* [[BAS_TYPES_ACCESSOR:@[A-Za-z0-9_]*]]
25
25
// CHECK-LABEL: @_T018field_type_vectors3BasVMP = internal global
26
- // -- There should be 6 words between the address point and the field type
27
- // vector slot, with type %swift.type**
28
- // CHECK: <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32 }>*, i64, i64, %swift.type*, %swift.type*, %swift.type* *
26
+ // -- There should be 1 word between the field type vector slot, with type %swift.type**,
27
+ // and the address point
28
+ // CHECK: %swift.type**, i8**, i64, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32 }>*, i64, i64, %swift.type*, %swift.type*
29
29
struct Bas<T, U> {
30
30
var foo: Foo
31
31
var bar: Bar<T>
@@ -34,9 +34,9 @@ struct Bas<T, U> {
34
34
// CHECK-LABEL: @_T018field_type_vectors3ZimCMn = hidden constant
35
35
// CHECK: %swift.type** (%swift.type*)* [[ZIM_TYPES_ACCESSOR:@[A-Za-z0-9_]*]]
36
36
// CHECK-LABEL: @_T018field_type_vectors3ZimCMP = internal global
37
- // -- There should be 14 words between the address point and the field type
38
- // vector slot, with type %swift.type**
39
- // CHECK: i64, %swift.type*, %swift.opaque*, %swift.opaque*, i64, i32, i32, i32, i16, i16, i32, i32, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32, i32, i32, %swift.method_descriptor }>*, i8*, %swift.type*, %swift.type*, i8*, i64, i64, i64, %swift.type**
37
+ // -- There should be 1 word between the field type vector slot, with type %swift.type**,
38
+ // and the address point
39
+ // CHECK: %swift.type**, i8*, i8**, i64, %swift.type*, %swift.opaque*, %swift.opaque*, i64, i32, i32, i32, i16, i16, i32, i32, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32, i32, i32, %swift.method_descriptor }>*, i8*, %swift.type*, %swift.type*, i8*, i64, i64, i64
40
40
class Zim<T, U> {
41
41
var foo: Foo?
42
42
var bar: Bar<T>?
@@ -49,9 +49,9 @@ sil @_TFC18field_type_vectors3ZimcU___fMGS0_Q_Q0__FT_GS0_Q_Q0__ : $@convention(m
49
49
// CHECK-LABEL: @_T018field_type_vectors4ZangCMn = hidden constant
50
50
// CHECK: %swift.type** (%swift.type*)* [[ZANG_TYPES_ACCESSOR:@[A-Za-z0-9_]*]]
51
51
// CHECK-LABEL: @_T018field_type_vectors4ZangCMP = internal global
52
- // -- There should be 16 words between the address point and the field type
53
- // vector slot, with type %swift.type**
54
- // CHECK: i64, %swift.type*, %swift.opaque*, %swift.opaque*, i64, i32, i32, i32, i16, i16, i32, i32, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32 }>*, i8*, %swift.type*, %swift.type*, i8*, i64, i64, i64, %swift.type*, i64, %swift.type**
52
+ // -- There should be 1 word between the field type vector slot, with type %swift.type**,
53
+ // and the address point
54
+ // CHECK: %swift.type**, i8*, i8**, i64, %swift.type*, %swift.opaque*, %swift.opaque*, i64, i32, i32, i32, i16, i16, i32, i32, <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i16, i32 }>*, i8*, %swift.type*, %swift.type*, i8*, i64, i64, i64, %swift.type*, i64
55
55
class Zang<V>: Zim<V, V> {
56
56
var zung: Int = 0
57
57
}
@@ -83,8 +83,7 @@ sil_vtable StorageQualified {}
83
83
84
84
// CHECK: define{{( protected)?}} private %swift.type** [[BAR_TYPES_ACCESSOR]](%swift.type* %"Bar<T>")
85
85
// CHECK: [[T0:%.*]] = bitcast %swift.type* %"Bar<T>" to %swift.type***
86
- // -- 4 words between the address point and the slot
87
- // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i32 4
86
+ // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i64 -2
88
87
// CHECK: load %swift.type**, %swift.type*** [[SLOT]], align 8
89
88
// CHECK: br
90
89
// CHECK-NOT: load %swift.type*,
@@ -93,22 +92,19 @@ sil_vtable StorageQualified {}
93
92
94
93
// CHECK: define{{( protected)?}} private %swift.type** [[BAS_TYPES_ACCESSOR]](%swift.type* %"Bas<T, U>")
95
94
// CHECK: [[T0:%.*]] = bitcast %swift.type* %"Bas<T, U>" to %swift.type***
96
- // -- 6 words between the address point and the slot
97
- // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i32 6
95
+ // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i64 -2
98
96
// CHECK: load %swift.type**, %swift.type*** [[SLOT]], align 8
99
97
// CHECK: br
100
98
// CHECK: store {{.*}} @_T018field_type_vectors3FooVMf
101
99
// CHECK: call %swift.type* @_T018field_type_vectors3BarVMa(%swift.type* %T)
102
100
103
101
// CHECK: define{{( protected)?}} private %swift.type** [[ZIM_TYPES_ACCESSOR]](%swift.type* %"Zim<T, U>")
104
102
// CHECK: [[T0:%.*]] = bitcast %swift.type* %"Zim<T, U>" to %swift.type***
105
- // -- 14 words between the address point and the slot
106
- // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i32 16
103
+ // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i64 -3
107
104
// CHECK: load %swift.type**, %swift.type*** [[SLOT]], align 8
108
105
109
106
// CHECK: define{{( protected)?}} private %swift.type** [[ZANG_TYPES_ACCESSOR]](%swift.type* %"Zang<V>")
110
107
// CHECK: [[T0:%.*]] = bitcast %swift.type* %"Zang<V>" to %swift.type***
111
- // -- 16 words between the address point and the slot
112
- // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i32 18
108
+ // CHECK: [[SLOT:%.*]] = getelementptr inbounds %swift.type**, %swift.type*** [[T0]], i64 -3
113
109
// CHECK: load %swift.type**, %swift.type*** [[SLOT]], align 8
114
110
0 commit comments