[llvm] [LangRef] make consequences of NaN rules for pow(i) more explicit (PR #170177)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 4 15:32:40 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
----------------
jyknight wrote:
I think we should at least mention "non-constrained" here as an additional hint. E.g. "Due to how LLVM treats NaN values in non-constrained functions".
https://github.com/llvm/llvm-project/pull/170177
More information about the llvm-commits
mailing list