Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vector mask testAny, testAll and conversion opcodes #6690

Merged
merged 2 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions compiler/aarch64/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,30 @@ TR::Instruction *tryToGenerateMovImm32ShiftedInstruction(TR::Node *node, TR::Cod
}

// mask evaluators
TR::Register*
OMR::ARM64::TreeEvaluator::mAnyTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

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

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

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

TR::Register*
OMR::ARM64::TreeEvaluator::mloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
Expand Down Expand Up @@ -1325,6 +1349,66 @@ OMR::ARM64::TreeEvaluator::mRegStoreEvaluator(TR::Node *node, TR::CodeGenerator
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

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

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

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

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

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

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

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

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

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

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

// vector evaluators
TR::Instruction *
OMR::ARM64::TreeEvaluator::vsplatsImmediateHelper(TR::Node *node, TR::CodeGenerator *cg, TR::Node *firstChild, TR::DataType elementType, TR::Register *treg)
Expand Down
15 changes: 15 additions & 0 deletions compiler/aarch64/codegen/OMRTreeEvaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,28 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *PassThroughEvaluator(TR::Node *node, TR::CodeGenerator *cg);

// mask evaluators
static TR::Register *mAnyTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mAllTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mmAnyTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mmAllTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mloadiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mRegLoadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mRegStoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);

static TR::Register *b2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *s2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *i2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *l2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *v2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2bEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2sEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2iEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2lEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2vEvaluator(TR::Node *node, TR::CodeGenerator *cg);

// vector evaluators
static TR::Register *vabsEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *vaddEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand Down
84 changes: 84 additions & 0 deletions compiler/arm/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,30 @@ OMR::ARM::TreeEvaluator::compressedRefsEvaluator(TR::Node *node, TR::CodeGenerat
}

// mask evaluators
TR::Register*
OMR::ARM::TreeEvaluator::mAnyTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

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

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

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

TR::Register*
OMR::ARM::TreeEvaluator::mloadEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
Expand Down Expand Up @@ -1436,6 +1460,66 @@ OMR::ARM::TreeEvaluator::mRegStoreEvaluator(TR::Node *node, TR::CodeGenerator *c
return TR::TreeEvaluator::unImpOpEvaluator(node, cg);
}

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

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

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

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

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

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

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

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

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

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

// vector evaluators
TR::Register*
OMR::ARM::TreeEvaluator::vnotEvaluator(TR::Node *node, TR::CodeGenerator *cg)
Expand Down
15 changes: 15 additions & 0 deletions compiler/arm/codegen/OMRTreeEvaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,28 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *compressedRefsEvaluator(TR::Node *node, TR::CodeGenerator *cg);

// mask evaluators
static TR::Register *mAnyTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mAllTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mmAnyTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mmAllTrueEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mloadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mloadiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mstoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mstoreiEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mRegLoadEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *mRegStoreEvaluator(TR::Node *node, TR::CodeGenerator *cg);

static TR::Register *b2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *s2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *i2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *l2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *v2mEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2bEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2sEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2iEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2lEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *m2vEvaluator(TR::Node *node, TR::CodeGenerator *cg);

static TR::Register *vabsEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *vaddEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *vandEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand Down
2 changes: 1 addition & 1 deletion compiler/il/OMRILOps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class ILOpCode

return (TR::VectorOperation) ((opcode < (TR::NumScalarIlOps + TR::NumOneVectorTypeOps)) ?
(opcode - TR::NumScalarIlOps) / TR::NumVectorTypes :
(opcode - TR::NumScalarIlOps - TR::NumOneVectorTypeOps) / (TR::NumVectorTypes * TR::NumVectorTypes) + TR::firstTwoTypeVectorOperation - 1);
(opcode - TR::NumScalarIlOps - TR::NumOneVectorTypeOps) / (TR::NumVectorTypes * TR::NumVectorTypes) + TR::firstTwoTypeVectorOperation);
}

/** \brief
Expand Down
Loading