[llvm] LangRef: state explicitly that floats generally behave according to IEEE-754 (PR #102140)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 10:00:23 PDT 2024


================
@@ -3577,6 +3577,12 @@ seq\_cst total orderings of other operations that are not marked
 Floating-Point Environment
 --------------------------
 
+Unless noted otherwise, LLVM works with IEEE 754 floating-point semantics: LLVM
+backends assume that the CPU is configured to provide IEEE-compatible behavior,
+and LLVM frontends can assume that LLVM IR floating-point operations behave
+according to the IEEE specification (with an :ref:`exception around NaN values
+<floatnan>`).
----------------
arsenm wrote:

hyphenate IEEE-754? This is also worded a bit broadly, and seems to contradict some of the text later in the section.

Ideally the LangRef would not be in terms of "CPUs" or "configurations". 

Maybe should specify the bitlayouts are assumed to be the IEEE pattern?

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


More information about the llvm-commits mailing list