Skip to content

Commit

Permalink
Merge pull request #15711 from r30shah/vectorCheck
Browse files Browse the repository at this point in the history
Check for vector support on Z in supportedForPlatform
  • Loading branch information
gita-omr committed Aug 19, 2022
2 parents 984612f + 7ea3491 commit ae6f910
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion runtime/compiler/optimizer/VectorAPIExpansion.cpp
Expand Up @@ -19,7 +19,6 @@
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
*******************************************************************************/
#include "codegen/CodeGenerator.hpp"
#include "compile/ResolvedMethod.hpp"
#include "env/VerboseLog.hpp"
#include "env/VMAccessCriticalSection.hpp"
Expand Down
5 changes: 4 additions & 1 deletion runtime/compiler/optimizer/VectorAPIExpansion.hpp
Expand Up @@ -25,6 +25,7 @@
#include <stdint.h>
#include "optimizer/Optimization.hpp"
#include "optimizer/OptimizationManager.hpp"
#include "codegen/CodeGenerator.hpp"
#include "codegen/RecognizedMethods.hpp"
#include "il/SymbolReference.hpp"
#include "infra/Assert.hpp"
Expand Down Expand Up @@ -264,7 +265,9 @@ class TR_VectorAPIExpansion : public TR::Optimization
static TR::VectorLength supportedOnPlatform(TR::Compilation *comp, vec_sz_t vectorLength)
{
// General check for supported infrastructure
if (!comp->target().cpu.isPower() && !comp->target().cpu.isZ() && !comp->target().cpu.isARM64())
if (!comp->target().cpu.isPower() &&
!(comp->target().cpu.isZ() && comp->cg()->getSupportsVectorRegisters()) &&
!comp->target().cpu.isARM64())
return TR::NoVectorLength;

if (vectorLength != 128)
Expand Down

0 comments on commit ae6f910

Please sign in to comment.