public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Joseph Myers <joseph@codesourcery.com>,
	Jonathan Wakely <jwakely@redhat.com>,
	gcc-patches@gcc.gnu.org, Bruce Korb <bkorb@gnu.org>
Subject: Re: [PATCH] c++: Implement P1467R9 - Extended floating-point types and standard names compiler part except for bfloat16 [PR106652]
Date: Mon, 12 Sep 2022 23:00:33 +0200	[thread overview]
Message-ID: <Yx+d8a5b+zRBhkw9@tucnak> (raw)
In-Reply-To: <Yx+cEyCrrhs+tqf9@tucnak>

On Mon, Sep 12, 2022 at 10:52:35PM +0200, Jakub Jelinek via Gcc-patches wrote:
> Can't that be implemented as 2 conversions, convert BFmode to SFmode and
> then back to HFmode (or the other way around)?
> SFmode is a superset of both formats, so except for the raise exception on
> SNaN and conversion to QNaN extension to SFmode from both formats should be
> lossless?
> 
> In any case, the bfloat16 support is intended maybe for follow-up patches,
> not in this patch.

Well, the BF -> HF conversion could be done just by << 16 + SF -> HF
conversion too.
But for BF -> HF and HF -> BF conversions (C++ allows them only
for explicit casts, not implicit), the question is what library routine
name to use, because it is neither pure extension nor pure truncation.
But guess that is the case for PowerPC IFmode vs. KFmode.  And the backend
has both truncifkf2 and extendifkf2 named patterns which presumably do the
same thing.

	Jakub


  reply	other threads:[~2022-09-12 21:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  8:05 Jakub Jelinek
2022-09-12 19:36 ` Joseph Myers
2022-09-12 20:52   ` Jakub Jelinek
2022-09-12 21:00     ` Jakub Jelinek [this message]
2022-09-13 17:50     ` Joseph Myers
2022-09-16 11:48 ` Jason Merrill
2022-09-16 17:34   ` Jakub Jelinek
2022-09-17  8:58     ` Jason Merrill
2022-09-19 16:39       ` Jakub Jelinek
2022-09-26 21:15         ` Jason Merrill
2022-09-26 22:11           ` Jakub Jelinek
2022-09-20  3:35 ` Hongtao Liu
2022-09-20  7:14   ` Hongtao Liu
2022-09-20  8:51   ` Jakub Jelinek
2022-09-22 15:56     ` [RFC PATCH] __trunc{tf,xf,df,sf,hf}bf2, __truncbfhf2 and __extendbfsf2 Jakub Jelinek
2022-09-23  0:44       ` Hongtao Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yx+d8a5b+zRBhkw9@tucnak \
    --to=jakub@redhat.com \
    --cc=bkorb@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=jwakely@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).