Update Array bounds check optimization's isIdentifiedUnderlyingArrayObject

This commit is contained in:
Meghana Gupta
2024-07-09 14:39:35 -07:00
parent dfc5321ca6
commit 06faf98251
4 changed files with 92 additions and 0 deletions

View File

@@ -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;
}