mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
[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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user