Skip to content

Commit

Permalink
Merge pull request #15145 from BradleyWood/spmd
Browse files Browse the repository at this point in the history
Prevent use of vsplats opcode for unsupported datatype
  • Loading branch information
gita-omr authored May 31, 2022
2 parents d55522d + ed3a903 commit 3a853c2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion runtime/compiler/optimizer/SPMDParallelizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,16 @@ bool TR_SPMDKernelParallelizer::visitNodeToSIMDize(TR::Node *parent, int32_t chi

if (loop->isExprInvariant(node))
{
TR::DataType vt = node->getDataType().scalarToVector(VECTOR_LENGTH);
if (isCheckMode && !comp->cg()->getSupportsOpCodeForAutoSIMD(TR::ILOpCode::createVectorOpCode(OMR::vsplats, vt), vt))
{
if (trace)
{
traceMsg(comp," [%p]: vsplats Opcode and data type are not supported by this platform\n", node);
}
return false;
}

if (!isCheckMode)
genVectorAccessForScalar(parent, childIndex, node);

Expand All @@ -700,7 +710,6 @@ bool TR_SPMDKernelParallelizer::visitNodeToSIMDize(TR::Node *parent, int32_t chi

TR_ASSERT(vectorOpCode != TR::BadILOp, "BAD IL Opcode to be assigned during transformation");


if (isCheckMode && !comp->cg()->getSupportsOpCodeForAutoSIMD(vectorOpCode, node->getDataType()))
{
if (trace)
Expand Down

0 comments on commit 3a853c2

Please sign in to comment.