From 9bf6f549d3cb1607281c879805587fc0a518a65f Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 1 Apr 2017 21:50:08 +0000 Subject: [PATCH] [APInt] Implement flipAllBitsSlowCase with tcComplement. NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299319 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/APInt.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index babfbdc21a6..f4190eb805d 100644 --- a/lib/Support/APInt.cpp +++ b/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(); } -- 2.50.1