Skip to content

Commit

Permalink
Make a minor correction to improved VPClass::mustBeNotEqual()
Browse files Browse the repository at this point in the history
In 5aba990 the improved VPClass::mustBeNotEqual() mistakenly
returned false instead of true for arrays with different lengths. This
commit corrects that case to return true as intended. This was not a
functional problem because false is a conservative result.
  • Loading branch information
jdmpapin committed Jul 30, 2024
1 parent 4a25bae commit d63752e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/optimizer/VPConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5213,7 +5213,7 @@ bool TR::VPClass::mustBeNotEqual(TR::VPConstraint *other, OMR::ValuePropagation
int32_t otherLo = otherArrayInfo->lowBound();
int32_t otherHi = otherArrayInfo->highBound();
if (thisHi < otherLo || otherHi < thisLo)
return false; // They're arrays with different lengths.
return true; // They're arrays with different lengths.
}
}

Expand Down

0 comments on commit d63752e

Please sign in to comment.