Skip to content

Commit

Permalink
Set Vector Support in OMR
Browse files Browse the repository at this point in the history
While constructing a code generator object, check for vector facility
and set appropriate options. This check was done previously in
S390PrivateLinkage in OpenJ9, which would be incorrect place to do so.

Fixes: #6572

Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
  • Loading branch information
r30shah committed Jul 18, 2022
1 parent edf2ae5 commit c262e37
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,18 @@ OMR::Z::CodeGenerator::initialize()

_cgFlags = 0;

bool supportsAutoSIMD = !comp->getOption(TR_DisableSIMD) && comp->target().cpu.supportsFeature(OMR_FEATURE_S390_VECTOR_FACILITY);

if(supportsAutoSIMD)
{
cg->setSupportsVectorRegisters();
cg->setSupportsAutoSIMD();
}
else
{
comp->setOption(TR_DisableSIMD);
}

// Initialize Linkage for Code Generator
cg->initializeLinkage();

Expand Down

0 comments on commit c262e37

Please sign in to comment.