Skip to content

Commit 4f054f1

Browse files
committed
Allow load instructions in ArrayPropertyOpt's checkSafeArrayAddressUses
1 parent a9c73ef commit 4f054f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/SILOptimizer/LoopTransforms/ArrayPropertyOpt.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ class ArrayPropertiesAnalysis {
254254
/// new array onto it.
255255
bool checkSafeArrayAddressUses(UserList &AddressUsers) {
256256
for (auto *UseInst : AddressUsers) {
257-
258257
if (UseInst->isDebugInstruction())
259258
continue;
260259

@@ -263,6 +262,10 @@ class ArrayPropertiesAnalysis {
263262
continue;
264263
}
265264

265+
if (isa<LoadInst>(UseInst)) {
266+
continue;
267+
}
268+
266269
if (auto *AI = dyn_cast<ApplyInst>(UseInst)) {
267270
if (ArraySemanticsCall(AI))
268271
continue;

0 commit comments

Comments
 (0)