Skip to content

Commit

Permalink
Merge pull request #20841 from rmnattas/seqStore-fix
Browse files Browse the repository at this point in the history
Compare nodes in addition to symRef in SequentialStoreSimplification
  • Loading branch information
hzongaro authored Dec 19, 2024
2 parents add28b0 + 2b85c07 commit 54af310
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions runtime/compiler/optimizer/SequentialStoreSimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1655,8 +1655,9 @@ bool TR_arraycopySequentialStores::insertConsistentTree()
dumpOptDetails(comp(), " insertTree: multiplier must be 1 in aiadd tree\n");
return false;
}
TR::SymbolReference* activeBaseRef = _activeAddrTree->getBaseVarNode()->isNull() ? NULL : _activeAddrTree->getBaseVarNode()->getChild()->skipConversions()->getSymbolReference();
if (activeBaseRef == NULL)

TR::Node* activeBaseNode = _activeAddrTree->getBaseVarNode()->isNull() ? NULL : _activeAddrTree->getBaseVarNode()->getChild()->skipConversions();
if (activeBaseNode == NULL)
{
dumpOptDetails(comp(), " insertTree: no base variable in aiadd tree\n");
return false;
Expand All @@ -1670,8 +1671,9 @@ bool TR_arraycopySequentialStores::insertConsistentTree()
}

// make sure the index variable and base variable is consistent with the first tree
TR::Node* baseNode = _addrTree[0]->getBaseVarNode()->isNull() ? NULL : _addrTree[0]->getBaseVarNode()->getChild()->skipConversions();
TR::SymbolReference* baseRef = _addrTree[0]->getBaseVarNode()->isNull() ? NULL : _addrTree[0]->getBaseVarNode()->getChild()->skipConversions()->getSymbolReference();
if (baseRef != activeBaseRef)
if (baseNode != activeBaseNode)
{
dumpOptDetails(comp(), " insertTree: base variable is different than previous tree\n");
return false;
Expand Down

0 comments on commit 54af310

Please sign in to comment.