Skip to content

Commit 7d9328e

Browse files
authored
Merge pull request #61407 from nate-chandler/test/20221002/1
[Test] Restored test case.
2 parents de59784 + 23b7c71 commit 7d9328e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/SILOptimizer/copy_propagation.sil

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,15 @@ bb0(%0 : @owned $C):
812812

813813
// Test that copy propagation doesn't hoist a destroy_value corresponding to
814814
// 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'
815824
sil [ossa] @dont_hoist_move_value_lexical_destroy_over_barrier_apply : $@convention(thin) (@owned C) -> () {
816825
entry(%instance : @owned $C):
817826
%lifetime = move_value [lexical] %instance : $C

0 commit comments

Comments
 (0)