@@ -36,9 +36,10 @@ public struct TwoInt32 {
36
36
let y : Int32 = 0
37
37
}
38
38
39
- public struct Stride128 {
40
- let x : Int64 = 0
41
- let y : Bool = false
39
+ public struct Stride96 {
40
+ let x : Int32 = 0
41
+ let y : Int32 = 0
42
+ let z : Bool = false
42
43
}
43
44
44
45
// Make sure we generate the public pre-specialized entry points.
@@ -83,8 +84,8 @@ internal func testEmitIntoClient<T>(t: T) {
83
84
print ( t)
84
85
}
85
86
86
- // OPT: sil @$s22pre_specialize_layouts28usePrespecializedEntryPoints13wrapperStruct11overaligned5array9stride128yAA016ReferenceWrapperI0V_AA011OveralignedmnI0VSaySiGAA9Stride128VtF : $@convention(thin) (@guaranteed ReferenceWrapperStruct, @guaranteed OveralignedReferenceWrapperStruct, @guaranteed Array<Int>, Stride128 ) -> () {
87
- // OPT: bb0([[P1:%.*]] : $ReferenceWrapperStruct, [[P2:%.*]] : $OveralignedReferenceWrapperStruct, [[P3:%.*]] : $Array<Int>, [[P4:%.*]] : $Stride128 ):
87
+ // OPT: sil @$s22pre_specialize_layouts28usePrespecializedEntryPoints13wrapperStruct11overaligned5array8stride96yAA016ReferenceWrapperI0V_AA011OveralignedmnI0VSaySiGAA8Stride96VtF : $@convention(thin) (@guaranteed ReferenceWrapperStruct, @guaranteed OveralignedReferenceWrapperStruct, @guaranteed Array<Int>, Stride96 ) -> () {
88
+ // OPT: bb0([[P1:%.*]] : $ReferenceWrapperStruct, [[P2:%.*]] : $OveralignedReferenceWrapperStruct, [[P3:%.*]] : $Array<Int>, [[P4:%.*]] : $Stride96 ):
88
89
// OPT: [[F1:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFSi_Ts5 : $@convention(thin) (Int) -> ()
89
90
// OPT: apply [[F1]]
90
91
// OPT: [[F2:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFSd_Ts5 : $@convention(thin) (Double) -> ()
@@ -106,16 +107,16 @@ internal func testEmitIntoClient<T>(t: T) {
106
107
// OPT-macosx: [[F8:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFBb_Ts5 : $@convention(thin) (@guaranteed Builtin.BridgeObject) -> ()
107
108
// OPT-macosx: [[A4:%.*]] = unchecked_bitwise_cast [[P3]] : $Array<Int> to $Builtin.BridgeObject
108
109
// OPT-macosx: apply [[F8]]([[A4]]) : $@convention(thin) (@guaranteed Builtin.BridgeObject) -> ()
109
- // OPT: [[F10:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFBi128__Ts5 : $@convention(thin) (Builtin.Int128 ) -> ()
110
- // OPT: [[A6:%.*]] = unchecked_trivial_bit_cast [[P4]] : $Stride128 to $Builtin.Int128
111
- // OPT: apply [[F10]]([[A6]]) : $@convention(thin) (Builtin.Int128 ) -> ()
110
+ // OPT: [[F10:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFBi8_Bv12__Ts5 : $@convention(thin) (Builtin.Vec12xInt8 ) -> ()
111
+ // OPT: [[A6:%.*]] = unchecked_trivial_bit_cast [[P4]] : $Stride96 to $Builtin.Vec12xInt8
112
+ // OPT: apply [[F10]]([[A6]]) : $@convention(thin) (Builtin.Vec12xInt8 ) -> ()
112
113
// OPT: [[F3:%.*]] = function_ref @$s30pre_specialized_module_layouts36internalEmitIntoClientPrespecializedyyxlFSi_Ts5 : $@convention(thin) (Int) -> ()
113
114
// OPT: apply [[F3]]
114
115
// OPT: [[F4:%.*]] = function_ref @$s30pre_specialized_module_layouts36internalEmitIntoClientPrespecializedyyxlFSd_Ts5 : $@convention(thin) (Double) -> ()
115
116
// OPT: apply [[F4]]
116
117
// OPT: [[F5:%.*]] = function_ref @$s30pre_specialized_module_layouts16useInternalThingyyxlFSi_Tg5
117
118
// OPT: apply [[F5]]({{.*}}) : $@convention(thin) (Int) -> ()
118
- // OPT: } // end sil function '$s22pre_specialize_layouts28usePrespecializedEntryPoints13wrapperStruct11overaligned5array9stride128yAA016ReferenceWrapperI0V_AA011OveralignedmnI0VSaySiGAA9Stride128VtF '
119
+ // OPT: } // end sil function '$s22pre_specialize_layouts28usePrespecializedEntryPoints13wrapperStruct11overaligned5array8stride96yAA016ReferenceWrapperI0V_AA011OveralignedmnI0VSaySiGAA8Stride96VtF '
119
120
120
121
// OPT: sil {{.*}} @$s30pre_specialized_module_layouts16useInternalThingyyxlFSi_Tg5 : $@convention(thin) (Int) -> () {
121
122
// OPT: [[F1:%.*]] = function_ref @$s30pre_specialized_module_layouts14InternalThing2V7computexyFSi_Ts5 : $@convention(method) (InternalThing2<Int>) -> Int
@@ -160,7 +161,7 @@ internal func testEmitIntoClient<T>(t: T) {
160
161
// OPT: [[R10:%.*]] = unchecked_addr_cast [[R9]] : $*AnyObject to $*SomeClass
161
162
// OPT: } // end sil function '$s30pre_specialized_module_layouts16useInternalThingyyxlFAA9SomeClassC_Tg5'
162
163
163
- public func usePrespecializedEntryPoints( wrapperStruct: ReferenceWrapperStruct , overaligned: OveralignedReferenceWrapperStruct , array: [ Int ] , stride128 : Stride128 ) {
164
+ public func usePrespecializedEntryPoints( wrapperStruct: ReferenceWrapperStruct , overaligned: OveralignedReferenceWrapperStruct , array: [ Int ] , stride96 : Stride96 ) {
164
165
publicPrespecialized ( 1 )
165
166
publicPrespecialized ( 1.0 )
166
167
publicPrespecialized ( UInt64 ( 1 ) )
@@ -171,7 +172,7 @@ public func usePrespecializedEntryPoints(wrapperStruct: ReferenceWrapperStruct,
171
172
// should not apply _Class specialization for overaligned struct
172
173
publicPrespecialized ( overaligned)
173
174
publicPrespecialized ( array)
174
- publicPrespecialized ( stride128 )
175
+ publicPrespecialized ( stride96 )
175
176
useInternalEmitIntoClientPrespecialized ( 2 )
176
177
useInternalEmitIntoClientPrespecialized ( 2.0 )
177
178
useInternalThing ( 2 )
0 commit comments