diff --git a/compiler/aarch64/codegen/OMRCodeGenerator.cpp b/compiler/aarch64/codegen/OMRCodeGenerator.cpp index c16ffdbf30..bb1ce52b66 100644 --- a/compiler/aarch64/codegen/OMRCodeGenerator.cpp +++ b/compiler/aarch64/codegen/OMRCodeGenerator.cpp @@ -179,12 +179,12 @@ OMR::ARM64::CodeGenerator::initialize() cg->setSupportsCompactedLocals(); if (!TR::Compiler->om.canGenerateArraylets()) { - static const bool disableArrayCmp = feGetEnv("TR_aarch64DisableArrayCmp") != NULL; + static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL; if (!disableArrayCmp) { cg->setSupportsArrayCmp(); } - static const bool disableArrayCmpLen = feGetEnv("TR_aarch64DisableArrayCmpLen") != NULL; + static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL; if (!disableArrayCmpLen) { cg->setSupportsArrayCmpLen(); diff --git a/compiler/p/codegen/OMRCodeGenerator.cpp b/compiler/p/codegen/OMRCodeGenerator.cpp index d110ca5464..25e01c8eed 100644 --- a/compiler/p/codegen/OMRCodeGenerator.cpp +++ b/compiler/p/codegen/OMRCodeGenerator.cpp @@ -225,8 +225,20 @@ OMR::Power::CodeGenerator::initialize() { cg->setSupportsArraySet(); } - cg->setSupportsArrayCmp(); - cg->setSupportsArrayCmpLen(); + + if (!TR::Compiler->om.canGenerateArraylets()) + { + static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL; + if (!disableArrayCmp) + { + cg->setSupportsArrayCmp(); + } + static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL; + if (!disableArrayCmpLen) + { + cg->setSupportsArrayCmpLen(); + } + } if (comp->target().cpu.supportsFeature(OMR_FEATURE_PPC_HAS_VSX)) { diff --git a/compiler/x/codegen/OMRCodeGenerator.cpp b/compiler/x/codegen/OMRCodeGenerator.cpp index 13cdc96c73..f786a5af47 100644 --- a/compiler/x/codegen/OMRCodeGenerator.cpp +++ b/compiler/x/codegen/OMRCodeGenerator.cpp @@ -379,8 +379,16 @@ OMR::X86::CodeGenerator::initializeX86(TR::Compilation *comp) if (!TR::Compiler->om.canGenerateArraylets()) { - self()->setSupportsArrayCmp(); - self()->setSupportsArrayCmpLen(); + static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL; + if (!disableArrayCmp) + { + self()->setSupportsArrayCmp(); + } + static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL; + if (!disableArrayCmpLen) + { + self()->setSupportsArrayCmpLen(); + } self()->setSupportsPrimitiveArrayCopy(); if (!comp->getOption(TR_DisableArraySetOpts)) { diff --git a/compiler/z/codegen/OMRCodeGenerator.cpp b/compiler/z/codegen/OMRCodeGenerator.cpp index 1b2c431736..c4dd01e88c 100644 --- a/compiler/z/codegen/OMRCodeGenerator.cpp +++ b/compiler/z/codegen/OMRCodeGenerator.cpp @@ -502,9 +502,20 @@ OMR::Z::CodeGenerator::initialize() { cg->setSupportsArraySet(); } - cg->setSupportsArrayCmp(); - cg->setSupportsArrayCmpLen(); - cg->setSupportsArrayCmpSign(); + if (!TR::Compiler->om.canGenerateArraylets()) + { + static const bool disableArrayCmp = feGetEnv("TR_DisableArrayCmp") != NULL; + if (!disableArrayCmp) + { + cg->setSupportsArrayCmp(); + cg->setSupportsArrayCmpSign(); + } + static const bool disableArrayCmpLen = feGetEnv("TR_DisableArrayCmpLen") != NULL; + if (!disableArrayCmpLen) + { + cg->setSupportsArrayCmpLen(); + } + } if (!comp->compileRelocatableCode()) { cg->setSupportsArrayTranslateTRxx();