@@ -40,14 +40,7 @@ entry(%instance : $*S):
40
40
// tests
41
41
42
42
// CHECK-LABEL: sil [ossa] @caller_owned_callee_owned : $@convention(thin) (@owned C) -> () {
43
- // CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @owned $C):
44
- // CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
45
- // CHECK: [[COPY:%[^,]+]] = copy_value [[LIFETIME]]
46
- // CHECK: destroy_value [[COPY]]
47
- // CHECK: [[RETVAL:%[^,]+]] = tuple ()
48
- // CHECK: end_borrow [[LIFETIME]]
49
- // CHECK: destroy_value [[INSTANCE]]
50
- // CHECK: return [[RETVAL]]
43
+ // CHECK-NOT: begin_borrow [lexical]
51
44
// CHECK-LABEL: } // end sil function 'caller_owned_callee_owned'
52
45
sil [ossa] @caller_owned_callee_owned : $@convention(thin) (@owned C) -> () {
53
46
entry(%instance : @owned $C):
@@ -87,15 +80,7 @@ entry(%instance : @guaranteed $C):
87
80
}
88
81
89
82
// CHECK-LABEL: sil [ossa] @caller_guaranteed_callee_owned : $@convention(thin) (@guaranteed C) -> () {
90
- // CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @guaranteed $C):
91
- // CHECK: [[COPY:%[^,]+]] = copy_value [[INSTANCE]]
92
- // CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[COPY]]
93
- // CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
94
- // CHECK: destroy_value [[LIFETIME_OWNED]]
95
- // CHECK: [[RETVAL:%[^,]+]] = tuple ()
96
- // CHECK: end_borrow [[LIFETIME]]
97
- // CHECK: destroy_value [[COPY]]
98
- // CHECK: return [[RETVAL]]
83
+ // CHECK-NOT: begin_borrow [lexical]
99
84
// CHECK-LABEL: } // end sil function 'caller_guaranteed_callee_owned'
100
85
sil [ossa] @caller_guaranteed_callee_owned : $@convention(thin) (@guaranteed C) -> () {
101
86
entry(%instance : @guaranteed $C):
@@ -195,22 +180,7 @@ bb2:
195
180
// tests
196
181
197
182
// CHECK-LABEL: sil [ossa] @caller_owned_callee_coro_owned : $@convention(method) (@owned C) -> () {
198
- // CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @owned $C):
199
- // CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
200
- // CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
201
- // CHECK: [[ADDR:%[^,]+]] = alloc_stack $C
202
- // CHECK: store [[LIFETIME_OWNED]] to [init] [[ADDR]]
203
- // CHECK: destroy_addr [[ADDR]]
204
- // CHECK: dealloc_stack [[ADDR]]
205
- // CHECK: [[ORIGINAL_RETVAL:%[^,]+]] = tuple ()
206
- // CHECK: end_borrow [[LIFETIME]]
207
- // CHECK: destroy_value [[INSTANCE]]
208
- // CHECK: [[RETVAL:%[^,]+]] = tuple ()
209
- // CHECK: return [[RETVAL]]
210
- // CHECK: bb1:
211
- // CHECK: destroy_addr [[ADDR]]
212
- // CHECK: dealloc_stack [[ADDR]]
213
- // CHECK: unreachable
183
+ // CHECK-NOT: begin_borrow [lexical]
214
184
// CHECK-LABEL: } // end sil function 'caller_owned_callee_coro_owned'
215
185
sil [ossa] @caller_owned_callee_coro_owned : $@convention(method) (@owned C) -> () {
216
186
bb0(%instance : @owned $C):
@@ -250,23 +220,7 @@ bb0(%instance : @owned $C):
250
220
}
251
221
252
222
// CHECK-LABEL: sil [ossa] @caller_guaranteed_callee_coro_owned : $@convention(method) (@guaranteed C) -> () {
253
- // CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @guaranteed $C):
254
- // CHECK: [[COPY:%[^,]+]] = copy_value [[INSTANCE]]
255
- // CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[COPY]]
256
- // CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
257
- // CHECK: [[ADDR:%[^,]+]] = alloc_stack $C
258
- // CHECK: store [[LIFETIME_OWNED]] to [init] [[ADDR]]
259
- // CHECK: destroy_addr [[ADDR]]
260
- // CHECK: dealloc_stack [[ADDR]]
261
- // CHECK: [[ORIGINAL_RETVAL:%[^,]+]] = tuple ()
262
- // CHECK: end_borrow [[LIFETIME]]
263
- // CHECK: destroy_value [[COPY]]
264
- // CHECK: [[RETVAL:%[^,]+]] = tuple ()
265
- // CHECK: return [[RETVAL]]
266
- // CHECK: bb1:
267
- // CHECK: destroy_addr [[ADDR]]
268
- // CHECK: dealloc_stack [[ADDR]]
269
- // CHECK: unreachable
223
+ // CHECK-NOT: begin_borrow [lexical]
270
224
// CHECK-LABEL: } // end sil function 'caller_guaranteed_callee_coro_owned'
271
225
sil [ossa] @caller_guaranteed_callee_coro_owned : $@convention(method) (@guaranteed C) -> () {
272
226
bb0(%instance : @guaranteed $C):
@@ -393,22 +347,7 @@ bb2:
393
347
// tests
394
348
395
349
// CHECK-LABEL: sil [ossa] @callee_owned_callee_error_owned : $@convention(thin) (@owned C) -> @error Error {
396
- // CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @owned $C):
397
- // CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
398
- // CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
399
- // CHECK: cond_br undef, [[THROW_BLOCK:bb[^,]+]], [[REGULAR_BLOCK:bb[0-9]+]]
400
- // CHECK: [[THROW_BLOCK]]:
401
- // CHECK: destroy_value [[LIFETIME_OWNED]]
402
- // CHECK: end_borrow [[LIFETIME]]
403
- // CHECK: destroy_value [[INSTANCE]]
404
- // CHECK: throw undef
405
- // CHECK: [[REGULAR_BLOCK]]:
406
- // CHECK: destroy_value [[LIFETIME_OWNED]]
407
- // CHECK: [[ORIGINAL_RETVAL:%[^,]+]] = tuple ()
408
- // CHECK: end_borrow [[LIFETIME]]
409
- // CHECK: destroy_value [[INSTANCE]]
410
- // CHECK: [[RETVAL:%[^,]+]] = tuple ()
411
- // CHECK: return [[RETVAL]]
350
+ // CHECK-NOT: begin_borrow [lexical]
412
351
// CHECK-LABEL: } // end sil function 'callee_owned_callee_error_owned'
413
352
sil [ossa] @callee_owned_callee_error_owned : $@convention(thin) (@owned C) -> @error Error {
414
353
bb0(%instance : @owned $C):
@@ -451,23 +390,7 @@ bb2(%12 : @owned $Error):
451
390
}
452
391
453
392
// CHECK-LABEL: sil [ossa] @callee_guaranteed_callee_error_owned : $@convention(thin) (@guaranteed C) -> @error Error {
454
- // CHECK: {{bb[^,]+}}([[INSTANCE:%[^,]+]] : @guaranteed $C):
455
- // CHECK: [[COPY:%[^,]+]] = copy_value [[INSTANCE]]
456
- // CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[COPY]]
457
- // CHECK: [[LIFETIME_OWNED:%[^,]+]] = copy_value [[LIFETIME]]
458
- // CHECK: cond_br undef, [[THROW_BLOCK:bb[^,]+]], [[REGULAR_BLOCK:bb[0-9]+]]
459
- // CHECK: [[THROW_BLOCK]]:
460
- // CHECK: destroy_value [[LIFETIME_OWNED]]
461
- // CHECK: end_borrow [[LIFETIME]]
462
- // CHECK: destroy_value [[COPY]]
463
- // CHECK: throw undef
464
- // CHECK: [[REGULAR_BLOCK]]:
465
- // CHECK: destroy_value [[LIFETIME_OWNED]]
466
- // CHECK: [[ORIGINAL_RETVAL:%[^,]+]] = tuple ()
467
- // CHECK: end_borrow [[LIFETIME]]
468
- // CHECK: destroy_value [[COPY]]
469
- // CHECK: [[RETVAL:%[^,]+]] = tuple ()
470
- // CHECK: return [[RETVAL]]
393
+ // CHECK-NOT: begin_borrow [lexical]
471
394
// CHECK-LABEL: } // end sil function 'callee_guaranteed_callee_error_owned'
472
395
sil [ossa] @callee_guaranteed_callee_error_owned : $@convention(thin) (@guaranteed C) -> @error Error {
473
396
bb0(%instance : @guaranteed $C):
0 commit comments