@@ -199,7 +199,7 @@ sil [ossa] @dont_copy_let_properties_with_guaranteed_base : $@convention(thin) (
199
199
bb0(%x : @guaranteed $ClassLet):
200
200
%f = function_ref @black_hole : $@convention(thin) (@guaranteed Klass) -> ()
201
201
202
- %p = ref_element_addr %x : $ClassLet, #ClassLet.aLet
202
+ %p = ref_element_addr [immutable] %x : $ClassLet, #ClassLet.aLet
203
203
%v = load [copy] %p : $*Klass
204
204
%b = begin_borrow %v : $Klass
205
205
apply %f(%b) : $@convention(thin) (@guaranteed Klass) -> ()
@@ -223,7 +223,7 @@ sil [ossa] @dont_copy_let_properties_with_guaranteed_base_and_forwarding_uses :
223
223
bb0(%x : @guaranteed $ClassLet):
224
224
%f = function_ref @black_hole : $@convention(thin) (@guaranteed Klass) -> ()
225
225
226
- %p = ref_element_addr %x : $ClassLet, #ClassLet.aLet
226
+ %p = ref_element_addr [immutable] %x : $ClassLet, #ClassLet.aLet
227
227
%v = load [copy] %p : $*Klass
228
228
%c = unchecked_ref_cast %v : $Klass to $Klass
229
229
%b = begin_borrow %c : $Klass
@@ -247,7 +247,7 @@ bb0(%x : @guaranteed $SubclassLet):
247
247
%f = function_ref @black_hole : $@convention(thin) (@guaranteed Klass) -> ()
248
248
249
249
%u = upcast %x : $SubclassLet to $ClassLet
250
- %p = ref_element_addr %u : $ClassLet, #ClassLet.aLet
250
+ %p = ref_element_addr [immutable] %u : $ClassLet, #ClassLet.aLet
251
251
%v = load [copy] %p : $*Klass
252
252
%b = begin_borrow %v : $Klass
253
253
apply %f(%b) : $@convention(thin) (@guaranteed Klass) -> ()
@@ -293,7 +293,7 @@ sil [ossa] @dont_copy_let_properties_with_guaranteed_base_structural : $@convent
293
293
bb0(%x : @guaranteed $ClassLet):
294
294
%f = function_ref @black_hole : $@convention(thin) (@guaranteed Klass) -> ()
295
295
296
- %p = ref_element_addr %x : $ClassLet, #ClassLet.aLetTuple
296
+ %p = ref_element_addr [immutable] %x : $ClassLet, #ClassLet.aLetTuple
297
297
%q = tuple_element_addr %p : $*(Klass, Klass), 1
298
298
%v = load [copy] %q : $*Klass
299
299
%b = begin_borrow %v : $Klass
@@ -369,7 +369,7 @@ bb0(%x : @owned $ClassLet):
369
369
%f = function_ref @black_hole : $@convention(thin) (@guaranteed Klass) -> ()
370
370
371
371
%a = begin_borrow %x : $ClassLet
372
- %p = ref_element_addr %a : $ClassLet, #ClassLet.aLet
372
+ %p = ref_element_addr [immutable] %a : $ClassLet, #ClassLet.aLet
373
373
%v = load [copy] %p : $*Klass
374
374
apply %f(%v) : $@convention(thin) (@guaranteed Klass) -> ()
375
375
destroy_value %v : $Klass
@@ -409,7 +409,7 @@ bb0(%x : @owned $ClassLet):
409
409
%f = function_ref @guaranteed_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
410
410
411
411
%a = begin_borrow %x : $ClassLet
412
- %p = ref_element_addr %a : $ClassLet, #ClassLet.aLet
412
+ %p = ref_element_addr [immutable] %a : $ClassLet, #ClassLet.aLet
413
413
%v = load [copy] %p : $*Klass
414
414
%v_cast = unchecked_ref_cast %v : $Klass to $Builtin.NativeObject
415
415
apply %f(%v_cast) : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
@@ -1145,7 +1145,7 @@ bb0(%0 : @guaranteed $FakeOptional<ClassLet>):
1145
1145
switch_enum %0 : $FakeOptional<ClassLet>, case #FakeOptional.some!enumelt: bb1, case #FakeOptional.none!enumelt: bb2
1146
1146
1147
1147
bb1(%1 : @guaranteed $ClassLet):
1148
- %2 = ref_element_addr %1 : $ClassLet, #ClassLet.aLet
1148
+ %2 = ref_element_addr [immutable] %1 : $ClassLet, #ClassLet.aLet
1149
1149
%3 = load [copy] %2 : $*Klass
1150
1150
apply %f(%3) : $@convention(thin) (@guaranteed Klass) -> ()
1151
1151
destroy_value %3 : $Klass
@@ -1171,7 +1171,7 @@ bb0(%0 : @owned $FakeOptional<ClassLet>):
1171
1171
switch_enum %0a : $FakeOptional<ClassLet>, case #FakeOptional.some!enumelt: bb1, case #FakeOptional.none!enumelt: bb2
1172
1172
1173
1173
bb1(%1 : @guaranteed $ClassLet):
1174
- %2 = ref_element_addr %1 : $ClassLet, #ClassLet.aLet
1174
+ %2 = ref_element_addr [immutable] %1 : $ClassLet, #ClassLet.aLet
1175
1175
%3 = load [copy] %2 : $*Klass
1176
1176
apply %f(%3) : $@convention(thin) (@guaranteed Klass) -> ()
1177
1177
destroy_value %3 : $Klass
@@ -1201,7 +1201,7 @@ bb0(%0 : $*FakeOptional<ClassLet>):
1201
1201
switch_enum %0a : $FakeOptional<ClassLet>, case #FakeOptional.some!enumelt: bb1, case #FakeOptional.none!enumelt: bb2
1202
1202
1203
1203
bb1(%1 : @guaranteed $ClassLet):
1204
- %2 = ref_element_addr %1 : $ClassLet, #ClassLet.aLet
1204
+ %2 = ref_element_addr [immutable] %1 : $ClassLet, #ClassLet.aLet
1205
1205
%3 = load [copy] %2 : $*Klass
1206
1206
apply %f(%3) : $@convention(thin) (@guaranteed Klass) -> ()
1207
1207
destroy_value %3 : $Klass
@@ -1240,7 +1240,7 @@ bb0c(%0c : @guaranteed $FakeOptional<ClassLet>):
1240
1240
switch_enum %0d : $FakeOptional<ClassLet>, case #FakeOptional.some!enumelt: bb1, case #FakeOptional.none!enumelt: bb2
1241
1241
1242
1242
bb1(%1 : @guaranteed $ClassLet):
1243
- %2 = ref_element_addr %1 : $ClassLet, #ClassLet.aLet
1243
+ %2 = ref_element_addr [immutable] %1 : $ClassLet, #ClassLet.aLet
1244
1244
%3 = load [copy] %2 : $*Klass
1245
1245
apply %f(%3) : $@convention(thin) (@guaranteed Klass) -> ()
1246
1246
destroy_value %3 : $Klass
@@ -1276,7 +1276,7 @@ bb1:
1276
1276
bb2:
1277
1277
%0b = begin_borrow %0 : $FakeOptional<ClassLet>
1278
1278
%0b2 = unchecked_enum_data %0b : $FakeOptional<ClassLet>, #FakeOptional.some!enumelt
1279
- %2 = ref_element_addr %0b2 : $ClassLet, #ClassLet.aLet
1279
+ %2 = ref_element_addr [immutable] %0b2 : $ClassLet, #ClassLet.aLet
1280
1280
%3 = load [copy] %2 : $*Klass
1281
1281
apply %f(%3) : $@convention(thin) (@guaranteed Klass) -> ()
1282
1282
destroy_value %3 : $Klass
@@ -1520,12 +1520,9 @@ bbEnd:
1520
1520
return %9999 : $()
1521
1521
}
1522
1522
1523
- // Just make sure that we do not crash on this code and convert the 2nd load
1524
- // [copy] to a load_borrow.
1523
+ // Just make sure that we do not crash on this code
1525
1524
//
1526
1525
// CHECK-LABEL: sil [ossa] @improper_dead_end_block_crasher_test : $@convention(thin) (Builtin.RawPointer) -> () {
1527
- // CHECK: load_borrow
1528
- // CHECK: load_borrow
1529
1526
// CHECK: } // end sil function 'improper_dead_end_block_crasher_test'
1530
1527
sil [ossa] @improper_dead_end_block_crasher_test : $@convention(thin) (Builtin.RawPointer) -> () {
1531
1528
bb0(%0 : $Builtin.RawPointer):
0 commit comments