Skip to content

Commit 8af76de

Browse files
committed
[Test] Added brief comments describing goal.
1 parent 09dde09 commit 8af76de

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/SILOptimizer/mem2reg_lifetime.sil

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,7 @@ entry(%instance : @owned $C):
15481548
}
15491549

15501550

1551+
// End lifetime before unreachable inst.
15511552
// CHECK-LABEL: sil [ossa] @unreachable_5 : $@convention(thin) (@owned C) -> () {
15521553
// CHECK: {{bb[0-9]+}}([[INSTANCE:%[^,]+]] : @owned $C):
15531554
// CHECK: [[LIFETIME:%[^,]+]] = begin_borrow [lexical] [[INSTANCE]]
@@ -1567,6 +1568,7 @@ exit:
15671568
unreachable
15681569
}
15691570

1571+
// Bail out if alloc_stack is in unreachable block.
15701572
// CHECK-LABEL: sil [ossa] @unreachable_6 : $@convention(thin) (@owned C) -> () {
15711573
// CHECK: alloc_stack [lexical]
15721574
// CHECK-LABEL: } // end sil function 'unreachable_6'
@@ -1585,6 +1587,7 @@ exit:
15851587
}
15861588

15871589

1590+
// Bail out if alloc_stack is in unreachable block.
15881591
// CHECK-LABEL: sil [ossa] @unreachable_7 : $@convention(thin) (@owned C) -> () {
15891592
// CHECK: alloc_stack [lexical]
15901593
// CHECK-LABEL: } // end sil function 'unreachable_7'
@@ -1606,7 +1609,7 @@ exit:
16061609
return %res : $()
16071610
}
16081611

1609-
1612+
// Bail out if alloc_stack is in unreachable block.
16101613
// CHECK-LABEL: sil [ossa] @unreachable_8 : $@convention(thin) (@owned C) -> () {
16111614
// CHECK: alloc_stack [lexical]
16121615
// CHECK-LABEL: } // end sil function 'unreachable_8'
@@ -1632,7 +1635,7 @@ exit:
16321635
return %res : $()
16331636
}
16341637

1635-
1638+
// End lifetime after loop which is followed by unreachable.
16361639
// CHECK-LABEL: sil [ossa] @unreachable_loop_1 : $@convention(thin) () -> () {
16371640
// CHECK: {{bb[0-9]+}}:
16381641
// CHECK: [[GET_C:%[^,]+]] = function_ref @getC : $@convention(thin) () -> @owned C
@@ -1672,7 +1675,7 @@ die:
16721675
unreachable
16731676
}
16741677

1675-
1678+
// Bail out if alloc_stack is in unreachable block.
16761679
// CHECK-LABEL: sil [ossa] @unreachable_loop_2 : $@convention(thin) () -> () {
16771680
// CHECK: alloc_stack [lexical]
16781681
// CHECK-LABEL: } // end sil function 'unreachable_loop_2'
@@ -1697,7 +1700,7 @@ die:
16971700
unreachable
16981701
}
16991702

1700-
1703+
// Bail out if alloc_stack is in unreachable block.
17011704
// CHECK-LABEL: sil [ossa] @unreachable_loop_3 : $@convention(thin) () -> () {
17021705
// CHECK: alloc_stack [lexical]
17031706
// CHECK-LABEL: } // end sil function 'unreachable_loop_3'

0 commit comments

Comments
 (0)