On 10/21/22 01:23, Jakub Jelinek wrote:
Hi!

On top of the pending
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603665.html
patch, the following patch adds another needed builtin.
The above patch adds among other things __builtin_nextafterf16
builtin which we need in order to constexpr evaluate
std::nextafter(_Float16) overload (patch for that to be posted momentarily).
While there is inline implementation of the overload, it isn't constant
evaluation friendly, and the builtin doesn't need libm implementation
because it will be used only during constant expression evaluation.
We need the same thing also for std::nextafter(__gnu_cxx::__bfloat16_t)
though and this patch does that.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2022-10-21  Jakub Jelinek  <ja...@redhat.com>

        * builtin-types.def (BT_FN_BFLOAT16_BFLOAT16_BFLOAT16): New.
        * builtins.def (BUILT_IN_NEXTAFTERF16B): New builtin.
        * fold-const-call.cc (fold_const_call_sss): Handle
        CFN_BUILT_IN_NEXTAFTERF16B.

OK

jeff


Reply via email to