[llvm] [LangRef] make consequences of NaN rules for pow(i) more explicit (PR #170177)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 4 22:57:46 PST 2025


================
@@ -16269,6 +16269,12 @@ Semantics:
 This function returns the first value raised to the second power with an
 unspecified sequence of rounding operations.
 
+Note that the `powi` function is unusual in that NaN inputs can lead to non-NaN
+results, and this depends on the kind of NaN (quiet vs signaling). Due to how
+:ref:`LLVM treats NaN values <floatnan>`, the function may non-deterministically
----------------
RalfJung wrote:

There's also `strictfp`, should that also be mentioned? (Not sure if it has an effect on this.)

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


More information about the llvm-commits mailing list