[llvm] r314652 - [X86] Cleanup uses of computeKnownBits by using MaskedValueIsZero helper instead. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 02:08:45 PDT 2017
Author: rksimon
Date: Mon Oct 2 02:08:45 2017
New Revision: 314652
URL: http://llvm.org/viewvc/llvm-project?rev=314652&view=rev
Log:
[X86] Cleanup uses of computeKnownBits by using MaskedValueIsZero helper instead. NFCI.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=314652&r1=314651&r2=314652&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Oct 2 02:08:45 2017
@@ -5946,12 +5946,9 @@ static bool getFauxShuffleMask(SDValue N
DAG.ComputeNumSignBits(N1) <= NumBitsPerElt)
return false;
} else {
- KnownBits Known0, Known1;
- DAG.computeKnownBits(N0, Known0);
- if (Known0.countMinLeadingZeros() < NumBitsPerElt)
- return false;
- DAG.computeKnownBits(N1, Known1);
- if (Known1.countMinLeadingZeros() < NumBitsPerElt)
+ APInt ZeroMask = APInt::getHighBitsSet(2 * NumBitsPerElt, NumBitsPerElt);
+ if (!DAG.MaskedValueIsZero(N0, ZeroMask) ||
+ !DAG.MaskedValueIsZero(N1, ZeroMask))
return false;
}
More information about the llvm-commits
mailing list