File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1159,7 +1159,7 @@ void OpaqueStorageAllocation::allocatePhi(PhiValue phi) {
1159
1159
coalescedPhi.coalesce (phi, pass.valueStorageMap );
1160
1160
1161
1161
SmallVector<SILValue, 4 > coalescedValues;
1162
- coalescedValues.resize (coalescedPhi.getCoalescedOperands ().size ());
1162
+ coalescedValues.reserve (coalescedPhi.getCoalescedOperands ().size ());
1163
1163
for (SILValue value : coalescedPhi.getCoalescedValues ())
1164
1164
coalescedValues.push_back (value);
1165
1165
Original file line number Diff line number Diff line change @@ -500,3 +500,20 @@ merge(%34 : @owned $Value):
500
500
%43 = tuple ()
501
501
return %43 : $()
502
502
}
503
+
504
+ // CHECK-LABEL: sil [ossa] @f105_phi_into_tuple : {{.*}} {
505
+ // CHECK: [[STORAGE:%[^,]+]] = alloc_stack $(Self, Builtin.Int1)
506
+ // CHECK: [[SELF_ADDR:%[^,]+]] = tuple_element_addr [[STORAGE]]
507
+ // CHECK: apply {{%[^,]+}}<Self>([[SELF_ADDR]])
508
+ // CHECK-LABEL: } // end sil function 'f105_phi_into_tuple'
509
+ sil [ossa] @f105_phi_into_tuple : $@convention(thin) <Self> () -> () {
510
+ %getOut = function_ref @getOut : $@convention(thin) <T> () -> @out T
511
+ %self = apply %getOut<Self>() : $@convention(thin) <τ_0_0> () -> @out τ_0_0
512
+ br exit(%self : $Self)
513
+
514
+ exit(%self_2 : @owned $Self):
515
+ %tuple = tuple (%self_2 : $Self, undef : $Bool)
516
+ destroy_value %tuple : $(Self, Bool)
517
+ %retval = tuple ()
518
+ return %retval : $()
519
+ }
You can’t perform that action at this time.
0 commit comments