aaron.ballman added a comment.
In D155546#4532839 <https://reviews.llvm.org/D155546#4532839>, @jcranmer-intel
wrote:
> Treating sNaN as always signaling FE_INVALID is probably the safer option.
That sounds reasonable to me.
================
Comment at: clang/test/AST/Interp/builtin-functions.cpp:65-73
+ constexpr float f1 = __builtin_fmin(1.0, 2.0f);
+ static_assert(f1 == 1.0f, "");
+
+ constexpr float min = __builtin_fmin(__builtin_nan(""), 1);
+ static_assert(min == 1, "");
+ constexpr float min2 = __builtin_fmin(1, __builtin_nan(""));
+ static_assert(min2 == 1, "");
----------------
Can you add a test using `__builtin_nans` to show that it results in an invalid
constant expression because of the `FE_INVALID` signal?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155546/new/
https://reviews.llvm.org/D155546
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits