From: Craig Topper <craig.topper@gmail.com> Date: Sat, 1 Apr 2017 21:50:03 +0000 (+0000) Subject: [APInt] Implement AndAssignSlowCase using tcAnd. Do the same for Or and Xor. NFCI X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e222bade09627c7716790fb0ab67636773839ece;p=llvm [APInt] Implement AndAssignSlowCase using tcAnd. Do the same for Or and Xor. NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299317 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 0d4255da7f0..4275e3918c6 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -407,23 +407,17 @@ APInt& APInt::operator*=(const APInt& RHS) { } APInt& APInt::AndAssignSlowCase(const APInt& RHS) { - unsigned numWords = getNumWords(); - for (unsigned i = 0; i < numWords; ++i) - pVal[i] &= RHS.pVal[i]; + tcAnd(pVal, RHS.pVal, getNumWords()); return *this; } APInt& APInt::OrAssignSlowCase(const APInt& RHS) { - unsigned numWords = getNumWords(); - for (unsigned i = 0; i < numWords; ++i) - pVal[i] |= RHS.pVal[i]; + tcOr(pVal, RHS.pVal, getNumWords()); return *this; } APInt& APInt::XorAssignSlowCase(const APInt& RHS) { - unsigned numWords = getNumWords(); - for (unsigned i = 0; i < numWords; ++i) - pVal[i] ^= RHS.pVal[i]; + tcXor(pVal, RHS.pVal, getNumWords()); return *this; }