diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-04-01 21:50:08 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-04-01 21:50:08 +0000 |
commit | a742cb5fc85855c95b9cf824361197bef027ab7b (patch) | |
tree | eabe5525ee28ce1da761722a7e5db6b30d1295e4 /llvm/lib/Support/APInt.cpp | |
parent | 99cfe4f99d3685a55100cde0483fc28eebeb04d2 (diff) | |
download | bcm5719-llvm-a742cb5fc85855c95b9cf824361197bef027ab7b.tar.gz bcm5719-llvm-a742cb5fc85855c95b9cf824361197bef027ab7b.zip |
[APInt] Implement flipAllBitsSlowCase with tcComplement. NFCI
llvm-svn: 299319
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index babfbdc21a6..f4190eb805d 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -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(); } |