@@ -36,9 +36,10 @@ public struct TwoInt32 {
3636 let y : Int32 = 0
3737}
3838
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
4243}
4344
4445// Make sure we generate the public pre-specialized entry points.
@@ -83,8 +84,8 @@ internal func testEmitIntoClient<T>(t: T) {
8384 print ( t)
8485}
8586
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 ):
8889// OPT: [[F1:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFSi_Ts5 : $@convention(thin) (Int) -> ()
8990// OPT: apply [[F1]]
9091// OPT: [[F2:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFSd_Ts5 : $@convention(thin) (Double) -> ()
@@ -106,16 +107,16 @@ internal func testEmitIntoClient<T>(t: T) {
106107// OPT-macosx: [[F8:%.*]] = function_ref @$s30pre_specialized_module_layouts20publicPrespecializedyyxlFBb_Ts5 : $@convention(thin) (@guaranteed Builtin.BridgeObject) -> ()
107108// OPT-macosx: [[A4:%.*]] = unchecked_bitwise_cast [[P3]] : $Array<Int> to $Builtin.BridgeObject
108109// 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 ) -> ()
112113// OPT: [[F3:%.*]] = function_ref @$s30pre_specialized_module_layouts36internalEmitIntoClientPrespecializedyyxlFSi_Ts5 : $@convention(thin) (Int) -> ()
113114// OPT: apply [[F3]]
114115// OPT: [[F4:%.*]] = function_ref @$s30pre_specialized_module_layouts36internalEmitIntoClientPrespecializedyyxlFSd_Ts5 : $@convention(thin) (Double) -> ()
115116// OPT: apply [[F4]]
116117// OPT: [[F5:%.*]] = function_ref @$s30pre_specialized_module_layouts16useInternalThingyyxlFSi_Tg5
117118// OPT: apply [[F5]]({{.*}}) : $@convention(thin) (Int) -> ()
118- // OPT: } // end sil function '$s22pre_specialize_layouts28usePrespecializedEntryPoints13wrapperStruct11overaligned5array9stride128yAA016ReferenceWrapperI0V_AA011OveralignedmnI0VSaySiGAA9Stride128VtF '
119+ // OPT: } // end sil function '$s22pre_specialize_layouts28usePrespecializedEntryPoints13wrapperStruct11overaligned5array8stride96yAA016ReferenceWrapperI0V_AA011OveralignedmnI0VSaySiGAA8Stride96VtF '
119120
120121// OPT: sil {{.*}} @$s30pre_specialized_module_layouts16useInternalThingyyxlFSi_Tg5 : $@convention(thin) (Int) -> () {
121122// OPT: [[F1:%.*]] = function_ref @$s30pre_specialized_module_layouts14InternalThing2V7computexyFSi_Ts5 : $@convention(method) (InternalThing2<Int>) -> Int
@@ -160,7 +161,7 @@ internal func testEmitIntoClient<T>(t: T) {
160161// OPT: [[R10:%.*]] = unchecked_addr_cast [[R9]] : $*AnyObject to $*SomeClass
161162// OPT: } // end sil function '$s30pre_specialized_module_layouts16useInternalThingyyxlFAA9SomeClassC_Tg5'
162163
163- public func usePrespecializedEntryPoints( wrapperStruct: ReferenceWrapperStruct , overaligned: OveralignedReferenceWrapperStruct , array: [ Int ] , stride128 : Stride128 ) {
164+ public func usePrespecializedEntryPoints( wrapperStruct: ReferenceWrapperStruct , overaligned: OveralignedReferenceWrapperStruct , array: [ Int ] , stride96 : Stride96 ) {
164165 publicPrespecialized ( 1 )
165166 publicPrespecialized ( 1.0 )
166167 publicPrespecialized ( UInt64 ( 1 ) )
@@ -171,7 +172,7 @@ public func usePrespecializedEntryPoints(wrapperStruct: ReferenceWrapperStruct,
171172 // should not apply _Class specialization for overaligned struct
172173 publicPrespecialized ( overaligned)
173174 publicPrespecialized ( array)
174- publicPrespecialized ( stride128 )
175+ publicPrespecialized ( stride96 )
175176 useInternalEmitIntoClientPrespecialized ( 2 )
176177 useInternalEmitIntoClientPrespecialized ( 2.0 )
177178 useInternalThing ( 2 )
0 commit comments