Skip to content

Commit 26a37c6

Browse files
committed
LangRef: state explicitly that floats generally behave according to IEEE-754
1 parent f9b69a3 commit 26a37c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/docs/LangRef.rst

+6
Original file line numberDiff line numberDiff line change
@@ -3577,6 +3577,12 @@ seq\_cst total orderings of other operations that are not marked
35773577
Floating-Point Environment
35783578
--------------------------
35793579

3580+
Unless noted otherwise, LLVM works with IEEE 754 floating-point semantics: LLVM
3581+
backends assume that the CPU is configured to provide IEEE-compatible behavior,
3582+
and LLVM frontends can assume that LLVM IR floating-point operations behave
3583+
according to the IEEE specification (with an :ref:`exception around NaN values
3584+
<floatnan>`).
3585+
35803586
The default LLVM floating-point environment assumes that traps are disabled and
35813587
status flags are not observable. Therefore, floating-point math operations do
35823588
not have side effects and may be speculated freely. Results assume the

0 commit comments

Comments
 (0)