[llvm] LangRef: Clarify llvm.minnum and llvm.maxnum about sNaN (PR #112852)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 19 20:48:18 PDT 2024
================
@@ -16464,8 +16464,8 @@ type.
Semantics:
""""""""""
-Follows the IEEE754 2008 semantics for minNum, except for handling of
-+0.0 vs -0.0. This matches the behavior of libm's fmin.
+Follows the IEEE754 2008 semantics for minNum.
+This also matches the behavior of libm's fmin.
----------------
wzssyqa wrote:
Since C23 doesn't require it and libc implementions doesn't do it.
For some architectures, such as X86/ARM-preV8/MIPS-prer6, it will need more work to archive +0.0>-0.0.
So I think that we should have a intrinsic just suite for libc's fmin/fmax.
Of course, for architectures that have FMINNUM_IEEE/FMAXNUM_IEEE, we can map FMINNUM/FMAXNUM to the _IEEE ones, just as we did for ARMv8 and MIPSr6.
I will add more clairification about the history of libm.
https://github.com/llvm/llvm-project/pull/112852
More information about the llvm-commits
mailing list