@@ -65,16 +65,26 @@ var value: Bool { false }
65
65
66
66
// SILGEN-LABEL: sil hidden [ossa] @$s16moveonly_deinits19KlassPairWithDeinitVfD : $@convention(method) (@owned KlassPairWithDeinit) -> () {
67
67
// SILGEN: bb0([[ARG:%.*]] :
68
- // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[ARG]]
68
+ // SILGEN: [[STACK:%.*]] = alloc_stack
69
+ // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[STACK]]
70
+ // SILGEN: store [[ARG]] to [init] [[MARK]]
69
71
// SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
70
- // SILGEN: destroy_value [[DD]]
72
+ // SILGEN: [[L_ADDR:%[^,]+]] = struct_element_addr [[DD]]
73
+ // SILGEN-SAME: #KlassPairWithDeinit.lhs
74
+ // SILGEN: [[L_ACCESS:%[^,]+]] = begin_access [deinit] [static] [[L_ADDR]]
75
+ // SILGEN: destroy_addr [[L_ACCESS]]
76
+ // SILGEN: [[R_ADDR:%[^,]+]] = struct_element_addr [[DD]]
77
+ // SILGEN-SAME: #KlassPairWithDeinit.rhs
78
+ // SILGEN: [[R_ACCESS:%[^,]+]] = begin_access [deinit] [static] [[R_ADDR]]
79
+ // SILGEN: destroy_addr [[R_ACCESS]]
71
80
// SILGEN: } // end sil function '$s16moveonly_deinits19KlassPairWithDeinitVfD'
72
81
73
82
// SILGEN-LABEL: sil hidden [ossa] @$s16moveonly_deinits17IntPairWithDeinitVfD : $@convention(method) (@owned IntPairWithDeinit) -> () {
74
83
// SILGEN: bb0([[ARG:%.*]] :
75
- // SILGEN: [[MARKED:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[ARG]]
76
- // SILGEN: [[DD:%.*]] = drop_deinit [[MARKED]]
77
- // SILGEN: destroy_value [[DD]]
84
+ // SILGEN: [[STACK:%.*]] = alloc_stack
85
+ // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[STACK]]
86
+ // SILGEN: store [[ARG]] to [init] [[MARK]]
87
+ // SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
78
88
// SILGEN: } // end sil function '$s16moveonly_deinits17IntPairWithDeinitVfD'
79
89
80
90
////////////////////////
@@ -323,20 +333,40 @@ func consumeKlassEnumPairWithDeinit(_ x: __owned KlassEnumPairWithDeinit) { }
323
333
324
334
// SILGEN-LABEL: sil hidden [ossa] @$s16moveonly_deinits23KlassEnumPairWithDeinitOfD : $@convention(method) (@owned KlassEnumPairWithDeinit) -> () {
325
335
// SILGEN: bb0([[ARG:%.*]] :
326
- // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[ARG]]
336
+ // SILGEN: [[STACK:%.*]] = alloc_stack
337
+ // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[STACK]]
338
+ // SILGEN: store [[ARG]] to [init] [[MARK]]
327
339
// SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
328
- // SILGEN: destroy_value [[DD]] : $KlassEnumPairWithDeinit
329
- // SILGEN-NEXT: tuple ()
330
- // SILGEN-NEXT: return
340
+ // SILGEN: switch_enum_addr [[DD]]
341
+ // SILGEN-SAME: case #KlassEnumPairWithDeinit.lhs!enumelt: [[BASIC_BLOCK1:bb[0-9]+]]
342
+ // SILGEN-SAME: case #KlassEnumPairWithDeinit.rhs!enumelt: [[BASIC_BLOCK2:bb[0-9]+]]
343
+ // SILGEN: [[BASIC_BLOCK1]]:
344
+ // SILGEN: [[L_ADDR:%[^,]+]] = unchecked_take_enum_data_addr [[DD]]
345
+ // SILGEN-SAME: #KlassEnumPairWithDeinit.lhs!enumelt
346
+ // SILGEN: destroy_addr [[L_ADDR]]
347
+ // SILGEN: [[BASIC_BLOCK2]]:
348
+ // SILGEN: [[R_ADDR:%[^,]+]] = unchecked_take_enum_data_addr [[DD]]
349
+ // SILGEN-SAME: #KlassEnumPairWithDeinit.rhs!enumelt
350
+ // SILGEN: destroy_addr [[R_ADDR]]
331
351
// SILGEN: } // end sil function '$s16moveonly_deinits23KlassEnumPairWithDeinitOfD'
332
352
333
353
// SILGEN-LABEL: sil hidden [ossa] @$s16moveonly_deinits21IntEnumPairWithDeinitOfD : $@convention(method) (@owned IntEnumPairWithDeinit) -> () {
334
354
// SILGEN: bb0([[ARG:%.*]] :
335
- // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[ARG]]
355
+ // SILGEN: [[STACK:%.*]] = alloc_stack
356
+ // SILGEN: [[MARK:%.*]] = mark_unresolved_non_copyable_value [consumable_and_assignable] [[STACK]]
357
+ // SILGEN: store [[ARG]] to [init] [[MARK]]
336
358
// SILGEN: [[DD:%.*]] = drop_deinit [[MARK]]
337
- // SILGEN: destroy_value [[DD]] : $IntEnumPairWithDeinit
338
- // SILGEN-NEXT: tuple ()
339
- // SILGEN-NEXT: return
359
+ // SILGEN: switch_enum_addr [[DD]]
360
+ // SILGEN-SAME: case #IntEnumPairWithDeinit.lhs!enumelt: [[BASIC_BLOCK1:bb[0-9]+]]
361
+ // SILGEN-SAME: case #IntEnumPairWithDeinit.rhs!enumelt: [[BASIC_BLOCK2:bb[0-9]+]]
362
+ // SILGEN: [[BASIC_BLOCK1]]:
363
+ // SILGEN: [[L_ADDR:%[^,]+]] = unchecked_take_enum_data_addr [[DD]]
364
+ // SILGEN-SAME: #IntEnumPairWithDeinit.lhs!enumelt
365
+ // SILGEN: destroy_addr [[L_ADDR]]
366
+ // SILGEN: [[BASIC_BLOCK2]]:
367
+ // SILGEN: [[R_ADDR:%[^,]+]] = unchecked_take_enum_data_addr [[DD]]
368
+ // SILGEN-SAME: #IntEnumPairWithDeinit.rhs!enumelt
369
+ // SILGEN: destroy_addr [[R_ADDR]]
340
370
// SILGEN: } // end sil function '$s16moveonly_deinits21IntEnumPairWithDeinitOfD'
341
371
342
372
//////////////////////
0 commit comments