[llvm] [SystemZ] Mark fminimumnum/fmaximumnum as legal (PR #184595)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 08:12:36 PST 2026
nikic wrote:
> The only difference between our mode M=4 and `minimumNumber` is that M=4 may return an input SNaN as-is, without changing it to the corresponding QNaN. We do not have a mode that matches `minimumNumber` precisely. Does this matter, given that this is a non-strict IR opcode?
This is fine, non-constrained operations are explicitly allowed to omit NaN canonicalization.
> (Should there be a strict variant?)
Probably :) There are a few intrinsic families that are missing minimumnum support, including the constrained ones.
> However, I keep being confused by what exactly the various LLVM IR nodes are supposed to correspond to. Does `STRICT_FMINNUM` actually implement the IEEE 754-2008 variant exactly?
LangRef just says "This function follows the IEEE 754-2008 semantics for minNum", so I believe so. The constrained/strict intrinsics are generally intended to follow IEEE precisely.
> This is not clear to me from the current documentation; it seems there have been several attempts at "clarification" recently that were reverted again?
Yes, there has been some churn here. The semantics for the non-constrained intrinsics should be final now. (I don't think anyone looked at the constrained ones in detail as part of that.)
https://github.com/llvm/llvm-project/pull/184595
More information about the llvm-commits
mailing list