summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 58fa2f53690..aacb7440313 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -581,6 +581,11 @@ 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;
+ clearUnusedBits();
+}
/// Toggle a given bit to its opposite value whose position is given
/// as "bitPosition".
OpenPOWER on IntegriCloud