File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
lib/SILOptimizer/Analysis Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,6 @@ bool swift::canUseObject(SILInstruction *Inst) {
175
175
case SILInstructionKind::UncheckedAddrCastInst:
176
176
case SILInstructionKind::RefToRawPointerInst:
177
177
case SILInstructionKind::RawPointerToRefInst:
178
- case SILInstructionKind::UnconditionalCheckedCastInst:
179
178
case SILInstructionKind::UncheckedBitwiseCastInst:
180
179
case SILInstructionKind::EndInitLetRefInst:
181
180
case SILInstructionKind::BeginDeallocRefInst:
Original file line number Diff line number Diff line change @@ -1123,3 +1123,18 @@ bb1:
1123
1123
return %5 : $()
1124
1124
}
1125
1125
1126
+ // CHECK: sil @dont_hoist_release_accross_cast
1127
+ // CHECK: retain
1128
+ // CHECK: apply
1129
+ // CHECK: unconditional_checked_cast
1130
+ // CHECK: release
1131
+ sil @dont_hoist_release_accross_cast : $@convention(thin) (B, B) -> () {
1132
+ bb0(%0 : $B, %1: $B):
1133
+ strong_retain %0: $B
1134
+ apply undef() : $@convention(thin) () -> ()
1135
+ %3 = unconditional_checked_cast %0 : $B to Builtin.NativeObject
1136
+ strong_release %0: $B
1137
+ %5 = tuple()
1138
+ return %5 : $()
1139
+ }
1140
+
You can’t perform that action at this time.
0 commit comments