From: Michael Meissner <meissner@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Michael Meissner <meissner@linux.ibm.com>,
gcc-patches@gcc.gnu.org, David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>,
Will Schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH 1/3] Add IEEE 128-bit min/max support on PowerPC.
Date: Thu, 17 Jun 2021 15:18:48 -0400 [thread overview]
Message-ID: <20210617191848.GA30801@ibm-toto.the-meissners.org> (raw)
In-Reply-To: <20210617173903.GP5077@gate.crashing.org>
On Thu, Jun 17, 2021 at 12:39:04PM -0500, Segher Boessenkool wrote:
> On Tue, Jun 08, 2021 at 08:21:25PM -0400, Michael Meissner wrote:
> > GCC will not convert ternary operations into using min/max instructions
> > provided in this patch unless the user uses -Ofast or similar switches due to
> > issues with NaNs.
>
> It will not do it because it is *incorrect* to do :-)
>
> (The RTL operators smin/smax are undefined for any NaN inputs (unless
> both are the same bit pattern), and for different sign zeroes; it isn't
> only NaNs even).
>
> > gcc/
> > 2021-06-08 Michael Meissner <meissner@linux.ibm.com>
> >
> > * config/rs6000/rs6000.c (rs6000_emit_minmax): Add support for ISA
> > 3.1 IEEE 128-bit floating point xsmaxcqp and xsmincqp
> > instructions.
>
> Please don't randomly break lines.
>
> > --- a/gcc/config/rs6000/rs6000.c
> > +++ b/gcc/config/rs6000/rs6000.c
> > @@ -16103,7 +16103,8 @@ rs6000_emit_minmax (rtx dest, enum rtx_code code, rtx op0, rtx op1)
> > /* VSX/altivec have direct min/max insns. */
> > if ((code == SMAX || code == SMIN)
> > && (VECTOR_UNIT_ALTIVEC_OR_VSX_P (mode)
> > - || (mode == SFmode && VECTOR_UNIT_VSX_P (DFmode))))
> > + || (mode == SFmode && VECTOR_UNIT_VSX_P (DFmode))
> > + || (TARGET_POWER10 && TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode))))
>
> The actual insns only check TARGET_POWER10 (so no TARGET_FLOAT128_HW).
> Which is right, this or that?
It should include TARGET_FLOAT128_HW. The problem area is a power10 running in
big endian mode and running 32-bit code. Because we don't have TImode, we
can't enable the IEEE 128-bit hardware instructions. And because we don't have
GLIBC support, we don't enable the FLOAT128 stuff by default on big endian.
> > +/* { dg-require-effective-target ppc_float128_hw } */
> > +/* { dg-require-effective-target power10_ok } */
> > +/* { dg-options "-mdejagnu-cpu=power10 -O2 -ffast-math" } */
>
> In testcases we can assume that float128_hw is set whenever we have a
> p10; we don't manually disable it to make live hard for ourselves ;-)
Again, I put it in case somebody builds a BE power10 compiler.
> We could disallow disabling QP float separately from all other float.
> We will still need to test if float is enabled at all so it won't help
> all that much immediately, alas.
>
> With that TARGET_POWER10 condition fixed: okay for trunk, and for 11
> once it is tested for trunk on all systems. Thanks!
Thanks.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797
next prev parent reply other threads:[~2021-06-17 19:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 0:17 [PATCH 0/3] Add Power10 IEEE 128-bit min, max, conditional move Michael Meissner
2021-06-09 0:21 ` [PATCH 1/3] Add IEEE 128-bit min/max support on PowerPC Michael Meissner
2021-06-17 0:32 ` Ping: " Michael Meissner
2021-06-17 17:39 ` Segher Boessenkool
2021-06-17 19:18 ` Michael Meissner [this message]
2021-06-23 23:56 ` Segher Boessenkool
2021-06-28 19:00 ` Michael Meissner
2021-06-30 17:35 ` Segher Boessenkool
2021-06-09 0:22 ` [PATCH 2/3] Fix IEEE 128-bit min/max test Michael Meissner
2021-06-17 0:33 ` Ping: " Michael Meissner
2021-06-17 18:11 ` Segher Boessenkool
2021-06-17 19:24 ` Michael Meissner
2021-06-17 20:11 ` Michael Meissner
2021-06-25 17:46 ` Segher Boessenkool
2021-06-28 18:41 ` Michael Meissner
2021-06-17 22:56 ` [PATCH 2/3 V2] " Michael Meissner
2021-06-23 19:08 ` Ping: " Michael Meissner
2021-06-23 19:20 ` Michael Meissner
2021-06-30 0:06 ` Segher Boessenkool
2021-06-30 16:25 ` Michael Meissner
2021-06-09 0:24 ` [PATCH 3/3] Add IEEE 128-bit fp conditional move on PowerPC Michael Meissner
2021-06-17 0:34 ` Ping: " Michael Meissner
2021-06-23 19:09 ` Michael Meissner
2021-06-30 19:07 ` 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=20210617191848.GA30801@ibm-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=segher@kernel.crashing.org \
--cc=will_schmidt@vnet.ibm.com \
--cc=wschmidt@linux.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).