Skip to content

Commit 8a7cbb6

Browse files
committed
[Test] Commented two test cases' behaviors.
1 parent 06f53fe commit 8a7cbb6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/SILOptimizer/moveonly_addresschecker_unmaximized.sil

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ bb0:
6666
return %22 : $()
6767
}
6868

69+
// Two non-contiguous fields (#M4.s2, #M4.s4) are reinitialized by @replace_2.
70+
//
71+
// Verify that #M4.s4 is not destroyed before being passed to replace_2.
6972
// CHECK-LABEL: sil [ossa] @rdar111356251 : $@convention(thin) () -> () {
7073
// CHECK: [[STACK:%[^,]+]] = alloc_stack $M4
7174
// CHECK: [[GET_M4:%[^,]+]] = function_ref @get_M4 : $@convention(thin) () -> @owned M4
7275
// CHECK: [[INSTANCE:%[^,]+]] = apply [[GET_M4]]() : $@convention(thin) () -> @owned M4
7376
// CHECK: store [[INSTANCE]] to [init] [[STACK]] : $*M4
77+
// CHECK-NOT: destroy_addr
7478
// CHECK: [[S2_ADDR:%[^,]+]] = struct_element_addr [[STACK]] : $*M4, #M4.s2
7579
// CHECK: [[S4_ADDR:%[^,]+]] = struct_element_addr [[STACK]] : $*M4, #M4.s4
7680
// CHECK: [[REPLACE_2:%[^,]+]] = function_ref @replace_2 : $@convention(thin) (@inout M, @inout M) -> ()
@@ -109,6 +113,8 @@ bb0:
109113
return %22 : $()
110114
}
111115

116+
// Two non-contiguous fields (#M4.s2, #M4.s4) are initialized by @get_out_2.
117+
//
112118
// Verify that M4.s4 is not leaked after it is set.
113119
// CHECK-LABEL: sil [ossa] @rdar111391893 : $@convention(thin) () -> () {
114120
// CHECK: [[GET_OUT_2:%[^,]+]] = function_ref @get_out_2

0 commit comments

Comments
 (0)