From: Michael Meissner <meissner@linux.ibm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: Michael Meissner <meissner@linux.ibm.com>,
gcc-patches@gcc.gnu.org,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>,
William Seurer <seurer@gcc.gnu.org>,
Will Schmidt <will_schmidt@vnet.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>
Subject: Re: [PATCH 1/3] Rework 128-bit complex multiply and divide, PR target/107299
Date: Tue, 13 Dec 2022 01:14:39 -0500 [thread overview]
Message-ID: <Y5gYTxjXv5z0fszk@toto.the-meissners.org> (raw)
In-Reply-To: <c24d634d-5969-a103-3482-ba546312863f@linux.ibm.com>
On Mon, Dec 12, 2022 at 06:20:14PM +0800, Kewen.Lin wrote:
> Without or with patch #1, the below ICE in libgcc exists, the ICE should have
> nothing to do with the special handling for building_libgcc in patch #1. I
> think patch #2 which makes _Float128 and __float128 use the same internal
> type fixes that ICE.
>
> I still don't get the point why we need the special handling for building_libgcc,
> I also tested on top of patch #1 and #2 w/ and w/o the special handling for
> building_libgcc, both bootstrapped and regress-tested.
>
> Could you have a double check?
As long as patch #2 and #3 are installed, we don't need the special handling
for building_libgcc. Good catch.
I will send out a replacement patch for it.
> Since your patch #2 (and #3) fixes ICE and some exposed problems, and _Float128
> is to use the same internal type as __float128, types with attribute((mode(TF)))
> and attribute((mode(TC))) should be correct, I assume that this patch is just
> to make the types explicit be with _Float128 (for better readability and
> maintainance), but not for any correctness issues.
Yes, the patch is mainly for clarity. The history is the libgcc support went
in before _Float128 went in, and I never went back to use those types when we
could use them.
With _Float128, we can just use _Complex _Float128 and not
bother with trying to get the right KC/TC for the attribute mode stuff.
However, if patches 1-3 aren't put in, just applying the patch to use _Float128
and _Complex _Float128 would fix the immediate problem (of not building GCC on
systems with IEEE 128-bit long double). However, it is a band-aid that just
works around the problem of building __mulkc3 and __divkc3. It doesn't fix the
other problems between __float128 and _Float128 that show up in some places
that I would like to get fixed.
So I haven't submitted the patch, because I think it is more important to get
the other issues fixed.
> > Now, this patch fixes the specific problem of not being able to build libgcc
> > (along with patch #1 of the series). But other things show the differences
> > from time time because we are using different internal types and the middle end
> > doesn't know that these types are really the same bits.
> >
> > It is better long term (IMHO) if we have the two types (__float128 and
> > _Float128) use the same internal type (which is what is done in patches #2 and
> > #3). This fixes the other issues that show up, such as creating signaling NaNs
> > for one internal type, and converting it to the other internal type, loses that
> > the NaN is signalling.
> >
>
> I see, nice!
>
> BR,
> Kewen
--
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com
next prev parent reply other threads:[~2022-12-13 6:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 2:39 Patch [0/3] for PR target/107299 (GCC does not build on PowerPC when long double is IEEE 128-bit) Michael Meissner
2022-11-02 2:40 ` [PATCH 1/3] Rework 128-bit complex multiply and divide, PR target/107299 Michael Meissner
2022-11-07 15:41 ` Ping: " Michael Meissner
2022-11-29 17:43 ` Ping #2: " Michael Meissner
2022-12-02 17:58 ` Ping #3: " Michael Meissner
2022-12-06 9:36 ` Kewen.Lin
2022-12-07 6:44 ` Michael Meissner
2022-12-07 7:55 ` Kewen.Lin
2022-12-08 22:04 ` Michael Meissner
2022-12-12 10:20 ` Kewen.Lin
2022-12-13 6:14 ` Michael Meissner [this message]
2022-12-13 13:51 ` Segher Boessenkool
2022-12-14 8:45 ` Kewen.Lin
2022-12-13 6:23 ` Michael Meissner
2022-11-02 2:42 ` [PATCH 2/3] Make __float128 use the _Float128 type, " Michael Meissner
2022-11-07 15:43 ` Ping: " Michael Meissner
2022-11-29 17:44 ` Michael Meissner
2022-12-02 18:01 ` Ping #3: " Michael Meissner
2022-12-06 11:27 ` Kewen.Lin
2022-12-14 8:46 ` Kewen.Lin
2022-12-14 9:36 ` Jakub Jelinek
2022-12-14 10:11 ` Kewen.Lin
2022-12-14 10:33 ` Jakub Jelinek
2022-12-15 7:54 ` Kewen.Lin
2022-12-15 7:45 ` Kewen.Lin
2022-12-15 18:28 ` Joseph Myers
2022-12-15 18:49 ` Segher Boessenkool
2022-12-15 18:56 ` Jakub Jelinek
2022-12-15 20:26 ` Segher Boessenkool
2022-12-15 17:59 ` Segher Boessenkool
2022-12-16 0:09 ` Michael Meissner
2022-12-16 17:55 ` Segher Boessenkool
2022-12-16 21:53 ` Michael Meissner
2023-01-11 20:24 ` Michael Meissner
2022-11-02 2:44 ` [PATCH 3/3] Update float 128-bit conversions, " Michael Meissner
2022-11-07 15:44 ` Ping: " Michael Meissner
2022-11-29 17:46 ` Ping #3: " Michael Meissner
2022-12-02 18:04 ` Michael Meissner
2022-12-06 14:56 ` Patch [0/3] for PR target/107299 (GCC does not build on PowerPC when long double is IEEE 128-bit) Segher Boessenkool
2022-12-06 15:03 ` Jakub Jelinek
2022-12-13 14:11 ` Segher Boessenkool
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=Y5gYTxjXv5z0fszk@toto.the-meissners.org \
--to=meissner@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=segher@kernel.crashing.org \
--cc=seurer@gcc.gnu.org \
--cc=will_schmidt@vnet.ibm.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).