[ValueTracking] Use APInt::isNegative(). NFC

llvm-svn: 300308
This commit is contained in:
Craig Topper 2017-04-14 06:43:32 +00:00
parent f8631cd1de
commit 1281deaa00
1 changed files with 1 additions and 1 deletions

View File

@ -1006,7 +1006,7 @@ static void computeKnownBitsFromOperator(const Operator *I, APInt &KnownZero,
MaxHighZeros = std::max(KnownZero.countLeadingOnes(),
KnownZero2.countLeadingOnes());
// If either side is negative, the result is negative.
else if (KnownOne[BitWidth - 1] || KnownOne2[BitWidth - 1])
else if (KnownOne.isNegative() || KnownOne2.isNegative())
MaxHighOnes = 1;
} else if (SPF == SPF_UMAX) {
// We can derive a lower bound on the result by taking the max of the