@@ -1022,11 +1022,11 @@ bb0(%0 : $@sil_unmanaged AnyObject):
10221022
10231023sil @foo : $@convention(thin) () -> ()
10241024
1025- // CHECK-LABEL: sil [ossa] @test_escape : {{.*}} {
1025+ // CHECK-LABEL: sil [ossa] @test_escape1 : {{.*}} {
10261026// CHECK: br bb1
10271027// CHECK: end_borrow
1028- // CHECK-LABEL: } // end sil function 'test_escape '
1029- sil [ossa] @test_escape : $@convention(thin) () -> () {
1028+ // CHECK-LABEL: } // end sil function 'test_escape1 '
1029+ sil [ossa] @test_escape1 : $@convention(thin) () -> () {
10301030bb0:
10311031 %13 = function_ref @foo : $@convention(thin) () -> ()
10321032 %14 = partial_apply [callee_guaranteed] %13() : $@convention(thin) () -> ()
@@ -1044,6 +1044,27 @@ bb1(%21 : @owned $@noescape @callee_guaranteed () -> (), %22 : @guaranteed $@cal
10441044 return %28: $()
10451045}
10461046
1047+ // CHECK-LABEL: sil [ossa] @test_escape2 : {{.*}} {
1048+ // CHECK: br bb1
1049+ // CHECK: destroy_value
1050+ // CHECK: destroy_value
1051+ // CHECK-LABEL: } // end sil function 'test_escape2'
1052+ sil [ossa] @test_escape2 : $@convention(thin) () -> () {
1053+ bb0:
1054+ %13 = function_ref @foo : $@convention(thin) () -> ()
1055+ %14 = partial_apply [callee_guaranteed] %13() : $@convention(thin) () -> ()
1056+ %15 = convert_escape_to_noescape %14 : $@callee_guaranteed () -> () to $@noescape @callee_guaranteed () -> ()
1057+ %18 = mark_dependence %15 : $@noescape @callee_guaranteed () -> () on %14 : $@callee_guaranteed () -> ()
1058+ br bb1(%18 : $@noescape @callee_guaranteed () -> (), %14 : $@callee_guaranteed () -> ())
1059+
1060+ bb1(%21 : @owned $@noescape @callee_guaranteed () -> (), %23 : @owned $@callee_guaranteed () -> ()):
1061+ %27 = apply %21() : $@noescape @callee_guaranteed () -> ()
1062+ destroy_value %21 : $@noescape @callee_guaranteed () -> ()
1063+ destroy_value %23 : $@callee_guaranteed () -> ()
1064+ %28 = tuple ()
1065+ return %28: $()
1066+ }
1067+
10471068sil @use_klass : $@convention(thin) (@guaranteed Klass) -> ()
10481069
10491070// CHECK-LABEL: sil [ossa] @test_forwarded_phi1 :
0 commit comments