Skip to content

Commit

Permalink
Merge pull request #200 from r30shah/backportOMR7275
Browse files Browse the repository at this point in the history
(0.44) Evaluate constant byteLenNode of arrayCopyChild
  • Loading branch information
hzongaro committed Mar 4, 2024
2 parents 87019fe + a931688 commit 254af5a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13497,6 +13497,7 @@ OMR::Z::TreeEvaluator::primitiveArraycopyEvaluator(TR::Node* node, TR::CodeGener
// We need to decide direction of array copy at runtime.
if (isConstantByteLen)
{
byteLenReg = cg->gprClobberEvaluate(byteLenNode);
generateS390LabelInstruction(cg, TR::InstOpCode::label, node, cFlowRegionStart);
cFlowRegionStart->setStartInternalControlFlow();
}
Expand All @@ -13506,12 +13507,6 @@ OMR::Z::TreeEvaluator::primitiveArraycopyEvaluator(TR::Node* node, TR::CodeGener


TR::Register *checkBoundReg = srm->findOrCreateScratchRegister();
if (byteLenReg == NULL)
{
TR_ASSERT_FATAL(isConstantByteLen, "byteLenNode can be not evaluated only when we have constant length");
byteLenReg = cg->allocateRegister();
genLoadLongConstant(cg, node, byteLenNode->getConst<int64_t>(), byteLenReg);
}
cursor = generateRXInstruction(cg, TR::InstOpCode::LA, node, checkBoundReg, generateS390MemoryReference(byteSrcReg, byteLenReg, 0, cg));
iComment("nextPointerToLastElement=byteSrcPointer+lengthInBytes");

Expand Down

0 comments on commit 254af5a

Please sign in to comment.