Skip to content

Commit

Permalink
Merge pull request #15870 from hzongaro/idiom-rec-check-arr-index-is-…
Browse files Browse the repository at this point in the history
…induction-var

Check whether array index variable is an induction variable
  • Loading branch information
jdmpapin committed Sep 15, 2022
2 parents e3cd092 + cac78f8 commit e2890e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/compiler/optimizer/IdiomRecognition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7162,7 +7162,15 @@ TR_CISCTransformer::analyzeOneArrayIndex(TR_CISCNode *arrayindex, TR::SymbolRefe
}
if (!ret) return false;
}
else if (t->getOpcode() != TR_variable)
else if (t->getOpcode() == TR_variable)
{
TR::SymbolReference *symref = t->getHeadOfTrNodeInfo()->_node->getSymbolReference();
if (symref != inductionVariableSymRef)
{
return false;
}
}
else
{
return false;
}
Expand Down

0 comments on commit e2890e9

Please sign in to comment.