]> granicus.if.org Git - llvm/commitdiff
[APInt] Use UINT64_MAX instead of ~integerPart(0). NFC
authorCraig Topper <craig.topper@gmail.com>
Mon, 27 Feb 2017 06:05:33 +0000 (06:05 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 27 Feb 2017 06:05:33 +0000 (06:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296322 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APInt.h

index d64a05165bd5961d40365a20f9ebc14478f5208e..2af3aabe1881085e0736f0fd4f30e0606156930f 100644 (file)
@@ -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;
   }