[PATCH] D139349: LangRef: Clarify semantics of lround/llround and lrint/llrint

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 10:57:33 PST 2022


arsenm created this revision.
arsenm added reviewers: aqjune, nlopes, aaron.ballman.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

https://reviews.llvm.org/D139349

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -15082,8 +15082,10 @@
 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 unspecified (not
+poison).
 
 '``llvm.llround.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15118,7 +15120,9 @@
 """"""""""
 
 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
+unspecified (not poison).
 
 '``llvm.lrint.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15159,8 +15163,10 @@
 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 unspecified (not
+poison).
 
 '``llvm.llrint.*``' Intrinsic
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -15194,8 +15200,10 @@
 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 unspecified (not
+poison).
 
 Bit Manipulation Intrinsics
 ---------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139349.480163.patch
Type: text/x-patch
Size: 1854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/97db1c2c/attachment.bin>


More information about the llvm-commits mailing list