[llvm] LangRef: rint, nearbyint: mention that default rounding mode is assumed (PR #77191)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 23:45:38 PST 2024


================
@@ -15751,7 +15751,9 @@ Semantics:
 """"""""""
 
 This function returns the same values as the libm ``rint`` functions
-would, and handles error conditions in the same way.
+would, and handles error conditions in the same way. The rounding mode
----------------
RalfJung wrote:

> What do you intend by the "handles error conditions in the same way" part of this? 

I didn't write this, it is existing text. I don't know or understand the intent of it.

> The fact that we have both llvm.rint and llvm.nearbyint is a bit of a problem, I think. Since "the default LLVM floating-point environment assumes that traps are disabled and status flags are not observable" (per the language reference), there should be no difference at all between llvm.rint and llvm.nearbyint.

Agreed. However, removing one of them seemed like a bigger change than I can muster, so I decided to focus on rounding only and leave the existing text unchanged for exceptions.

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


More information about the llvm-commits mailing list