Skip to content

Commit

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

(0.35) Check whether array index variable is an induction variable
  • Loading branch information
pshipton committed Sep 15, 2022
2 parents 0539d1c + 66c2976 commit 6d7886c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion runtime/compiler/optimizer/IdiomRecognition.cpp
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 6d7886c

Please sign in to comment.