1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed const quality check

This commit is contained in:
Brian Fiete 2020-03-11 08:28:48 -07:00
parent 7458a90b5b
commit a713905411

View file

@ -392,7 +392,10 @@ int BfIRConstHolder::CheckConstEquality(BfIRValue lhs, BfIRValue rhs)
{
int rhsZero = IsZero(rhs);
if (rhsZero != -1)
return (lhsZero == rhsZero) ? 1 : 0;
{
if (lhsZero || rhsZero)
return (lhsZero == rhsZero) ? 1 : 0;
}
}
if (constLHS->mTypeCode != constRHS->mTypeCode)