We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39f5a42 commit 3ffde4aCopy full SHA for 3ffde4a
llvm/include/llvm/ADT/APInt.h
@@ -1366,11 +1366,10 @@ class [[nodiscard]] APInt {
1366
/// This function handles case when \p loBit <= \p hiBit.
1367
void setBits(unsigned loBit, unsigned hiBit) {
1368
assert(hiBit <= BitWidth && "hiBit out of range");
1369
- assert(loBit <= BitWidth && "loBit out of range");
1370
assert(loBit <= hiBit && "loBit greater than hiBit");
1371
if (loBit == hiBit)
1372
return;
1373
- if (loBit < APINT_BITS_PER_WORD && hiBit <= APINT_BITS_PER_WORD) {
+ if (hiBit <= APINT_BITS_PER_WORD) {
1374
uint64_t mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - (hiBit - loBit));
1375
mask <<= loBit;
1376
if (isSingleWord())
0 commit comments