@@ -115,6 +115,18 @@ bb0(%0 : $*T, %1 : $*XXX<T>):
115
115
return %9 : $Int32 // id: %11
116
116
}
117
117
118
+
119
+ sil [ossa] [noinline] @XXX_foo_guaranteed_generic_return : $@convention(method) <T> (@in_guaranteed T, @in XXX<T>) -> @out T {
120
+ bb0(%0 : $*T, %1 : $*T, %2 : $*XXX<T>):
121
+ %3 = address_to_pointer %1 : $*T to $Builtin.RawPointer
122
+ %4 = alloc_stack $T
123
+ %5 = struct_element_addr %2 : $*XXX<T>, #XXX.m_t
124
+ copy_addr [take] %5 to [initialization] %0 : $*T
125
+ dealloc_stack %4 : $*T
126
+ %t = tuple ()
127
+ return %t : $()
128
+ }
129
+
118
130
// Swift.Int32._convertFromBuiltinIntegerLiteral (Swift.Int32.Type)(Builtin.IntLiteral) -> Swift.Int32
119
131
sil public_external [ossa] [transparent] @$sSi33_convertFromBuiltinIntegerLiteralySiBI_cSimF : $@convention(thin) (Builtin.IntLiteral, @thin Int32.Type) -> Int32 {
120
132
bb0(%0 : $Builtin.IntLiteral, %1 : $@thin Int32.Type):
@@ -231,10 +243,21 @@ bb0(%arg : @guaranteed $Builtin.NativeObject):
231
243
apply %9(%15g) : $@convention(thin) (Int32) -> ()
232
244
destroy_addr %11g : $*Builtin.NativeObject
233
245
dealloc_stack %11g : $*Builtin.NativeObject // id: %17
234
- destroy_addr %0 : $*XXX<Builtin.NativeObject>
235
- dealloc_stack %0 : $*XXX<Builtin.NativeObject> // id: %19
236
- %18 = tuple () // user: %20
237
- return %18 : $() // id: %20
246
+
247
+ %17 = function_ref @XXX_foo_guaranteed_generic_return : $@convention(method) <T> (@in_guaranteed T, @in XXX<T>) -> @out T
248
+ %18 = alloc_stack $Builtin.NativeObject
249
+ %19 = alloc_stack $Builtin.NativeObject
250
+ %arg3 = copy_value %arg : $Builtin.NativeObject
251
+ store %arg3 to [init] %18 : $*Builtin.NativeObject
252
+ apply %17<Builtin.NativeObject>(%19, %18, %0) : $@convention(method) <T> (@in_guaranteed T, @in XXX<T>) -> @out T
253
+ destroy_addr %18 : $*Builtin.NativeObject
254
+ destroy_addr %19 : $*Builtin.NativeObject
255
+ dealloc_stack %19 : $*Builtin.NativeObject
256
+ dealloc_stack %18 : $*Builtin.NativeObject
257
+
258
+ dealloc_stack %0 : $*XXX<Builtin.NativeObject>
259
+ %t = tuple ()
260
+ return %t : $()
238
261
}
239
262
240
263
// specialize.useClosure <A>(fun : () -> A) -> A
0 commit comments