Skip to content

Commit

Permalink
mention strictfp and denormal-fp-math
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 19, 2023
1 parent 91f5076 commit 7029109
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3395,11 +3395,12 @@ The default LLVM floating-point environment assumes that traps are disabled and
status flags are not observable. Therefore, floating-point math operations do
not have side effects and may be speculated freely. Results assume the
round-to-nearest rounding mode, and subnormals are assumed to be preserved.
Running default LLVM code in an environment where these assumptions are not met
can lead to undefined behavior.

Code that requires different behavior than this should use the
:ref:`Constrained Floating-Point Intrinsics <constrainedfp>`.
Running LLVM code in an environment where these assumptions are not met can lead
to undefined behavior. The ``strictfp`` and ``denormal-fp-math`` attributes as
well as :ref:`Constrained Floating-Point Intrinsics <constrainedfp>` can be used
to weaken LLVM's assumptions and ensure defined behavior in non-default
floating-point environments; see their respective documentation for details.

.. _floatnan:

Expand Down

0 comments on commit 7029109

Please sign in to comment.