Skip to content

Commit

Permalink
x86: Do not skip l2a if the memory reference has unresolved data snippet
Browse files Browse the repository at this point in the history
Fixes: eclipse-openj9/openj9#17240

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
  • Loading branch information
a7ehuo committed May 30, 2023
1 parent 154735c commit 640f5ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/x/codegen/OMRMemoryReference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,10 @@ OMR::X86::MemoryReference::populateMemoryReference(

if (comp->useCompressedPointers())
{
if ((subTree->getOpCodeValue() == TR::l2a) && (subTree->getReferenceCount() == 1) &&
(subTree->getRegister() == NULL))
if ((subTree->getOpCodeValue() == TR::l2a) &&
(subTree->getReferenceCount() == 1) &&
(subTree->getRegister() == NULL) &&
!self()->hasUnresolvedDataSnippet()) // If there is unresolved data snippet, l2a cannot be skipped
{
cg->decReferenceCount(subTree);
subTree = subTree->getFirstChild();
Expand Down

0 comments on commit 640f5ad

Please sign in to comment.