File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -812,6 +812,15 @@ bb0(%0 : @owned $C):
812
812
813
813
// Test that copy propagation doesn't hoist a destroy_value corresponding to
814
814
// a move value [lexical] over a barrier.
815
+ // CHECK-LABEL: sil [ossa] @dont_hoist_move_value_lexical_destroy_over_barrier_apply : {{.*}} {
816
+ // CHECK: {{bb[0-9]+}}([[INSTANCE:%[^,]+]] : @owned $C):
817
+ // CHECK: [[LIFETIME:%[^,]+]] = move_value [lexical] [[INSTANCE]]
818
+ // CHECK: [[BARRIER:%[^,]+]] = function_ref @barrier
819
+ // CHECK: [[TAKE_GUARANTEED_C:%[^,]+]] = function_ref @takeGuaranteedC
820
+ // CHECK: apply [[TAKE_GUARANTEED_C]]([[LIFETIME]])
821
+ // CHECK: apply [[BARRIER]]()
822
+ // CHECK: destroy_value [[LIFETIME]]
823
+ // CHECK-LABEL: } // end sil function 'dont_hoist_move_value_lexical_destroy_over_barrier_apply'
815
824
sil [ossa] @dont_hoist_move_value_lexical_destroy_over_barrier_apply : $@convention(thin) (@owned C) -> () {
816
825
entry(%instance : @owned $C):
817
826
%lifetime = move_value [lexical] %instance : $C
You can’t perform that action at this time.
0 commit comments