Skip to content

Commit

Permalink
Prevent AutoSIMD seg-fault on defs from method entry
Browse files Browse the repository at this point in the history
Fixes eclipse-openj9#15335

Signed-off-by: BradleyWood <[email protected]>
  • Loading branch information
BradleyWood committed Jun 22, 2022
1 parent 3fd8969 commit 40bccd0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion runtime/compiler/optimizer/SPMDParallelizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4366,7 +4366,18 @@ bool TR_SPMDKernelParallelizer::checkIndependence(TR_RegionStructure *loop, TR_U
for (cursor.SetToFirstOne(); cursor.Valid(); cursor.SetToNextOne())
{
int32_t defIndex = (int32_t) cursor ;
defsOfDefsInLoop[useDefInfo->getNode(defIndex)->getGlobalIndex()]=true;
TR::Node *useDefNode = useDefInfo->getNode(defIndex);

if (!useDefNode)
{
if (trace())
{
traceMsg(comp, "Def #%d (from method entry) reaches a use inside loop %d\n", defIndex, loop->getNumber());
}
return false;
}

defsOfDefsInLoop[useDefNode->getGlobalIndex()]=true;
}

}
Expand Down

0 comments on commit 40bccd0

Please sign in to comment.