[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
Fri Dec 5 13:12:01 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:

The constrained intrinsics have their own separate docs though, don't they? E.g. [here](https://llvm.org/docs/LangRef.html#llvm-experimental-constrained-powi-intrinsic). They don't even refer to the basic intrinsics for their semantics.

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


More information about the llvm-commits mailing list