public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work055)] Fix IEEE 128-bit min/max test.
@ 2021-06-08 23:37 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2021-06-08 23:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4742580186b2333b4a2f41c6b3bd43dd8ed4ace4

commit 4742580186b2333b4a2f41c6b3bd43dd8ed4ace4
Author: Michael Meissner <meissner@linux.ibm.com>
Date:   Tue Jun 8 19:37:17 2021 -0400

    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.
    
    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.

Diff:
---
 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-08 23:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 23:37 [gcc(refs/users/meissner/heads/work055)] Fix IEEE 128-bit min/max test Michael Meissner

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).