Skip to content

Commit fd5d5cf

Browse files
pleathboingoing
authored andcommitted
1 parent d2de5fe commit fd5d5cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Backend/GlobOptFields.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ GlobOpt::KillLiveElems(IR::IndirOpnd * indirOpnd, IR::Opnd * valueOpnd, BVSparse
250250
IR::RegOpnd *baseOpnd = indirOpnd->GetBaseOpnd();
251251
Value * baseValue = baseOpnd ? this->currentBlock->globOptData.FindValue(baseOpnd->m_sym) : nullptr;
252252
ValueInfo * baseValueInfo = baseValue ? baseValue->GetValueInfo() : nullptr;
253-
if (!baseValueInfo || !baseValueInfo->IsNotNativeArray())
253+
if (!baseValueInfo || !baseValueInfo->IsNotNativeArray() ||
254+
(this->IsLoopPrePass() && !this->IsSafeToTransferInPrepass(baseOpnd->m_sym, baseValueInfo)))
254255
{
255256
if (this->currentBlock->globOptData.maybeWrittenTypeSyms == nullptr)
256257
{

0 commit comments

Comments
 (0)