[PATCH] D74729: [FPEnv] Intrinsic for setting rounding mode

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 11:50:44 PDT 2020


kpn added a comment.

In D74729#2008093 <https://reviews.llvm.org/D74729#2008093>, @sepavloff wrote:

> In D74729#2005958 <https://reviews.llvm.org/D74729#2005958>, @kpn wrote:
>
> > I think we need to be clear in the documentation that this is _not_ a substitute for the constrained FP intrinsics. Can you please add that to your new documentation? Include a link to the "Floating-Point Environment" section in the language ref.
>
>
> It cannot be such substitute. IIUC constrained intrinsics were introduced to represent variants of corresponding C functions that operate in non-default FP environment to distinguish them from "ordinary" variants, that are pure functions. Functions like `set_rounding` always access FP environment, it always have side effect and must be properly ordered.


Sure, you know that, and I know that, but someone who hasn't been following along the past couple of years may not know that. A sentence or two tying things together won't hurt. Something along the lines of "Altering the rounding mode requires special care. See 'Floating-Point Environment'.", with a link to that section of the documentation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74729/new/

https://reviews.llvm.org/D74729





More information about the llvm-commits mailing list