[llvm] LangRef: Clarify llvm.minnum and llvm.maxnum about sNaN (PR #112852)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 17:41:44 PDT 2024
wzssyqa wrote:
> Please add some mention of the interaction with FP arithmetic. (In particular, that arithmetic on an sNaN doesn't consistently produce a qNaN, so arithmetic feeding into a minnum/maxnum can produce inconsistent results.)
qNaN is always produced in the following cases:
1. In IEEE754-2008, qNaN is required for maxNUM and minNUM operations.
2. On architectures that implement these operation with hardware, such as MIPSr6, ARMv8, qNaN is also produced.
3. With the current glibc(2.25+) implementation, qNaN is also.
Yes, for older libc implementations (2.24-) qNaN vs sNaN may produce sNaN.
https://github.com/llvm/llvm-project/pull/112852
More information about the llvm-commits
mailing list