Skip to content

Commit

Permalink
Merge pull request eclipse-omr#6983 from Spencer-Comin/split-arraycmp
Browse files Browse the repository at this point in the history
Create arraycmplen opcode to replace arraycmp + arrayCmpLen flag
  • Loading branch information
jdmpapin authored Sep 7, 2023
2 parents 612cde0 + 848971a commit f8fecbe
Show file tree
Hide file tree
Showing 35 changed files with 537 additions and 303 deletions.
5 changes: 5 additions & 0 deletions compiler/aarch64/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ OMR::ARM64::CodeGenerator::initialize()
{
cg->setSupportsArrayCmp();
}
static const bool disableArrayCmpLen = feGetEnv("TR_aarch64DisableArrayCmpLen") != NULL;
if (!disableArrayCmpLen)
{
cg->setSupportsArrayCmpLen();
}
}
if (!comp->getOption(TR_DisableArraySetOpts))
{
Expand Down
48 changes: 36 additions & 12 deletions compiler/aarch64/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6796,8 +6796,8 @@ OMR::ARM64::TreeEvaluator::arraysetEvaluator(TR::Node *node, TR::CodeGenerator *
return NULL;
}

TR::Register *
OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *cg)
static TR::Register *
arraycmpEvaluatorHelper(TR::Node *node, TR::CodeGenerator *cg, bool isArrayCmpLen)
{
/*
* Generating following instruction sequence
Expand Down Expand Up @@ -6903,7 +6903,6 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
TR::Node *src2Node = node->getSecondChild();
TR::Node *lengthNode = node->getThirdChild();
bool isLengthGreaterThan15 = lengthNode->getOpCode().isLoadConst() && lengthNode->getConstValue() > 15;
const bool isArrayCmpLen = node->isArrayCmpLen();
TR_ARM64ScratchRegisterManager *srm = cg->generateScratchRegisterManager(12);

TR::Register *savedSrc1Reg = cg->evaluate(src1Node);
Expand All @@ -6930,7 +6929,7 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
generateLabelInstruction(cg, TR::InstOpCode::label, node, startLabel);
if (isArrayCmpLen)
{
generateMovInstruction(cg, node, resultReg, lengthReg, false);
generateMovInstruction(cg, node, resultReg, lengthReg, true);
}
else
{
Expand All @@ -6939,7 +6938,7 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
generateCompareInstruction(cg, node, src1Reg, src2Reg, true);
if (!isLengthGreaterThan15)
{
auto ccmpLengthInstr = generateConditionalCompareImmInstruction(cg, node, lengthReg, 0, 4, TR::CC_NE); /* 4 for Z flag */
auto ccmpLengthInstr = generateConditionalCompareImmInstruction(cg, node, lengthReg, 0, 4, TR::CC_NE, /* is64bit */ isArrayCmpLen); /* 4 for Z flag */
if (debugObj)
{
debugObj->addInstructionComment(ccmpLengthInstr, "Compares lengthReg with 0 if src1 and src2 are not the same array. Otherwise, sets EQ flag.");
Expand All @@ -6961,14 +6960,14 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
TR::Register *data4Reg = srm->findOrCreateScratchRegister();
if (!isLengthGreaterThan15)
{
generateCompareImmInstruction(cg, node, lengthReg, 16);
generateCompareImmInstruction(cg, node, lengthReg, 16, /* is64bit */ isArrayCmpLen);
auto branchToLessThan16LabelInstr = generateConditionalBranchInstruction(cg, TR::InstOpCode::b_cond, node, lessThan16Label, TR::CC_CC);
if (debugObj)
{
debugObj->addInstructionComment(branchToLessThan16LabelInstr, "Jumps to lessThan16Label if length < 16.");
}
}
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::subimmw, node, lengthReg, lengthReg, 16);
generateTrg1Src1ImmInstruction(cg, isArrayCmpLen ? TR::InstOpCode::subimmx : TR::InstOpCode::subimmw, node, lengthReg, lengthReg, 16);

TR::LabelSymbol *loop16Label = generateLabelSymbol(cg);
{
Expand All @@ -6985,7 +6984,7 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
}
generateConditionalCompareInstruction(cg, node, data3Reg, data4Reg, 0, TR::CC_EQ, true);
auto branchToNotEqual16LabelInstr2 = generateConditionalBranchInstruction(cg, TR::InstOpCode::b_cond, node, notEqual16Label, TR::CC_NE);
auto subtractLengthInstr = generateTrg1Src1ImmInstruction(cg, isLengthGreaterThan15 ? TR::InstOpCode::subsimmx : TR::InstOpCode::subsimmw, node, lengthReg, lengthReg, 16);
auto subtractLengthInstr = generateTrg1Src1ImmInstruction(cg, (isLengthGreaterThan15 || isArrayCmpLen) ? TR::InstOpCode::subsimmx : TR::InstOpCode::subsimmw, node, lengthReg, lengthReg, 16);
auto branchBacktoLoop16LabelInstr = generateConditionalBranchInstruction(cg, TR::InstOpCode::b_cond, node, loop16Label, TR::CC_CS);
if (debugObj)
{
Expand All @@ -7004,7 +7003,10 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
auto branchToDoneLabelInstr3 = generateConditionalBranchInstruction(cg, TR::InstOpCode::b_cond, node, isArrayCmpLen ? done0Label : doneLabel, TR::CC_EQ);
auto adjustSrc1RegInstr = generateTrg1Src2Instruction(cg, TR::InstOpCode::addx, node, src1Reg, src1Reg, lengthReg);
generateTrg1Src2Instruction(cg, TR::InstOpCode::addx, node, src2Reg, src2Reg, lengthReg);
loadConstant32(cg, node, 0, lengthReg);
if (isArrayCmpLen)
loadConstant64(cg, node, 0, lengthReg);
else
loadConstant32(cg, node, 0, lengthReg);
auto branchBacktoLoop16LabelInstr = generateLabelInstruction(cg, TR::InstOpCode::b, node, loop16Label);
if (debugObj)
{
Expand All @@ -7022,8 +7024,18 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
}
else
{
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::addimmw, node, lengthReg, lengthReg, 16);
auto branchToDoneLabelInstr3 = generateCompareBranchInstruction(cg, TR::InstOpCode::cbzw, node, lengthReg, isArrayCmpLen ? done0Label : doneLabel);
TR::Instruction *branchToDoneLabelInstr3;
if (isArrayCmpLen)
{
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::addimmx, node, lengthReg, lengthReg, 16);
branchToDoneLabelInstr3 = generateCompareBranchInstruction(cg, TR::InstOpCode::cbzx, node, lengthReg, done0Label);
}
else
{
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::addimmw, node, lengthReg, lengthReg, 16);
branchToDoneLabelInstr3 = generateCompareBranchInstruction(cg, TR::InstOpCode::cbzw, node, lengthReg, doneLabel);
}

auto branchToLessThan16Label2 = generateLabelInstruction(cg, TR::InstOpCode::b, node, lessThan16Label);

if (debugObj)
Expand Down Expand Up @@ -7080,7 +7092,7 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
auto branchToDone0LabelInstr = generateLabelInstruction(cg, TR::InstOpCode::b, node, done0Label);

auto lessThan16LabelInstr = generateLabelInstruction(cg, TR::InstOpCode::label, node, lessThan16Label);
generateTrg1Src1ImmInstruction(cg, TR::InstOpCode::subsimmw, node, lengthReg, lengthReg, 1);
generateTrg1Src1ImmInstruction(cg, isArrayCmpLen ? TR::InstOpCode::subsimmx : TR::InstOpCode::subsimmw, node, lengthReg, lengthReg, 1);
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrbpost, node, data1Reg, TR::MemoryReference::createWithDisplacement(cg, src1Reg, 1));
generateTrg1MemInstruction(cg, TR::InstOpCode::ldrbpost, node, data2Reg, TR::MemoryReference::createWithDisplacement(cg, src2Reg, 1));
generateConditionalCompareInstruction(cg, node, data1Reg, data2Reg, 0, TR::CC_HI);
Expand Down Expand Up @@ -7151,6 +7163,18 @@ OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *
return resultReg;
}

TR::Register *
OMR::ARM64::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return arraycmpEvaluatorHelper(node, cg, false);
}

TR::Register *
OMR::ARM64::TreeEvaluator::arraycmplenEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
return arraycmpEvaluatorHelper(node, cg, true);
}

static void
inlineConstantLengthForwardArrayCopy(TR::Node *node, int64_t byteLen, TR::Register *srcReg, TR::Register *dstReg, TR::CodeGenerator *cg)
{
Expand Down
1 change: 1 addition & 0 deletions compiler/aarch64/codegen/OMRTreeEvaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *arraytranslateEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *arraytranslateAndTestEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *arraycmplenEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *computeCCEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *butestEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *sutestEvaluator(TR::Node *node, TR::CodeGenerator *cg);
Expand Down
6 changes: 6 additions & 0 deletions compiler/arm/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3626,6 +3626,12 @@ TR::Register *OMR::ARM::TreeEvaluator::arraycmpEvaluator(TR::Node *node, TR::Cod
return NULL;
}

TR::Register *OMR::ARM::TreeEvaluator::arraycmplenEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR_UNIMPLEMENTED();
return NULL;
}

bool OMR::ARM::TreeEvaluator::stopUsingCopyReg(
TR::Node* node,
TR::Register*& reg,
Expand Down
1 change: 1 addition & 0 deletions compiler/arm/codegen/OMRTreeEvaluator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ class OMR_EXTENSIBLE TreeEvaluator: public OMR::TreeEvaluator
static TR::Register *arraytranslateAndTestEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *arraytranslateEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *arraycmpEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *arraycmplenEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *BBStartEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *BBEndEvaluator(TR::Node *node, TR::CodeGenerator *cg);
static TR::Register *commonLoadEvaluator(TR::Node *node, TR::InstOpCode::Mnemonic memoryToRegisterOp, int32_t memSize, TR::CodeGenerator *cg);
Expand Down
5 changes: 4 additions & 1 deletion compiler/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,9 @@ class OMR_EXTENSIBLE CodeGenerator
bool getSupportsArrayCmp() {return _flags1.testAny(SupportsArrayCmp);}
void setSupportsArrayCmp() {_flags1.set(SupportsArrayCmp);}

bool getSupportsArrayCmpLen() {return _flags1.testAny(SupportsArrayCmpLen);}
void setSupportsArrayCmpLen() {_flags1.set(SupportsArrayCmpLen);}

bool getSupportsArrayCmpSign() {return _flags3.testAny(SupportsArrayCmpSign);}
void setSupportsArrayCmpSign() {_flags3.set(SupportsArrayCmpSign);}

Expand Down Expand Up @@ -1832,7 +1835,7 @@ class OMR_EXTENSIBLE CodeGenerator
// AVAILABLE = 0x02000000,
UsesRegisterPairsForLongs = 0x04000000,
SupportsArraySet = 0x08000000,
// AVAILABLE = 0x10000000,
SupportsArrayCmpLen = 0x10000000,
SupportsArrayCmp = 0x20000000,
DisableLongGRA = 0x40000000,
DummyLastEnum1
Expand Down
1 change: 1 addition & 0 deletions compiler/compile/OMRNonHelperSymbols.enum
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
arraySetSymbol,
arrayCopySymbol,
arrayCmpSymbol,
arrayCmpLenSymbol,
prefetchSymbol,

killsAllMethodSymbol, // A dummy method whose alias set includes all
Expand Down
13 changes: 13 additions & 0 deletions compiler/compile/OMRSymbolReferenceTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,19 @@ OMR::SymbolReferenceTable::findOrCreateArrayCmpSymbol()
return element(arrayCmpSymbol);
}

TR::SymbolReference *
OMR::SymbolReferenceTable::findOrCreateArrayCmpLenSymbol()
{
if (!element(arrayCmpLenSymbol))
{
TR::MethodSymbol * sym = TR::MethodSymbol::create(trHeapMemory(),TR_Helper);
sym->setHelper();

element(arrayCmpLenSymbol) = new (trHeapMemory()) TR::SymbolReference(self(), arrayCmpLenSymbol, sym);
}
return element(arrayCmpLenSymbol);
}

TR::SymbolReference *
OMR::SymbolReferenceTable::findOrCreateCurrentTimeMaxPrecisionSymbol()
{
Expand Down
2 changes: 2 additions & 0 deletions compiler/compile/OMRSymbolReferenceTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class SymbolReferenceTable
arraySetSymbol,
arrayCopySymbol,
arrayCmpSymbol,
arrayCmpLenSymbol,
prefetchSymbol,

killsAllMethodSymbol, // A dummy method whose alias set includes all
Expand Down Expand Up @@ -844,6 +845,7 @@ class SymbolReferenceTable
TR::SymbolReference * findOrCreateArrayCopySymbol();
TR::SymbolReference * findOrCreateArraySetSymbol();
TR::SymbolReference * findOrCreateArrayCmpSymbol();
TR::SymbolReference * findOrCreateArrayCmpLenSymbol();

TR::SymbolReference * findOrCreateClassSymbol(TR::ResolvedMethodSymbol * owningMethodSymbol, int32_t cpIndex, void * classObject, bool cpIndexOfStatic = false);
TR::SymbolReference * findOrCreateArrayShadowSymbolRef(TR::DataType type, TR::Node * baseArrayAddress, int32_t size, TR_FrontEnd * fe);
Expand Down
3 changes: 2 additions & 1 deletion compiler/il/Aliases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ OMR::SymbolReference::getUseDefAliasesBV(bool isDirectCall, bool includeGCSafePo
return &symRefTab->aliasBuilder.defaultMethodDefAliases();
}

if (symRefTab->isNonHelper(self(), TR::SymbolReferenceTable::arrayCmpSymbol))
if (symRefTab->isNonHelper(self(), TR::SymbolReferenceTable::arrayCmpSymbol) ||
symRefTab->isNonHelper(self(), TR::SymbolReferenceTable::arrayCmpLenSymbol))
return 0;

switch (self()->getReferenceNumber())
Expand Down
20 changes: 11 additions & 9 deletions compiler/il/OMRILOps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,12 @@ class ILOpCode

bool isFunctionCall() const
{
return isCall() &&
getOpCodeValue() != TR::arraycopy &&
getOpCodeValue() != TR::arrayset &&
getOpCodeValue() != TR::bitOpMem &&
getOpCodeValue() != TR::arraycmp;
return isCall() &&
getOpCodeValue() != TR::arraycopy &&
getOpCodeValue() != TR::arrayset &&
getOpCodeValue() != TR::bitOpMem &&
getOpCodeValue() != TR::arraycmp &&
getOpCodeValue() != TR::arraycmplen;
}

bool isCompareDouble()
Expand Down Expand Up @@ -662,10 +663,11 @@ class ILOpCode

bool isMemToMemOp()
{
return getOpCodeValue() == TR::bitOpMem ||
getOpCodeValue() == TR::arrayset ||
getOpCodeValue() == TR::arraycmp ||
getOpCodeValue() == TR::arraycopy;
return getOpCodeValue() == TR::bitOpMem ||
getOpCodeValue() == TR::arrayset ||
getOpCodeValue() == TR::arraycmp ||
getOpCodeValue() == TR::arraycopy ||
getOpCodeValue() == TR::arraycmplen;
}

static TR::ILOpCodes getDataTypeConversion(TR::DataType t1, TR::DataType t2);
Expand Down
23 changes: 1 addition & 22 deletions compiler/il/OMRNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3649,6 +3649,7 @@ OMR::Node::exceptionsRaised()
possibleExceptions |= TR::Block:: CanCatchBoundCheck;
break;
case TR::arraycmp: // does not throw any exceptions
case TR::arraycmplen:
break;
case TR::checkcast:
possibleExceptions |= TR::Block:: CanCatchCheckCast;
Expand Down Expand Up @@ -6111,28 +6112,6 @@ OMR::Node::chkTableBackedByRawStorage()
return self()->getOpCodeValue() == TR::arraytranslate && _flags.testAny(tableBackedByRawStorage);
}

bool
OMR::Node::isArrayCmpLen()
{
TR_ASSERT(self()->getOpCodeValue() == TR::arraycmp, "Opcode must be arraycmp");
return _flags.testAny(arrayCmpLen);
}

void
OMR::Node::setArrayCmpLen(bool v)
{
TR::Compilation *c = TR::comp();
TR_ASSERT(self()->getOpCodeValue() == TR::arraycmp, "Opcode must be arraycmp");
if (performNodeTransformation2(c, "O^O NODE FLAGS: Setting arrayCmpLen flag on node %p to %d\n", self(), v))
_flags.set(arrayCmpLen, v);
}

bool
OMR::Node::chkArrayCmpLen()
{
return self()->getOpCodeValue() == TR::arraycmp && _flags.testAny(arrayCmpLen);
}

bool
OMR::Node::isArrayCmpSign()
{
Expand Down
5 changes: 0 additions & 5 deletions compiler/il/OMRNode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,6 @@ class OMR_EXTENSIBLE Node
bool chkTableBackedByRawStorage();

// Flags used by TR::arraycmp
bool isArrayCmpLen();
void setArrayCmpLen(bool v);
bool chkArrayCmpLen();

bool isArrayCmpSign();
void setArrayCmpSign(bool v);
bool chkArrayCmpSign();
Expand Down Expand Up @@ -1851,7 +1847,6 @@ class OMR_EXTENSIBLE Node
tableBackedByRawStorage = 0x00008000,

// Flags used by TR::arraycmp
arrayCmpLen = 0x00008000,
arrayCmpSign = 0x00004000,

// Flags used by TR::arraycopy
Expand Down
20 changes: 19 additions & 1 deletion compiler/il/OMROpcodes.enum
Original file line number Diff line number Diff line change
Expand Up @@ -7201,7 +7201,25 @@ OPCODE_MACRO(\
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = Inline code for memory comparison of part of an array */ \
/* .description = Compare two blocks of memory and returning a lexical ordering constant. */ \
/* The constant indicates whether the first child is lesser, equal, or greater than the second child. */ \
/* When the arrayCmpSign flag is set, the lesser/equal/greater constants are -1/0/1, otherwise the constants are 1/0/2 */ \
)
OPCODE_MACRO(\
/* .opcode = */ arraycmplen, \
/* .name = */ "arraycmplen", \
/* .properties1 = */ ILProp1::Call | ILProp1::HasSymbolRef, \
/* .properties2 = */ 0, \
/* .properties3 = */ ILProp3::LikeUse | ILProp3::LikeDef | ILProp3::SkipDynamicLitPoolOnInts, \
/* .properties4 = */ 0, \
/* .dataType = */ TR::Int64, \
/* .typeProperties = */ ILTypeProp::Size_8 | ILTypeProp::Integer | ILTypeProp::Unsigned, \
/* .childProperties = */ THREE_CHILD(TR::Address, TR::Address, TR::Int64), \
/* .swapChildrenOpCode = */ TR::BadILOp, \
/* .reverseBranchOpCode = */ TR::BadILOp, \
/* .booleanCompareOpCode = */ TR::BadILOp, \
/* .ifCompareOpCode = */ TR::BadILOp, \
/* .description = Compare two blocks of memory and returning the index of the first mismatched byte */ \
)
OPCODE_MACRO(\
/* .opcode = */ allocationFence, \
Expand Down
1 change: 0 additions & 1 deletion compiler/optimizer/DeadTreesElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ bool TR::DeadTreesElimination::fixUpTree(TR::Node *node, TR::TreeTop *treeTop, T
// for arraycmp node, don't create its tree top anchor
// fold it into if statment and save jump instruction
if (node->getOpCodeValue() == TR::arraycmp &&
!node->isArrayCmpLen() &&
comp()->target().cpu.isX86())
{
anchorArrayCmp = false;
Expand Down
1 change: 1 addition & 0 deletions compiler/optimizer/IsolatedStoreElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,7 @@ nodeHasSideEffect(TR::Node *node)
{
case TR::arrayset:
case TR::arraycmp:
case TR::arraycmplen:
case TR::arraytranslate:
case TR::arraytranslateAndTest:
case TR::long2String:
Expand Down
1 change: 1 addition & 0 deletions compiler/optimizer/LoopReducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4429,6 +4429,7 @@ TR_LoopReducer::perform()
!comp()->cg()->getSupportsReferenceArrayCopy() &&
!comp()->cg()->getSupportsPrimitiveArrayCopy() &&
!comp()->cg()->getSupportsArrayCmp() &&
!comp()->cg()->getSupportsArrayCmpLen() &&
!comp()->cg()->getSupportsArrayTranslateTRxx() &&
!comp()->cg()->getSupportsArrayTranslateAndTest())
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/optimizer/OMRSimplifierHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12464,7 +12464,7 @@ TR::Node *bu2iSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s)
}
else if (firstChild->getOpCodeValue() == TR::i2b &&
(firstChild->getFirstChild()->getOpCodeValue() == TR::butest ||
firstChild->getFirstChild()->getOpCodeValue() == TR::arraycmp ||
(firstChild->getFirstChild()->getOpCodeValue() == TR::arraycmp && !firstChild->getFirstChild()->isArrayCmpSign()) ||
firstChild->getFirstChild()->getOpCodeValue() == TR::icmpeq ||
firstChild->getFirstChild()->getOpCodeValue() == TR::lcmpeq ||
firstChild->getFirstChild()->getOpCodeValue() == TR::icmpne ||
Expand Down
1 change: 1 addition & 0 deletions compiler/optimizer/OMRSimplifierTable.enum
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@
#define long2StringSimplifierHandler dftSimplifier
#define bitOpMemSimplifierHandler bitOpMemSimplifier
#define arraycmpSimplifierHandler dftSimplifier
#define arraycmplenSimplifierHandler dftSimplifier
#define allocationFenceSimplifierHandler dftSimplifier
#define loadFenceSimplifierHandler dftSimplifier
#define storeFenceSimplifierHandler dftSimplifier
Expand Down
Loading

0 comments on commit f8fecbe

Please sign in to comment.