Skip to content

Commit b1749f1

Browse files
committed
removed redundant assert and condition in APInt::SetBits
1 parent 7d4e6ff commit b1749f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/APInt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,11 +1366,11 @@ class [[nodiscard]] APInt {
13661366
/// This function handles case when \p loBit <= \p hiBit.
13671367
void setBits(unsigned loBit, unsigned hiBit) {
13681368
assert(hiBit <= BitWidth && "hiBit out of range");
1369-
assert(loBit <= BitWidth && "loBit out of range");
13701369
assert(loBit <= hiBit && "loBit greater than hiBit");
13711370
if (loBit == hiBit)
13721371
return;
13731372
if (loBit < APINT_BITS_PER_WORD && hiBit <= APINT_BITS_PER_WORD) {
1373+
//if (hiBit <= APINT_BITS_PER_WORD) {
13741374
uint64_t mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - (hiBit - loBit));
13751375
mask <<= loBit;
13761376
if (isSingleWord())

0 commit comments

Comments
 (0)