[llvm] Correct documentation for `roundeven` (PR #125452)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 2 19:15:04 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Trevor Gross (tgross35)
<details>
<summary>Changes</summary>
Langref for `roundeven` implies that the C standard function `roundeven` may raise floating point exceptions. However, this is not correct; C23 does not mention exceptions for `roundeven`, and per [1] `FE_INEXACT` is never raised.
Clarify that LLVM's `roundeven` behaves the same.
[1]: https://en.cppreference.com/w/c/numeric/math/roundeven
---
Full diff: https://github.com/llvm/llvm-project/pull/125452.diff
1 Files Affected:
- (modified) llvm/docs/LangRef.rst (+2-2)
``````````diff
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 8891aedcb58e55..bd9c522987834f 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -17255,8 +17255,8 @@ Semantics:
""""""""""
This function implements IEEE-754 operation ``roundToIntegralTiesToEven``. It
-also behaves in the same way as C standard function ``roundeven``, except that
-it does not raise floating point exceptions.
+also behaves in the same way as C standard function ``roundeven``, including
+that it disregards rounding mode and does not raise floating point exceptions.
'``llvm.lround.*``' Intrinsic
``````````
</details>
https://github.com/llvm/llvm-project/pull/125452
More information about the llvm-commits
mailing list