diff --git a/compiler/compile/OMRNonHelperSymbols.enum b/compiler/compile/OMRNonHelperSymbols.enum index 6a8160d7fc3..28895429b3f 100644 --- a/compiler/compile/OMRNonHelperSymbols.enum +++ b/compiler/compile/OMRNonHelperSymbols.enum @@ -49,8 +49,7 @@ addressOfClassOfMethodSymbol, componentClassSymbol, isArraySymbol, - isClassAndDepthFlagsSymbol, - isClassDepthAndFlagsSymbol = isClassAndDepthFlagsSymbol, + isClassDepthAndFlagsSymbol, isClassFlagsSymbol, vftSymbol, currentThreadSymbol, diff --git a/compiler/compile/OMRSymbolReferenceTable.cpp b/compiler/compile/OMRSymbolReferenceTable.cpp index ee64f926f49..8b42601a05a 100644 --- a/compiler/compile/OMRSymbolReferenceTable.cpp +++ b/compiler/compile/OMRSymbolReferenceTable.cpp @@ -317,12 +317,6 @@ OMR::SymbolReferenceTable::findClassDepthAndFlagsSymbolRef() return element(isClassDepthAndFlagsSymbol); } -TR::SymbolReference * -OMR::SymbolReferenceTable::findClassAndDepthFlagsSymbolRef() - { - return element(isClassAndDepthFlagsSymbol); - } - TR::SymbolReference * OMR::SymbolReferenceTable::findClassFlagsSymbolRef() diff --git a/compiler/compile/OMRSymbolReferenceTable.hpp b/compiler/compile/OMRSymbolReferenceTable.hpp index 5a770513654..1839ef81177 100644 --- a/compiler/compile/OMRSymbolReferenceTable.hpp +++ b/compiler/compile/OMRSymbolReferenceTable.hpp @@ -113,8 +113,7 @@ class SymbolReferenceTable componentClassSymbol, componentClassAsPrimitiveSymbol, isArraySymbol, - isClassAndDepthFlagsSymbol, - isClassDepthAndFlagsSymbol = isClassAndDepthFlagsSymbol, + isClassDepthAndFlagsSymbol, initializeStatusFromClassSymbol, isClassFlagsSymbol, vftSymbol, @@ -773,7 +772,6 @@ class SymbolReferenceTable TR::SymbolReference * findInstanceDescriptionSymbolRef(); TR::SymbolReference * findDescriptionWordFromPtrSymbolRef(); TR::SymbolReference * findClassFlagsSymbolRef(); - TR::SymbolReference * findClassAndDepthFlagsSymbolRef(); TR::SymbolReference * findClassDepthAndFlagsSymbolRef(); TR::SymbolReference * findArrayComponentTypeSymbolRef(); TR::SymbolReference * findClassIsArraySymbolRef(); diff --git a/compiler/optimizer/LoopVersioner.cpp b/compiler/optimizer/LoopVersioner.cpp index 19ea5661532..de49104ea4b 100644 --- a/compiler/optimizer/LoopVersioner.cpp +++ b/compiler/optimizer/LoopVersioner.cpp @@ -8349,19 +8349,9 @@ bool TR_LoopVersioner::depsForLoopEntryPrep( TR::Node *vftLoad = TR::Node::createWithSymRef(TR::aloadi, 1, 1, firstChild, comp()->getSymRefTab()->findOrCreateVftSymbolRef()); //TR::Node *componentTypeLoad = TR::Node::create(TR::aloadi, 1, vftLoad, comp()->getSymRefTab()->findOrCreateArrayComponentTypeSymbolRef()); - TR::Node *classFlag = NULL; - if (comp()->target().is32Bit()) - { - classFlag = TR::Node::createWithSymRef(TR::iloadi, 1, 1, vftLoad, comp()->getSymRefTab()->findOrCreateClassAndDepthFlagsSymbolRef()); - } - else - { - classFlag = TR::Node::createWithSymRef(TR::lloadi, 1, 1, vftLoad, comp()->getSymRefTab()->findOrCreateClassAndDepthFlagsSymbolRef()); - classFlag = TR::Node::create(TR::l2i, 1, classFlag); - } - TR::Node *andConstNode = TR::Node::create(classFlag, TR::iconst, 0, TR::Compiler->cls.flagValueForArrayCheck(comp())); - TR::Node * andNode = TR::Node::create(TR::iand, 2, classFlag, andConstNode); - TR::Node *cmp = TR::Node::createif(TR::ificmpne, andNode, andConstNode, _exitGotoTarget); + TR::Node *classFlag = comp()->fej9()->testIsClassArrayType(vftLoad); + TR::Node *zeroNode = TR::Node::iconst(classFlag, 0); + TR::Node *cmp = TR::Node::createif(TR::ificmpeq, classFlag, zeroNode, _exitGotoTarget); if (addLoopEntryPrepDep(LoopEntryPrep::TEST, cmp, deps, visited) == NULL) { dumpOptDetailsFailedToCreateTest("array type", firstChild);