Skip to content

Commit

Permalink
Merge pull request #7341 from a7ehuo/fix-local-transparency-volatile-…
Browse files Browse the repository at this point in the history
…store

Kill prior store nodes in processing volatile store in local transparency
  • Loading branch information
vijaysun-omr committed May 29, 2024
2 parents 5c74758 + 2c586f6 commit 6463b76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions compiler/optimizer/LocalTransparency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,18 @@ void TR_LocalTransparency::updateUsesAndDefs(TR::Node *node, ContainerType *glob
*globallySeenDefinedSymbolReferences |= *tempContainer;
tempContainer->reset(symRefNum);
*seenDefinedSymbolReferences |= *tempContainer;

// If this is a volatile store, it should kill any store node that has appeared
// earlier in the block. Otherwise, the store node could survive the block
// in local transparency but will be killed in _downwardExposedAnalysisInfo
// when the volatile store is processed in local anticipatability, which causes
// inconsistency between local transparency and local anticipatability.
// This matches how a call node is processed earlier.
if (node->mightHaveVolatileSymbolReference())
{
*tempContainer &= *seenStoredSymRefs;
*symRefsDefinedAfterStored |= *tempContainer;
}
}

seenStoredSymRefs->set(symRefNum);
Expand Down

0 comments on commit 6463b76

Please sign in to comment.