Skip to content

Commit 7029109

Browse files
committed
mention strictfp and denormal-fp-math
1 parent 91f5076 commit 7029109

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/docs/LangRef.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -3395,11 +3395,12 @@ The default LLVM floating-point environment assumes that traps are disabled and
33953395
status flags are not observable. Therefore, floating-point math operations do
33963396
not have side effects and may be speculated freely. Results assume the
33973397
round-to-nearest rounding mode, and subnormals are assumed to be preserved.
3398-
Running default LLVM code in an environment where these assumptions are not met
3399-
can lead to undefined behavior.
34003398

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

34043405
.. _floatnan:
34053406

0 commit comments

Comments
 (0)