LangRef: Clarify semantics of lround/llround and lrint/llrint
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 5 Dec 2022 18:51:01 +0000 (13:51 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 6 Dec 2022 13:04:01 +0000 (08:04 -0500)
llvm/docs/LangRef.rst

index c2c11f6..7ce635b 100644 (file)
@@ -15082,8 +15082,10 @@ type.
 Semantics:
 """"""""""
 
-This function returns the same values as the libm ``lround``
-functions would, but without setting errno.
+This function returns the same values as the libm ``lround`` functions
+would, but without setting errno. If the rounded value is too large to
+be stored in the result type, the return value is a non-deterministic
+value (equivalent to `freeze poison`).
 
 '``llvm.llround.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15118,7 +15120,9 @@ Semantics:
 """"""""""
 
 This function returns the same values as the libm ``llround``
-functions would, but without setting errno.
+functions would, but without setting errno. If the rounded value is
+too large to be stored in the result type, the return value is a
+non-deterministic value (equivalent to `freeze poison`).
 
 '``llvm.lrint.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15159,8 +15163,10 @@ type.
 Semantics:
 """"""""""
 
-This function returns the same values as the libm ``lrint``
-functions would, but without setting errno.
+This function returns the same values as the libm ``lrint`` functions
+would, but without setting errno. If the rounded value is too large to
+be stored in the result type, the return value is a non-deterministic
+value (equivalent to `freeze poison`).
 
 '``llvm.llrint.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15194,8 +15200,10 @@ type.
 Semantics:
 """"""""""
 
-This function returns the same values as the libm ``llrint``
-functions would, but without setting errno.
+This function returns the same values as the libm ``llrint`` functions
+would, but without setting errno. If the rounded value is too large to
+be stored in the result type, the return value is a non-deterministic
+value (equivalent to `freeze poison`).
 
 Bit Manipulation Intrinsics
 ---------------------------