Skip to content

Commit

Permalink
Merge pull request #6615 from r30shah/fixZVectorCheckPR
Browse files Browse the repository at this point in the history
Check feature instead of Flag for VFE1 facility
  • Loading branch information
0xdaryl committed Jul 21, 2022
2 parents 8a23471 + 8bdfe1c commit c9e61d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/z/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4736,7 +4736,7 @@ bool OMR::Z::CodeGenerator::getSupportsOpCodeForAutoSIMD(TR::CPU *cpu, TR::ILOpC
* Prior to z14, vector operations that operated on floating point numbers only supported
* Doubles. On z14 and onward, Float type floating point numbers are supported as well.
*/
if (!supportsVectorRegisters || (et == TR::Float && !cpu->getSupportsVectorFacilityEnhancement1()))
if (!supportsVectorRegisters || (et == TR::Float && !cpu->supportsFeature(OMR_FEATURE_S390_VECTOR_FACILITY_ENHANCEMENT_1)))
{
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ OMR::Z::TreeEvaluator::vfmaEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR_ASSERT_FATAL_WITH_NODE(node, node->getDataType().getVectorLength() == TR::VectorLength128,
"Only 128-bit vectors are supported %s", node->getDataType().toString());
TR_ASSERT_FATAL_WITH_NODE(node, node->getDataType().getVectorElementType() == TR::Double ||
(node->getDataType().getVectorElementType() == TR::Float && cg->comp()->target().cpu.getSupportsVectorFacilityEnhancement1()),
(node->getDataType().getVectorElementType() == TR::Float && cg->comp()->target().cpu.supportsFeature(OMR_FEATURE_S390_VECTOR_FACILITY_ENHANCEMENT_1)),
"VFMA is only supported for VectorElementDataType TR::Double on z13 and onwards and TR::Float on z14 onwards");
TR::Register *resultReg = TR::TreeEvaluator::tryToReuseInputVectorRegs(node, cg);
TR::Register *va = cg->evaluate(node->getFirstChild());
Expand All @@ -1155,7 +1155,7 @@ OMR::Z::TreeEvaluator::vabsEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR_ASSERT_FATAL_WITH_NODE(node, node->getDataType().getVectorLength() == TR::VectorLength128,
"Only 128-bit vectors are supported %s", node->getDataType().toString());
TR::DataType dt = node->getDataType().getVectorElementType();
TR_ASSERT_FATAL(dt != TR::Float || cg->comp()->target().cpu.getSupportsVectorFacilityEnhancement1(),
TR_ASSERT_FATAL(dt != TR::Float || cg->comp()->target().cpu.supportsFeature(OMR_FEATURE_S390_VECTOR_FACILITY_ENHANCEMENT_1),
"VFPSO is only supported for VectorElementDataType TR::Double on z13 and onwards and TR::Float on z14 onwards");
return inlineVectorUnaryOp(node, cg, (dt == TR::Double || dt == TR::Float) ? TR::InstOpCode::VFPSO : TR::InstOpCode::VLP);
}
Expand All @@ -1166,7 +1166,7 @@ OMR::Z::TreeEvaluator::vsqrtEvaluator(TR::Node *node, TR::CodeGenerator *cg)
TR_ASSERT_FATAL_WITH_NODE(node, node->getDataType().getVectorLength() == TR::VectorLength128,
"Only 128-bit vectors are supported %s", node->getDataType().toString());
TR_ASSERT_FATAL_WITH_NODE(node, node->getDataType().getVectorElementType() == TR::Double ||
(node->getDataType().getVectorElementType() == TR::Float && cg->comp()->target().cpu.getSupportsVectorFacilityEnhancement1()),
(node->getDataType().getVectorElementType() == TR::Float && cg->comp()->target().cpu.supportsFeature(OMR_FEATURE_S390_VECTOR_FACILITY_ENHANCEMENT_1)),
"VFSQ is only supported for VectorElementDataType TR::Double on z13 and onwards and TR::Float on z14 onwards");
return inlineVectorUnaryOp(node, cg, TR::InstOpCode::VFSQ);
}
Expand Down

0 comments on commit c9e61d4

Please sign in to comment.