[PATCH] D148792: LangRef: Clarify behavior of minnum/maxnum

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 05:32:19 PDT 2023


nikic added a comment.

In D148792#4283345 <https://reviews.llvm.org/D148792#4283345>, @arsenm wrote:

> In D148792#4283344 <https://reviews.llvm.org/D148792#4283344>, @nikic wrote:
>
>>> Also remove a note about the result always being quiet which is directly contradicted by the following paragraph.
>>
>> Where is the contradiction?
>
> The entire following paragraph. "Unlike the IEEE-754 2008 behavior, this does not distinguish between
> signaling and quiet NaN inputs. If a target's implementation follows
> the standard and returns a quiet NaN if either input is a signaling
> NaN, the intrinsic lowering is responsible for quieting the inputs to
> correctly return the non-NaN input (e.g. by using the equivalent of
> ``llvm.canonicalize``)."
>
> This is not returning an "always quiet nan" and matches the libm behavior

Not sure I follow. If a NaN is returned, the NaN will always be quiet. The paragraph only clarifies that even if one input is SNaN a NaN will only be returned if the other input is NaN as well.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148792/new/

https://reviews.llvm.org/D148792



More information about the llvm-commits mailing list