Skip to content

Commit

Permalink
Merge pull request #10119 from Leonardo2718/fixacmp
Browse files Browse the repository at this point in the history
Duplicate PassThrough nodes when creating acmp fastpaths
  • Loading branch information
andrewcraik committed Jul 13, 2020
2 parents a475ea5 + ad1604a commit 497e3cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions runtime/compiler/codegen/J9CodeGenerator.cpp
Expand Up @@ -291,6 +291,15 @@ J9::CodeGenerator::fastpathAcmpHelper(TR::Node *node, TR::TreeTop *tt, const boo
TR::Node* temp = expectedDeps->getChild(i);
if (temp->getGlobalRegisterNumber() == depNode->getGlobalRegisterNumber())
continue;
else if (temp->getOpCodeValue() == TR::PassThrough)
{
// PassThrough nodes cannot be commoned because doing so does not
// actually anchor the child, causing it's lifetime to not be extended
TR::Node* original = temp;
temp = TR::Node::create(original, TR::PassThrough, 1, original->getFirstChild());
temp->setLowGlobalRegisterNumber(original->getLowGlobalRegisterNumber());
temp->setHighGlobalRegisterNumber(original->getHighGlobalRegisterNumber());
}
glRegDeps->addChildren(&temp, 1);
}
}
Expand Down

0 comments on commit 497e3cb

Please sign in to comment.