[llvm] r296322 - [APInt] Use UINT64_MAX instead of ~integerPart(0). NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 26 22:05:33 PST 2017
Author: ctopper
Date: Mon Feb 27 00:05:33 2017
New Revision: 296322
URL: http://llvm.org/viewvc/llvm-project?rev=296322&view=rev
Log:
[APInt] Use UINT64_MAX instead of ~integerPart(0). NFC
Modified:
llvm/trunk/include/llvm/ADT/APInt.h
Modified: llvm/trunk/include/llvm/ADT/APInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=296322&r1=296321&r2=296322&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APInt.h Mon Feb 27 00:05:33 2017
@@ -341,7 +341,7 @@ public:
/// This checks to see if the value has all bits of the APInt are set or not.
bool isAllOnesValue() const {
if (isSingleWord())
- return VAL == ~integerPart(0) >> (APINT_BITS_PER_WORD - BitWidth);
+ return VAL == UINT64_MAX >> (APINT_BITS_PER_WORD - BitWidth);
return countPopulationSlowCase() == BitWidth;
}
More information about the llvm-commits
mailing list