@@ -106,3 +106,36 @@ entry:
106
106
return %retval : $()
107
107
}
108
108
109
+ // CHECK-LABEL: begin running test 1 of 1 on pay_the_phi: visit-adjacent-reborrows-of-phi with: @trace[2]
110
+ // CHECK: sil [ossa] @pay_the_phi : {{.*}} {
111
+ // CHECK: [[C:%[^,]+]] = apply
112
+ // CHECK: [[BORROW1:%[^,]+]] = begin_borrow %1
113
+ // CHECK: [[BORROW2:%[^,]+]] = begin_borrow %1
114
+ // CHECK: br [[EXIT:bb[0-9]+]]([[C]] : $C, [[BORROW1]] : $C, [[BORROW2]] :
115
+ // CHECK: [[EXIT]]({{%[^,]+}} : @owned $C, [[GUARANTEED1:%[^,]+]] : @guaranteed $C, [[GUARANTEED2:%[^,]+]] :
116
+ // CHECK: } // end sil function 'pay_the_phi'
117
+
118
+ // CHECK:[[GUARANTEED1]] = argument of [[EXIT]]
119
+ // CHECK:[[GUARANTEED2]] = argument of [[EXIT]]
120
+ // CHECK-LABEL: end running test 1 of 1 on pay_the_phi: visit-adjacent-reborrows-of-phi with: @trace[2]
121
+ sil [ossa] @pay_the_phi : $@convention(thin) () -> () {
122
+ entry:
123
+ test_specification "visit-adjacent-reborrows-of-phi @trace[2]"
124
+ %getC = function_ref @getC : $@convention(thin) () -> @owned C
125
+ %c = apply %getC() : $@convention(thin) () -> @owned C
126
+ debug_value [trace] %c : $C
127
+ %borrow1 = begin_borrow %c : $C
128
+ %borrow2 = begin_borrow %c : $C
129
+ debug_value [trace] %borrow2 : $C
130
+ %borrow3 = begin_borrow %borrow2 : $C
131
+ br exit(%c : $C, %borrow1 : $C, %borrow2 : $C, %borrow3 : $C)
132
+
133
+ exit(%owned : @owned $C, %guaranteed_1 : @guaranteed $C, %guaranteed_2 : @guaranteed $C, %guaranteed_3 : @guaranteed $C):
134
+ debug_value [trace] %owned : $C
135
+ end_borrow %guaranteed_3 : $C
136
+ end_borrow %guaranteed_2 : $C
137
+ end_borrow %guaranteed_1 : $C
138
+ destroy_value %owned : $C
139
+ %retval = tuple ()
140
+ return %retval : $()
141
+ }
0 commit comments