[llvm] Allow empty range attribute and add assert for full range (PR #100601)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 06:00:05 PDT 2024
================
@@ -3109,8 +3109,8 @@ bool LLParser::parseRangeAttr(AttrBuilder &B) {
if (ParseAPSInt(BitWidth, Lower) ||
parseToken(lltok::comma, "expected ','") || ParseAPSInt(BitWidth, Upper))
return true;
- if (Lower == Upper)
- return tokError("the range should not represent the full or empty set!");
+ if (Lower == Upper && !Lower.isMinValue())
----------------
nikic wrote:
```suggestion
if (Lower == Upper && !Lower.isZero())
```
https://github.com/llvm/llvm-project/pull/100601
More information about the llvm-commits
mailing list