diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-10-23 15:09:44 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-10-23 15:09:44 +0000 |
commit | 96ef0c1103607e973532e166dae8311f5abb139e (patch) | |
tree | 3c3de1f68ea669a0ab549f87cc604eab80fcdb80 /llvm/lib/Target/X86 | |
parent | 0c5da265723b263ebc83e065ecd821acb73e8a4d (diff) | |
download | bcm5719-llvm-96ef0c1103607e973532e166dae8311f5abb139e.tar.gz bcm5719-llvm-96ef0c1103607e973532e166dae8311f5abb139e.zip |
Use APInt::isAllOnesValue instead of popcnt. NFCI.
More obvious implementation and faster too.
llvm-svn: 284937
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r-- | llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp b/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp index 29498160842..11115524c81 100644 --- a/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp +++ b/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp @@ -82,7 +82,7 @@ static bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits, // 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; |