mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Update Array bounds check optimization's isIdentifiedUnderlyingArrayObject
This commit is contained in:
@@ -177,6 +177,10 @@ static bool isIdentifiedUnderlyingArrayObject(SILValue V) {
|
||||
if (isa<SILFunctionArgument>(V))
|
||||
return true;
|
||||
|
||||
auto rootVal = lookThroughAddressAndValueProjections(V);
|
||||
if (rootVal != V) {
|
||||
return isIdentifiedUnderlyingArrayObject(rootVal);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user