[llvm] r284937 - Use APInt::isAllOnesValue instead of popcnt. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 23 08:09:46 PDT 2016
Author: rksimon
Date: Sun Oct 23 10:09:44 2016
New Revision: 284937
URL: http://llvm.org/viewvc/llvm-project?rev=284937&view=rev
Log:
Use APInt::isAllOnesValue instead of popcnt. NFCI.
More obvious implementation and faster too.
Modified:
llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
Modified: llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp?rev=284937&r1=284936&r2=284937&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp Sun Oct 23 10:09:44 2016
@@ -82,7 +82,7 @@ static bool extractConstantMask(const Co
// Only treat the element as UNDEF if all bits are UNDEF, otherwise
// treat it as zero.
- if (EltUndef.countPopulation() == MaskEltSizeInBits) {
+ if (EltUndef.isAllOnesValue()) {
UndefElts[i] = true;
RawMask[i] = 0;
continue;
More information about the llvm-commits
mailing list