[llvm] [IR] Add new Range attribute using new ConstantRange Attribute type (PR #83171)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 01:06:20 PST 2024


================
@@ -1634,6 +1634,22 @@ Currently, only the following parameter attributes are defined:
 
     This attribute cannot be applied to return values.
 
+``range(<ty> <a>, <b>)``
+    This attribute expresses the possible range the parameter is in. The value of 
+    the parameter is in the specified range or is poison.
----------------
nikic wrote:

```suggestion
    This attribute expresses the possible range of the parameter or return value.
    If the value is not in the specified range, it is converted to poison.
```

https://github.com/llvm/llvm-project/pull/83171


More information about the llvm-commits mailing list