[ValueTracking] Use APInt::intersects to avoid some temporary APInts. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2017-06-06 07:13:09 +00:00
parent 99facf0e27
commit 04e2a49b56

View File

@ -1999,9 +1999,8 @@ static bool isKnownNonEqual(const Value *V1, const Value *V2, const Query &Q) {
KnownBits Known2(BitWidth);
computeKnownBits(V2, Known2, 0, Q);
APInt OppositeBits = (Known1.Zero & Known2.One) |
(Known2.Zero & Known1.One);
if (OppositeBits.getBoolValue())
if (Known1.Zero.intersects(Known2.One) ||
Known2.Zero.intersects(Known1.One))
return true;
}
return false;