Skip to content

Commit ba5c26d

Browse files
committed
LangRef: Clarify semantics of lround/llround and lrint/llrint
1 parent 6f12281 commit ba5c26d

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

llvm/docs/LangRef.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15082,8 +15082,10 @@ type.
1508215082
Semantics:
1508315083
""""""""""
1508415084

15085-
This function returns the same values as the libm ``lround``
15086-
functions would, but without setting errno.
15085+
This function returns the same values as the libm ``lround`` functions
15086+
would, but without setting errno. If the rounded value is too large to
15087+
be stored in the result type, the return value is a non-deterministic
15088+
value (equivalent to `freeze poison`).
1508715089

1508815090
'``llvm.llround.*``' Intrinsic
1508915091
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15118,7 +15120,9 @@ Semantics:
1511815120
""""""""""
1511915121

1512015122
This function returns the same values as the libm ``llround``
15121-
functions would, but without setting errno.
15123+
functions would, but without setting errno. If the rounded value is
15124+
too large to be stored in the result type, the return value is a
15125+
non-deterministic value (equivalent to `freeze poison`).
1512215126

1512315127
'``llvm.lrint.*``' Intrinsic
1512415128
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15159,8 +15163,10 @@ type.
1515915163
Semantics:
1516015164
""""""""""
1516115165

15162-
This function returns the same values as the libm ``lrint``
15163-
functions would, but without setting errno.
15166+
This function returns the same values as the libm ``lrint`` functions
15167+
would, but without setting errno. If the rounded value is too large to
15168+
be stored in the result type, the return value is a non-deterministic
15169+
value (equivalent to `freeze poison`).
1516415170

1516515171
'``llvm.llrint.*``' Intrinsic
1516615172
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15194,8 +15200,10 @@ type.
1519415200
Semantics:
1519515201
""""""""""
1519615202

15197-
This function returns the same values as the libm ``llrint``
15198-
functions would, but without setting errno.
15203+
This function returns the same values as the libm ``llrint`` functions
15204+
would, but without setting errno. If the rounded value is too large to
15205+
be stored in the result type, the return value is a non-deterministic
15206+
value (equivalent to `freeze poison`).
1519915207

1520015208
Bit Manipulation Intrinsics
1520115209
---------------------------

0 commit comments

Comments
 (0)