Skip to content

Commit

Permalink
Merge pull request #19513 from IBMJimmyk/indexOfP10-v0.44.0
Browse files Browse the repository at this point in the history
(0.44.0) Removes incorrect check in fast path indexOf code
  • Loading branch information
pshipton authored May 17, 2024
2 parents 5208e3b + 796d633 commit b069931
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions runtime/compiler/p/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10862,12 +10862,13 @@ static TR::Register *inlineIntrinsicIndexOf_P10(TR::Node *node, TR::CodeGenerato
generateTrg1Src1Instruction(cg, TR::InstOpCode::extsw, node, position, offset);
generateTrg1Src1Instruction(cg, TR::InstOpCode::extsw, node, endPos, length);

// sanity check : if str isLatin1, then ch should be isLatin1 too.
/*
* Zero out upper bits. ch is later compared against values loaded by lbzx.
* Comparison expect bits other than the lowest 8 bits are zero.
*/
if (isLatin1)
{
generateTrg1Src1Imm2Instruction(cg, TR::InstOpCode::rlwinm, node, temp, ch, 24, 0xFF);
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::cmpi4, node, cr6, temp, 0);
generateConditionalBranchInstruction(cg, TR::InstOpCode::bne, node, endLabel, cr6);
generateTrg1Src1Imm2Instruction(cg, TR::InstOpCode::rlwinm, node, ch, ch, 0, 0xFF);
}


Expand Down

0 comments on commit b069931

Please sign in to comment.