Skip to content

Commit

Permalink
Re-enable new VPClass::mustBeNotEqual()
Browse files Browse the repository at this point in the history
  • Loading branch information
jdmpapin committed Aug 20, 2024
1 parent 9c4d89c commit 680fd73
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions compiler/optimizer/VPConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5122,31 +5122,6 @@ bool TR::VPClass::mustBeNotEqual(TR::VPConstraint *other, OMR::ValuePropagation
if (isNonNullObject() && other->isNullObject())
return true;

// The new logic below is causing some test failures that need to be investigated.
// This original logic is reinstated in the meantime.
if (getKnownObject() && other->getKnownObject() && isNonNullObject() && other->isNonNullObject())
return getKnownObject()->getIndex() != other->getKnownObject()->getIndex();

TR::VPClass *otherClass = NULL;
if (other)
otherClass = other->asClass();
if (!_preexistence &&
!_arrayInfo && _type &&
_type->isFixedClass() && isNonNullObject() &&
other && otherClass &&
!otherClass->getArrayInfo() &&
!otherClass->isPreexistentObject() &&
otherClass->getClassType() && otherClass->getClassType()->isFixedClass() && otherClass->isNonNullObject() &&
(isClassObject() == TR_yes) &&
(other->isClassObject() == TR_yes))
{
if (_type->asFixedClass()->getClass() != otherClass->getClassType()->asFixedClass()->getClass())
return true;
}

return false;

#if 0
if (!isNonNullObject() && !other->isNonNullObject())
return false; // both could be null

Expand Down Expand Up @@ -5310,7 +5285,6 @@ bool TR::VPClass::mustBeNotEqual(TR::VPConstraint *other, OMR::ValuePropagation
// Two unrelated non-interface classes can't have a common subtype.
return vp->fe()->isInstanceOf(thisClass, otherClass, true, true) == TR_no
&& vp->fe()->isInstanceOf(otherClass, thisClass, true, true) == TR_no;
#endif
}

bool TR::VPNullObject::mustBeNotEqual(TR::VPConstraint *other, OMR::ValuePropagation *vp)
Expand Down

0 comments on commit 680fd73

Please sign in to comment.