tbaeder added a comment.

In D155546#4510691 <https://reviews.llvm.org/D155546#4510691>, @aaron.ballman 
wrote:

> I'd like to see test coverage for treatment of NaNs. According to the C23 
> standard, a quiet NaN is treated as missing data for fmax and fmin; so if 
> there's a quiet NaN and a numeric value, the numeric value it's what's 
> returned.

Isn't this always the case?
``
constexpr float qNan = __builtin_nan("");

constexpr float min = __builtin_fmin(qNan, 1);
static_assert(min == 1);
constexpr float min2 = __builtin_fmin(1, qNan);
static_assert(min2 == 1);

  works already.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155546

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to