[APInt] Move operator&=(uint64_t) inline and use memset to clear the upper words.

This method is pretty new and probably isn't use much in the code base so this should have a negligible size impact. The OR and XOR operators are already inline.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298870 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2017-03-27 18:16:17 +00:00
parent c53cf7e424
commit 0532ee926c
2 changed files with 9 additions and 13 deletions
-12
View File
@@ -428,18 +428,6 @@ APInt& APInt::operator&=(const APInt& RHS) {
return *this;
}
APInt &APInt::operator&=(uint64_t RHS) {
if (isSingleWord()) {
VAL &= RHS;
return *this;
}
pVal[0] &= RHS;
unsigned numWords = getNumWords();
for (unsigned i = 1; i < numWords; ++i)
pVal[i] = 0;
return *this;
}
APInt& APInt::operator|=(const APInt& RHS) {
assert(BitWidth == RHS.BitWidth && "Bit widths must be the same");
if (isSingleWord()) {