mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
Use getAllOnesValue, saves a copy and looks better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110991 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7f1f4089a1
commit
452b93e7dc
@ -464,7 +464,7 @@ public:
|
|||||||
// For small values, return quickly
|
// For small values, return quickly
|
||||||
if (numBits <= APINT_BITS_PER_WORD)
|
if (numBits <= APINT_BITS_PER_WORD)
|
||||||
return APInt(numBits, ~0ULL << shiftAmt);
|
return APInt(numBits, ~0ULL << shiftAmt);
|
||||||
return (~APInt(numBits, 0)).shl(shiftAmt);
|
return getAllOnesValue(numBits).shl(shiftAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructs an APInt value that has the bottom loBitsSet bits set.
|
/// Constructs an APInt value that has the bottom loBitsSet bits set.
|
||||||
@ -481,7 +481,7 @@ public:
|
|||||||
// For small values, return quickly.
|
// For small values, return quickly.
|
||||||
if (numBits < APINT_BITS_PER_WORD)
|
if (numBits < APINT_BITS_PER_WORD)
|
||||||
return APInt(numBits, (1ULL << loBitsSet) - 1);
|
return APInt(numBits, (1ULL << loBitsSet) - 1);
|
||||||
return (~APInt(numBits, 0)).lshr(numBits - loBitsSet);
|
return getAllOnesValue(numBits).lshr(numBits - loBitsSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The hash value is computed as the sum of the words and the bit width.
|
/// The hash value is computed as the sum of the words and the bit width.
|
||||||
|
Loading…
Reference in New Issue
Block a user