Skip to content

Commit 6a1c942

Browse files
committed
1 parent f7ea832 commit 6a1c942

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/Backend/GlobOptArrays.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,9 +1711,7 @@ void GlobOpt::ArraySrcOpt::Optimize()
17111711

17121712
baseOpnd->SetValueType(baseValueType);
17131713

1714-
if (!baseValueType.IsLikelyAnyOptimizedArray() ||
1715-
!globOpt->DoArrayCheckHoist(baseValueType, globOpt->currentBlock->loop, instr) ||
1716-
(baseOwnerIndir && !globOpt->ShouldExpectConventionalArrayIndexValue(baseOwnerIndir)))
1714+
if (!baseValueType.IsLikelyAnyOptimizedArray())
17171715
{
17181716
return;
17191717
}
@@ -1728,6 +1726,16 @@ void GlobOpt::ArraySrcOpt::Optimize()
17281726
return;
17291727
}
17301728

1729+
if (!globOpt->DoArrayCheckHoist(baseValueType, globOpt->currentBlock->loop, instr) ||
1730+
(baseOwnerIndir && !globOpt->ShouldExpectConventionalArrayIndexValue(baseOwnerIndir)))
1731+
{
1732+
if (!globOpt->IsLoopPrePass() && baseValueType.IsAnyOptimizedArray())
1733+
{
1734+
globOpt->ProcessNoImplicitCallArrayUses(baseOpnd, nullptr, instr, isLikelyJsArray, isLoad || isStore || instr->m_opcode == Js::OpCode::IsIn);
1735+
}
1736+
return;
1737+
}
1738+
17311739
isLikelyVirtualTypedArray = baseValueType.IsLikelyOptimizedVirtualTypedArray();
17321740
Assert(!(isLikelyJsArray && isLikelyVirtualTypedArray));
17331741

0 commit comments

Comments
 (0)