Skip to content

Commit

Permalink
Merge pull request #15754 from jdmpapin/method-test-in-bounds
Browse files Browse the repository at this point in the history
Skip method test bound check when guard node is flagged in-bounds
  • Loading branch information
hzongaro authored Sep 2, 2022
2 parents 22b3d87 + b7708bc commit fad2763
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/compiler/codegen/J9CodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4061,7 +4061,10 @@ J9::CodeGenerator::fixUpProfiledInterfaceGuardTest()
{
TR_VirtualGuard *vg = comp->findVirtualGuardInfo(node);
// Mainly we need to make sure that virtual guard which performs the TR_MethodTest and can be NOP'd are needed the range check.
if (vg && vg->getTestType() == TR_MethodTest && !(self()->willGenerateNOPForVirtualGuard(node)))
if (vg != NULL
&& vg->getTestType() == TR_MethodTest
&& !self()->willGenerateNOPForVirtualGuard(node)
&& !node->vftEntryIsInBounds())
{
TR::SymbolReference *callSymRef = vg->getSymbolReference();
TR_ASSERT_FATAL(callSymRef != NULL, "Guard n%dn for the inlined call should have stored symbol reference for the call", node->getGlobalIndex());
Expand Down

0 comments on commit fad2763

Please sign in to comment.