diff mbox series

ppc: testsuite: bfp: enable float128 for __ieee128

Message ID orlew8tu1x.fsf_-_@lxoliva.fsfla.org
State New
Headers show
Series ppc: testsuite: bfp: enable float128 for __ieee128 | expand

Commit Message

Alexandre Oliva April 13, 2022, 11:58 p.m. UTC
Multiple bfp tests expect -mcpu=power[89] to enable the __ieee128
type, but on targets that #define TARGET_FLOAT128_ENABLE_TYPE 0, that
is not the case.  Since they are compile-time tests and effective
target support for powerpc_p9vector_ok is required, adding -mfloat128
is safe.  This patch does so, and arranges for the warning raised on
such systems to be pruned.

Tested on x86_64-linux-gnu x ppc64-vx7r2 with gcc-11.  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.target/powerpc/bfp/scalar-extract-exp-3.c: Add -mfloat128,
	prune warning.
	* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-3.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-6.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-insert-exp-9.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-data-class-10.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-data-class-8.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-data-class-9.c: Likewise.
	* gcc.target/powerpc/bfp/scalar-test-neg-4.c: Likewise.
---
 .../gcc.target/powerpc/bfp/scalar-extract-exp-3.c  |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-extract-exp-4.c  |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-extract-sig-3.c  |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-extract-sig-4.c  |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-insert-exp-10.c  |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-insert-exp-6.c   |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-insert-exp-7.c   |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-insert-exp-9.c   |    3 ++-
 .../powerpc/bfp/scalar-test-data-class-10.c        |    3 ++-
 .../powerpc/bfp/scalar-test-data-class-8.c         |    3 ++-
 .../powerpc/bfp/scalar-test-data-class-9.c         |    3 ++-
 .../gcc.target/powerpc/bfp/scalar-test-neg-4.c     |    3 ++-
 12 files changed, 24 insertions(+), 12 deletions(-)

Comments

Segher Boessenkool April 14, 2022, 4:12 p.m. UTC | #1
On Wed, Apr 13, 2022 at 08:58:18PM -0300, Alexandre Oliva wrote:
> 
> Multiple bfp tests expect -mcpu=power[89] to enable the __ieee128
> type, but on targets that #define TARGET_FLOAT128_ENABLE_TYPE 0, that
> is not the case.  Since they are compile-time tests and effective
> target support for powerpc_p9vector_ok is required, adding -mfloat128
> is safe.  This patch does so, and arranges for the warning raised on
> such systems to be pruned.
> 
> Tested on x86_64-linux-gnu x ppc64-vx7r2 with gcc-11.  Ok to install?

Not okay.  We rely everywhere else on -mcpu=power9 (etc.) to enable VSX
just as well.

You should not change such defaults for your platform.


Segher
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-3.c
index 8ddf87cfc8693..4c5615662c917 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-3.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
index 850ff6204900d..1b03967ed8d2c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8" } */
+/* { dg-options "-mdejagnu-cpu=power8 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-3.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-3.c
index 3225a557f84ba..2c459ad808fb0 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-3.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
index 32a53c6fffd7e..e8bb856c91736 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8" } */
+/* { dg-options "-mdejagnu-cpu=power8 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
index 769d3b0546a6b..e0ed3b8a5e9a0 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8" } */
+/* { dg-options "-mdejagnu-cpu=power8 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-6.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-6.c
index f81dff4e1adc5..8087846ecc7ed 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-6.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
index 2e03e15d02542..95dd65a03ec6c 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power8" } */
+/* { dg-options "-mdejagnu-cpu=power8 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-9.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-9.c
index 209f82dd79967..d577428470234 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-9.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-9.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 /* This test should succeed only on 64-bit configurations.  */
 #include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c
index fcf6a9dca79d7..450dfb45bb44a 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-10.c
@@ -3,7 +3,8 @@ 
    target produces different error message.  */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 #include <altivec.h>
 #include <stdbool.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-8.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-8.c
index a9e107a816cfa..94cb060f97541 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-8.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-8.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 #include <altivec.h>
 #include <stdbool.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c
index f87851c2c5f29..030df40d6df0b 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-9.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 #include <altivec.h>
 #include <stdbool.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-4.c
index 4a3f25e7f6349..adf9a0f353bfe 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-4.c
@@ -1,7 +1,8 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-require-effective-target lp64 } */
 /* { dg-require-effective-target powerpc_p9vector_ok } */
-/* { dg-options "-mdejagnu-cpu=power9" } */
+/* { dg-options "-mdejagnu-cpu=power9 -mfloat128" } */
+/* { dg-prune-output ".-mfloat128. option may not be fully supported" } */
 
 #include <altivec.h>
 #include <stdbool.h>