Skip to content

Commit d6a821d

Browse files
committed
Fix the closure specialize test case input to obey @inout_aliasable and @NoEscape function type rules.
1 parent fb42d85 commit d6a821d

File tree

1 file changed

+62
-47
lines changed

1 file changed

+62
-47
lines changed

test/SILOptimizer/closure_specialize_consolidated.sil

Lines changed: 62 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -61,58 +61,66 @@ bb0(%0 : $*S):
6161
return %6 : $()
6262
}
6363

64-
// Check that a specialization of address_closure_user was generated which does not
64+
// CHECK-LABEL: sil @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> () {
65+
sil @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> () {
66+
bb0(%0 : $@callee_owned () -> ()):
67+
%1 = apply %0() : $@callee_owned () -> ()
68+
%9999 = tuple()
69+
return %9999 : $()
70+
}
71+
72+
// Check that a specialization of address_closure_noescape_user was generated which does not
6573
// take a closure as a parameter anymore.
66-
// CHECK-LABEL: sil shared @{{.*}}address_closure_user{{.*}} : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
74+
// CHECK-LABEL: sil shared @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
6775
// CHECK: function_ref @address_closure_trivial : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
6876
// CHECK: partial_apply %{{.*}} : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
6977
// CHECK: apply
7078
// CHECK: return
7179

72-
// Check that a specialization of address_closure_user was generated which does not
80+
// Check that a specialization of address_closure_noescape_user was generated which does not
7381
// take a closure as a parameter anymore.
74-
// CHECK-LABEL: sil shared @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable Int32) -> ()
82+
// CHECK-LABEL: sil shared @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable Int32) -> ()
7583
// CHECK: function_ref @address_closure_trivial_mutating : $@convention(thin) (@inout_aliasable Int32) -> ()
7684
// CHECK: partial_apply %{{.*}} : $@convention(thin) (@inout_aliasable Int32) -> ()
7785
// CHECK: apply
7886
// CHECK: return
7987

80-
// Check that a specialization of address_closure_user was generated which does not
88+
// Check that a specialization of address_closure_noescape_user was generated which does not
8189
// take a closure as a parameter anymore.
82-
// CHECK-LABEL: sil shared @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
90+
// CHECK-LABEL: sil shared @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
8391
// CHECK: function_ref @address_closure_existential : $@convention(thin) (@inout_aliasable P) -> ()
8492
// CHECK: partial_apply %{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
8593
// CHECK: apply
8694
// CHECK: return
8795

88-
// Check that a specialization of address_closure_user was generated which does not
96+
// Check that a specialization of address_closure_noescape_user was generated which does not
8997
// take a closure as a parameter anymore.
90-
// CHECK-LABEL: sil shared @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
98+
// CHECK-LABEL: sil shared @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
9199
// CHECK: function_ref @address_closure_struct1 : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
92100
// CHECK: partial_apply %{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
93101
// CHECK: apply
94102
// CHECK: return
95103

96104
// Check that a specialization of address_closure_user was generated which does not
97105
// take a closure as a parameter anymore.
98-
// CHECK-LABEL: sil shared @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
106+
// CHECK-LABEL: sil shared @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
99107
// CHECK: function_ref @address_closure_struct2 : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
100108
// CHECK: partial_apply %{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
101109
// CHECK: apply
102110
// CHECK: return
103111

104112
// Check that a specialization of address_closure_user was generated which does not
105113
// take a closure as a parameter anymore.
106-
// CHECK-LABEL: sil shared @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
114+
// CHECK-LABEL: sil shared @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
107115
// CHECK: function_ref @address_closure_class1 : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
108116
// CHECK: partial_apply %{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
109117
// CHECK: apply
110118
// CHECK: return
111119

112-
// CHECK-LABEL: sil @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> () {
113-
sil @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> () {
114-
bb0(%0 : $@callee_owned () -> ()):
115-
%1 = apply %0() : $@callee_owned () -> ()
120+
// CHECK-LABEL: sil @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> () {
121+
sil @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> () {
122+
bb0(%0 : $@noescape @callee_owned () -> ()):
123+
%1 = apply %0() : $@noescape @callee_owned () -> ()
116124
%9999 = tuple()
117125
return %9999 : $()
118126
}
@@ -201,20 +209,21 @@ bb0(%0 : $Int32, %1 : $*Int32):
201209

202210
// CHECK-LABEL: sil @address_caller_trivial
203211
// CHECK-NOT: partial_apply
204-
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
212+
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
205213
// CHECK: apply [[SPECIALIZED_FN1]]{{.*}}
206214
// CHECK-NOT: partial_apply
207215
// CHECK: return
208216
sil @address_caller_trivial: $@convention(thin) (Int32) -> Int32 {
209217
bb0(%0 : $Int32):
210218
%2 = alloc_stack $Int32, var, name "xx"
211219
store %0 to %2 : $*Int32
212-
// function_ref address_closure_user(f:)
213-
%4 = function_ref @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
220+
// function_ref address_closure_noescape_user(f:)
221+
%4 = function_ref @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
214222
// function_ref address_closure_trivial(x:)
215223
%5 = function_ref @address_closure_trivial : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
216224
%6 = partial_apply %5(%0, %2) : $@convention(thin) (Int32, @inout_aliasable Int32) -> ()
217-
%7 = apply %4(%6) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
225+
%6b = convert_function %6 : $@callee_owned () -> () to $@noescape @callee_owned () -> ()
226+
%7 = apply %4(%6b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
218227
%8 = load %2 : $*Int32
219228
dealloc_stack %2 : $*Int32
220229
return %8 : $Int32
@@ -238,18 +247,19 @@ bb0(%0 : $*Int32):
238247

239248
// CHECK-LABEL: sil @address_caller_trivial_mutating
240249
// CHECK-NOT: partial_apply
241-
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable Int32) -> ()
250+
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable Int32) -> ()
242251
// CHECK: apply [[SPECIALIZED_FN1]]{{.*}}
243252
// CHECK-NOT: partial_apply
244253
// CHECK: return
245254
sil @address_caller_trivial_mutating: $@convention(thin) (Int32) -> Int32 {
246255
bb0(%0 : $Int32):
247256
%2 = alloc_stack $Int32, var, name "xx"
248257
store %0 to %2 : $*Int32
249-
%4 = function_ref @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
258+
%4 = function_ref @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
250259
%5 = function_ref @address_closure_trivial_mutating : $@convention(thin) (@inout_aliasable Int32) -> ()
251260
%6 = partial_apply %5(%2) : $@convention(thin) (@inout_aliasable Int32) -> ()
252-
%7 = apply %4(%6) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
261+
%6b = convert_function %6 : $@callee_owned () -> () to $@noescape @callee_owned () -> ()
262+
%7 = apply %4(%6b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
253263
%8 = load %2 : $*Int32
254264
dealloc_stack %2 : $*Int32
255265
return %8 : $Int32
@@ -294,17 +304,17 @@ bb0(%0 : $*Q, %1 : $*Q, %2 : $*Q, %3 : $*Q):
294304
// CHECK: apply [[PARTIAL_APPLY]]
295305
// CHECK: return
296306

297-
sil @address_closure_user_out_result : $@convention(thin) (@owned @callee_owned (@in Q) -> @out Q) -> @out Q {
298-
bb0(%0 : $*Q, %1 : $@callee_owned (@in Q) -> @out Q):
307+
sil @address_closure_user_out_result : $@convention(thin) (@owned @noescape @callee_owned (@in Q) -> @out Q) -> @out Q {
308+
bb0(%0 : $*Q, %1 : $@noescape @callee_owned (@in Q) -> @out Q):
299309
%4 = alloc_stack $Q
300310
%5 = init_existential_addr %4 : $*Q, $S
301311
%6 = function_ref @S_init : $@convention(method) (@thin S.Type) -> @owned S
302312
%7 = metatype $@thin S.Type
303313
%8 = apply %6(%7) : $@convention(method) (@thin S.Type) -> @owned S
304314
store %8 to %5 : $*S
305-
%10 = apply %1(%0, %4) : $@callee_owned (@in Q) -> @out Q
315+
%10 = apply %1(%0, %4) : $@noescape @callee_owned (@in Q) -> @out Q
306316
dealloc_stack %4 : $*Q
307-
strong_release %1 : $@callee_owned (@in Q) -> @out Q
317+
strong_release %1 : $@noescape @callee_owned (@in Q) -> @out Q
308318
%13 = tuple ()
309319
return %13 : $()
310320
}
@@ -321,10 +331,11 @@ bb0(%0 : $*Q, %1 : $@callee_owned (@in Q) -> @out Q):
321331
// CHECK: return
322332
sil @address_caller_out_result: $@convention(thin) (@in Q, @in Q) -> @out Q {
323333
bb0(%0 : $*Q, %1 : $*Q, %2 : $*Q):
324-
%5 = function_ref @address_closure_user_out_result : $@convention(thin) (@owned @callee_owned (@in Q) -> @out Q) -> @out Q
334+
%5 = function_ref @address_closure_user_out_result : $@convention(thin) (@owned @noescape @callee_owned (@in Q) -> @out Q) -> @out Q
325335
%6 = function_ref @address_closure_out_result : $@convention(thin) (@in Q, @inout_aliasable Q, @inout_aliasable Q) -> @out Q
326336
%7 = partial_apply %6(%1, %2) : $@convention(thin) (@in Q, @inout_aliasable Q, @inout_aliasable Q) -> @out Q
327-
%8 = apply %5(%0, %7) : $@convention(thin) (@owned @callee_owned (@in Q) -> @out Q) -> @out Q
337+
%7b = convert_function %7 : $@callee_owned (@in Q) -> @out Q to $@noescape @callee_owned (@in Q) -> @out Q
338+
%8 = apply %5(%0, %7b) : $@convention(thin) (@owned @noescape @callee_owned (@in Q) -> @out Q) -> @out Q
328339
destroy_addr %2 : $*Q
329340
destroy_addr %1 : $*Q
330341
%11 = tuple ()
@@ -333,8 +344,8 @@ bb0(%0 : $*Q, %1 : $*Q, %2 : $*Q):
333344

334345
// CHECK-LABEL: sil @address_caller_existential
335346
// CHECK-NOT: partial_apply
336-
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
337-
// CHECK: [[SPECIALIZED_FN2:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
347+
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
348+
// CHECK: [[SPECIALIZED_FN2:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable P) -> ()
338349
// CHECK: apply [[SPECIALIZED_FN2]]{{.*}}
339350
// CHECK: apply [[SPECIALIZED_FN1]]{{.*}}
340351
// CHECK-NOT: partial_apply
@@ -345,11 +356,12 @@ bb0(%0 : $*P, %1 : $*P, %2 : $*P, %3 : $Int32):
345356
copy_addr %1 to [initialization] %7 : $*P
346357
%9 = function_ref @address_closure_existential : $@convention(thin) (@inout_aliasable P) -> ()
347358
%10 = partial_apply %9(%7) : $@convention(thin) (@inout_aliasable P) -> ()
348-
%12 = function_ref @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
359+
%10b = convert_function %10 : $@callee_owned () -> () to $@noescape @callee_owned () -> ()
360+
%12 = function_ref @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
349361
strong_retain %10 : $@callee_owned () -> ()
350-
%14 = apply %12(%10) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
362+
%14 = apply %12(%10b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
351363
strong_retain %10 : $@callee_owned () -> ()
352-
%16 = apply %12(%10) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
364+
%16 = apply %12(%10b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
353365
%17 = integer_literal $Builtin.Int32, 10
354366
%18 = struct_extract %3 : $Int32, #Int32._value
355367
%19 = builtin "cmp_slt_Int32"(%17 : $Builtin.Int32, %18 : $Builtin.Int32) : $Builtin.Int1
@@ -404,9 +416,9 @@ bb0(%0 : $*S, %1 : $S):
404416

405417
// CHECK-LABEL: sil @address_caller_struct
406418
// CHECK-NOT: partial_apply
407-
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
419+
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
408420
// CHECK: apply [[SPECIALIZED_FN1]]
409-
// CHECK: [[SPECIALIZED_FN2:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
421+
// CHECK: [[SPECIALIZED_FN2:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
410422
// CHECK: apply [[SPECIALIZED_FN2]]
411423
// CHECK-NOT: partial_apply
412424
// CHECK: return
@@ -415,16 +427,18 @@ bb0(%0 : $S, %1 : $S):
415427
%4 = alloc_stack $S, var, name "xx"
416428
%5 = struct_extract %0 : $S, #S.c
417429
store %0 to %4 : $*S
418-
%7 = function_ref @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
430+
%7 = function_ref @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
419431
%8 = function_ref @address_closure_struct1 : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
420432
%9 = partial_apply %8(%4, %1) : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
433+
%9b = convert_function %9 : $@callee_owned () -> () to $@noescape @callee_owned () -> ()
421434
retain_value %0 : $S
422435
retain_value %1 : $S
423-
%12 = apply %7(%9) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
436+
%12 = apply %7(%9b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
424437
%13 = function_ref @address_closure_struct2 : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
425438
%14 = partial_apply %13(%4, %0) : $@convention(thin) (@inout_aliasable S, @owned S) -> ()
439+
%14b = convert_function %14 : $@callee_owned () -> () to $@noescape @callee_owned () -> ()
426440
retain_value %5 : $Optional<C>
427-
%16 = apply %7(%14) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
441+
%16 = apply %7(%14b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
428442
%17 = load %4 : $*S
429443
dealloc_stack %4 : $*S
430444
return %17 : $S
@@ -441,8 +455,8 @@ bb0(%0 : $*C, %1 : $C):
441455

442456
// CHECK-LABEL: sil @address_caller_class1
443457
// CHECK-NOT: partial_apply
444-
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
445-
// CHECK: [[SPECIALIZED_FN2:%.*]] = function_ref @{{.*}}address_closure_user{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
458+
// CHECK: [[SPECIALIZED_FN1:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
459+
// CHECK: [[SPECIALIZED_FN2:%.*]] = function_ref @{{.*}}address_closure_noescape_user{{.*}} : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
446460
// CHECK: apply [[SPECIALIZED_FN2]]{{.*}}
447461
// CHECK: apply [[SPECIALIZED_FN1]]{{.*}}
448462
// CHECK-NOT: partial_apply
@@ -453,13 +467,14 @@ bb0(%0 : $C, %1 : $C):
453467
store %0 to %4 : $*C
454468
%7 = function_ref @address_closure_class1 : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
455469
%8 = partial_apply %7(%4, %1) : $@convention(thin) (@inout_aliasable C, @owned C) -> ()
456-
%10 = function_ref @address_closure_user : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
470+
%8b = convert_function %8 : $@callee_owned () -> () to $@noescape @callee_owned () -> ()
471+
%10 = function_ref @address_closure_noescape_user : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
457472
strong_retain %0 : $C
458473
strong_retain %1 : $C
459474
strong_retain %8 : $@callee_owned () -> ()
460-
%14 = apply %10(%8) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
475+
%14 = apply %10(%8b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
461476
strong_retain %8 : $@callee_owned () -> ()
462-
%16 = apply %10(%8) : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
477+
%16 = apply %10(%8b) : $@convention(thin) (@owned @noescape @callee_owned () -> ()) -> ()
463478
%17 = load %4 : $*C
464479
strong_retain %17 : $C
465480
strong_release %8 : $@callee_owned () -> ()
@@ -661,13 +676,13 @@ bb4:
661676
sil [noinline] @$S4test3barSiAA1P_p_SitF : $@convention(thin) (@in P, Int32) -> Int32 {
662677
bb0(%0 : $*P, %1 : $Int32):
663678
%2 = open_existential_addr mutable_access %0 : $*P to $*@opened("01234567-89ab-cdef-0123-000000000000") P
664-
%3 = witness_method $@opened("01234567-89ab-cdef-0123-000000000000") P, #P.foo!1, %2 : $*@opened("01234567-89ab-cdef-0123-000000000000") P : $@convention(witness_method: P) @callee_owned <T: P> (@owned @callee_owned (Int32) -> Int32, Int32, @inout T) -> Int32
679+
%3 = witness_method $@opened("01234567-89ab-cdef-0123-000000000000") P, #P.foo!1, %2 : $*@opened("01234567-89ab-cdef-0123-000000000000") P : $@convention(witness_method: P) @callee_owned <T: P> (@callee_owned (Int32) -> Int32, Int32, @inout T) -> Int32
665680
%4 = integer_literal $Builtin.Int32, 2
666681
%5 = struct $Int32 (%4 : $Builtin.Int32)
667682
// function_ref test.baz (Swift.Int32)(m : Swift.Int32) -> Swift.Int32
668683
%6 = function_ref @$S4test3bazSiSi1m_tcSiF : $@convention(thin) (Int32, Int32) -> Int32
669684
%7 = partial_apply %6(%5) : $@convention(thin) (Int32, Int32) -> Int32
670-
%8 = apply %3<@opened("01234567-89ab-cdef-0123-000000000000") P>(%7, %1, %2) : $@convention(witness_method: P) @callee_owned <T: P> (@owned @callee_owned (Int32) -> Int32, Int32, @inout T) -> Int32
685+
%8 = apply %3<@opened("01234567-89ab-cdef-0123-000000000000") P>(%7, %1, %2) : $@convention(witness_method: P) @callee_owned <T: P> (@callee_owned (Int32) -> Int32, Int32, @inout T) -> Int32
671686
destroy_addr %0 : $*P
672687
return %8 : $Int32
673688
}
@@ -687,7 +702,7 @@ bb0(%0 : $Builtin.Int32):
687702
unreachable
688703
}
689704

690-
sil hidden [serialized] @thunk : $@convention(thin) (@owned @callee_owned () -> ()) -> @out () {
705+
sil hidden [serialized] @thunk : $@convention(thin) (@callee_owned () -> ()) -> @out () {
691706
bb0(%0 : $*(), %1 : $@callee_owned () -> ()):
692707
apply %1() : $@callee_owned () -> ()
693708
%9999 = tuple()
@@ -702,9 +717,9 @@ bb0:
702717
%f1 = function_ref @callee : $@convention(thin) (Builtin.Int32) -> ()
703718
%i1 = integer_literal $Builtin.Int32, 24
704719
%p1 = partial_apply %f1(%i1) : $@convention(thin) (Builtin.Int32) -> ()
705-
%f2 = function_ref @thunk : $@convention(thin) (@owned @callee_owned () -> ()) -> @out ()
720+
%f2 = function_ref @thunk : $@convention(thin) (@callee_owned () -> ()) -> @out ()
706721
%s1 = alloc_stack $()
707-
%a1 = apply %f2(%s1, %p1) : $@convention(thin) (@owned @callee_owned () -> ()) -> @out ()
722+
%a1 = apply %f2(%s1, %p1) : $@convention(thin) (@callee_owned () -> ()) -> @out ()
708723
dealloc_stack %s1 : $*()
709724
unreachable
710725
}

0 commit comments

Comments
 (0)