diff --git a/compiler/optimizer/VPHandlers.cpp b/compiler/optimizer/VPHandlers.cpp index 7678eb0e451..0a5fda2e046 100644 --- a/compiler/optimizer/VPHandlers.cpp +++ b/compiler/optimizer/VPHandlers.cpp @@ -1962,7 +1962,7 @@ TR::Node *constrainAload(OMR::ValuePropagation *vp, TR::Node *node) if (elementSize != 0) { constraint = TR::VPClass::create(vp, (TR::VPClassType*)constraint, NULL, NULL, - TR::VPArrayInfo::create(vp, 0, elementSize == 0 ? TR::getMaxSigned() : TR::getMaxSigned()/elementSize, elementSize), + TR::VPArrayInfo::create(vp, 0, TR::Compiler->om.maxArraySizeInElements(elementSize, vp->comp()), elementSize), TR::VPObjectLocation::create(vp, TR::VPObjectLocation::NotClassObject)); } }