Skip to content

Commit

Permalink
Z: Fix arraycmplen opcode error
Browse files Browse the repository at this point in the history
The isArrayCmpSign function accept only arraycmp opcode.
arraycmplen returns the index and return102 flag has no impact.

Fix: #7136
Signed-off-by: ehsan kiani far <ehsan.kianifar@gmail.com>
  • Loading branch information
ehsankianifar committed Feb 9, 2024
1 parent 2fb53dc commit 3171315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Expand Up @@ -11795,9 +11795,9 @@ OMR::Z::TreeEvaluator::arraycmplenEvaluator(TR::Node * node, TR::CodeGenerator *

if (TR::isJ9() && !comp->getOption(TR_DisableSIMDArrayCompare) && cg->getSupportsVectorRegisters())
{
// An empirical study has showed that CLC is faster for all array sizes if the number of bytes to copy is known to be constant
// An empirical study has showed that CLC is faster for all array sizes if the number of bytes to compare is known to be constant
if (!node->getChild(2)->getOpCode().isLoadConst())
return TR::TreeEvaluator::arraycmpSIMDHelper(node, cg, NULL, NULL, true, !node->isArrayCmpSign()/*return102*/, true);
return TR::TreeEvaluator::arraycmpSIMDHelper(node, cg, NULL, NULL, true, false/*return102*/, true);
}

TR::Node * firstBaseAddr = node->getFirstChild();
Expand Down

0 comments on commit 3171315

Please sign in to comment.