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

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 13:28:33 PST 2024


================
@@ -1634,6 +1634,24 @@ 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. If the 
+    value of the parameter is not in the specified range, a poison value is 
+    returned instead.
----------------
jdoerfert wrote:

I don't like "is returned", this is not a function.

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


More information about the llvm-commits mailing list