From: Michael Meissner <meissner@linux.ibm.com>
To: Michael Meissner <meissner@linux.ibm.com>,
gcc-patches@gcc.gnu.org,
Segher Boessenkool <segher@kernel.crashing.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: [PATCH 2/3] Fix IEEE 128-bit min/max test.
Date: Tue, 8 Jun 2021 20:22:40 -0400 [thread overview]
Message-ID: <20210609002240.GB18854@ibm-toto.the-meissners.org> (raw)
In-Reply-To: <20210609001744.GA16932@ibm-toto.the-meissners.org>
[PATCH 2/3] Fix IEEE 128-bit min/max test.
This patch fixes the float128-minmax.c test so that it can accommodate the
generation of xsmincqp and xsmaxcqp instructions on power10. I changed
the effective target from 'float128' to 'ppc_float128_hw', since this
needs the IEEE 128-bit float hardware support.
I tested it on 3 platforms:
* Power9 little endian, --with-code=power9;
* Power8 big endian, --with-code=power8, both 32/64-bit tests done;
* Power10 little endian, --with-code=power10.
All systems bootstrapped and there were no new regressions. I believe I have
addressed the issues with the last patch.
Can I check this into the master branch, and after a soak-in period, back port
it to the GCC 11 branch?
gcc/testsuite/
2021-06-08 Michael Meissner <meissner@linux.ibm.com>
* gcc.target/powerpc/float128-minmax.c: Adjust expected code for
power10.
* lib/target-supports.exp (check_effective_target_has_arch_pwr10):
New target support.
---
gcc/testsuite/gcc.target/powerpc/float128-minmax.c | 8 +++++---
gcc/testsuite/lib/target-supports.exp | 10 ++++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/gcc.target/powerpc/float128-minmax.c b/gcc/testsuite/gcc.target/powerpc/float128-minmax.c
index fe397518f2f..a7d3a3a0b3e 100644
--- a/gcc/testsuite/gcc.target/powerpc/float128-minmax.c
+++ b/gcc/testsuite/gcc.target/powerpc/float128-minmax.c
@@ -1,6 +1,5 @@
-/* { dg-do compile { target lp64 } } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-require-effective-target float128 } */
+/* { dg-require-effective-target ppc_float128_hw } */
/* { dg-options "-mpower9-vector -O2 -ffast-math" } */
#ifndef TYPE
@@ -12,5 +11,8 @@
TYPE f128_min (TYPE a, TYPE b) { return __builtin_fminf128 (a, b); }
TYPE f128_max (TYPE a, TYPE b) { return __builtin_fmaxf128 (a, b); }
-/* { dg-final { scan-assembler {\mxscmpuqp\M} } } */
+/* Adjust code power10 which has native min/max instructions. */
+/* { dg-final { scan-assembler {\mxscmpuqp\M} { target { ! has_arch_pwr10 } } } } */
+/* { dg-final { scan-assembler {\mxsmincqp\M} { target { has_arch_pwr10 } } } } */
+/* { dg-final { scan-assembler {\mxsmaxcqp\M} { target { has_arch_pwr10 } } } } */
/* { dg-final { scan-assembler-not {\mbl\M} } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 7f78c5593ac..789723fb287 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6127,6 +6127,16 @@ proc check_effective_target_has_arch_pwr9 { } {
}]
}
+proc check_effective_target_has_arch_pwr10 { } {
+ return [check_no_compiler_messages arch_pwr10 assembly {
+ #ifndef _ARCH_PWR10
+ #error does not have power10 support.
+ #else
+ /* "has power10 support" */
+ #endif
+ }]
+}
+
# Return 1 if this is a PowerPC target supporting -mcpu=power10.
# Limit this to 64-bit linux systems for now until other targets support
# power10.
--
2.31.1
--
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-09 0:22 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
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 ` Michael Meissner [this message]
2021-06-17 0:33 ` Ping: [PATCH 2/3] Fix IEEE 128-bit min/max test 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=20210609002240.GB18854@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).