[llvm] [LangRef] Clarify specification for float min/max operations (PR #172012)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 7 05:10:41 PST 2026


phoebewang wrote:

> > Are you saying the old matrix or the new one? The sNaN rows are removed in the new matrix. There are extra explanations regarding the signaling NaNs for minnum/maxnum somewhere, which makes exceptions compared with the other two. Am I missing something here?
> 
> This PR does not introduce anything new wrt. SNaN, it just clarifies the already existing semantics that are described in the NaN section of the LangRef. So I am not sure what you are referring to.

The non-deterministical declaration of SNaN is new (though powi is a precedent), and different with the other 2. I'm fine with it. It's reasonable given it's not required by the language, not respected by the backend and there's cost to make it deterministic. (Non sunt multiplicanda entia sine necessitate)

My point is all the reasons apply to signed zero too. So I don't get the point "expose the full matrix of behaviors". The declaration of non-deterministical SNaN for minnum/maxnum does not affect the general "treat all NaNs as if they were quiet NaNs", why the exception in signed zero matters?

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


More information about the llvm-commits mailing list