Skip to content

Commit

Permalink
Merge pull request #7137 from dchopra001/VectorCZ
Browse files Browse the repository at this point in the history
Add TR::vnolz and TR::vnotz evaluators in z/codegen
  • Loading branch information
hzongaro authored Oct 17, 2023
2 parents 16c71a7 + 1470d96 commit 906da98
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 2 additions & 0 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4782,6 +4782,8 @@ bool OMR::Z::CodeGenerator::getSupportsOpCodeForAutoSIMD(TR::CPU *cpu, TR::ILOpC
case TR::vxor:
case TR::vor:
case TR::vand:
case TR::vnotz:
case TR::vnolz:
if (et == TR::Int8 || et == TR::Int16 || et == TR::Int32 || et == TR::Int64)
return true;
else
Expand Down
26 changes: 14 additions & 12 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,24 +1659,12 @@ OMR::Z::TreeEvaluator::mcompressEvaluator(TR::Node *node, TR::CodeGenerator *cg)
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

TR::Register*
OMR::Z::TreeEvaluator::vnotzEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

TR::Register*
OMR::Z::TreeEvaluator::vmnotzEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

TR::Register*
OMR::Z::TreeEvaluator::vnolzEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

TR::Register*
OMR::Z::TreeEvaluator::vmnolzEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
Expand Down Expand Up @@ -2337,6 +2325,18 @@ OMR::Z::TreeEvaluator::lbitpermuteEvaluator(TR::Node *node, TR::CodeGenerator *c
return TR::TreeEvaluator::bitpermuteEvaluator(node, cg);
}

TR::Register*
OMR::Z::TreeEvaluator::vnotzEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return inlineVectorUnaryOp(node, cg, TR::InstOpCode::VCTZ);
}

TR::Register*
OMR::Z::TreeEvaluator::vnolzEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return inlineVectorUnaryOp(node, cg, TR::InstOpCode::VCLZ);
}

static TR_ExternalRelocationTargetKind
getRelocationTargetKindFromSymbol(TR::CodeGenerator* cg, TR::Symbol *sym)
{
Expand Down Expand Up @@ -14911,6 +14911,8 @@ OMR::Z::TreeEvaluator::inlineVectorUnaryOp(TR::Node * node,
break;
case TR::InstOpCode::VLC:
case TR::InstOpCode::VLP:
case TR::InstOpCode::VCTZ:
case TR::InstOpCode::VCLZ:
generateVRRaInstruction(cg, op, node, returnReg, sourceReg1, 0, 0, getVectorElementSizeMask(node));
break;
case TR::InstOpCode::VFPSO:
Expand Down

0 comments on commit 906da98

Please sign in to comment.