[llvm] specify NaN behavior more precisely (PR #66579)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 00:04:29 PDT 2023


RalfJung wrote:

Regarding fmin/fmax on x86, @Muon pointed out that LLVM currently simply calls the underlying libm functions to implement these operations. The C standard has nothing to say about the case where both inputs are a NaN. My local manpage says

> If both arguments are NaN, a NaN is returned.

This is not very specific and could permit arbitrary NaN payloads. I don't know if that actually happens in practice though.

So I'm still unsure about whether we need to say that fmin/fmax on x86 can produce arbitrary NaN payloads.

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


More information about the llvm-commits mailing list