[APInt] Implement flipAllBitsSlowCase with tcComplement. NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299319 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2017-04-01 21:50:08 +00:00
parent ef14ce8e1b
commit 9bf6f549d3
+1 -2
View File
@@ -539,8 +539,7 @@ void APInt::clearBit(unsigned bitPosition) {
/// @brief Toggle every bit to its opposite value.
void APInt::flipAllBitsSlowCase() {
for (unsigned i = 0; i < getNumWords(); ++i)
pVal[i] ^= UINT64_MAX;
tcComplement(pVal, getNumWords());
clearUnusedBits();
}