]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[testsuite] require sqrt_insn effective target where needed
authorAlexandre Oliva <oliva@adacore.com>
Sun, 28 Apr 2024 07:30:30 +0000 (04:30 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Sun, 28 Apr 2024 07:33:25 +0000 (04:33 -0300)
Some tests fail on ppc and ppc64 when testing a compiler [with options
for] for a CPU [emulator] that doesn't support the sqrt insn.

The gcc.dg/cdce3.c is one in which the expected shrink-wrap
optimization only takes place when the target CPU supports a sqrt
insn.

The gcc.target/powerpc/pr46728-1[0-4].c tests use -mpowerpc-gpopt and
call sqrt(), which involves the sqrt insn that the target CPU under
test may not support.

Require a sqrt_insn effective target for all the affected tests.

for  gcc/testsuite/ChangeLog

* gcc.dg/cdce3.c: Require sqrt_insn effective target.
* gcc.target/powerpc/pr46728-10.c: Likewise.  Drop darwin
explicit skipping.
* gcc.target/powerpc/pr46728-11.c: Likewise.  Likewise.
* gcc.target/powerpc/pr46728-13.c: Likewise.  Likewise.
* gcc.target/powerpc/pr46728-14.c: Likewise.  Likewise.

gcc/testsuite/gcc.dg/cdce3.c
gcc/testsuite/gcc.target/powerpc/pr46728-10.c
gcc/testsuite/gcc.target/powerpc/pr46728-11.c
gcc/testsuite/gcc.target/powerpc/pr46728-13.c
gcc/testsuite/gcc.target/powerpc/pr46728-14.c

index 601ddf055fd7186aa7dff497ddecbae12728c107..f759a95972e8b522c80c896a8d8d677d509e4527 100644 (file)
@@ -1,7 +1,8 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target hard_float } */
+/* { dg-require-effective-target sqrt_insn } */
 /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -fdump-tree-optimized" } */
-/* { dg-final { scan-tree-dump "cdce3.c:11: \[^\n\r]* function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-final { scan-tree-dump "cdce3.c:12: \[^\n\r]* function call is shrink-wrapped into error conditions\." "cdce" } } */
 /* { dg-final { scan-tree-dump "sqrtf \\(\[^\n\r]*\\); \\\[tail call\\\]" "optimized" } } */
 /* { dg-skip-if "doesn't have a sqrtf insn" { mmix-*-* } } */
 
index 3be4728d333a427d21034e6d01415f1243d74297..c04a3101c113f12f0b585ffd175ac243999888a8 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
-/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-require-effective-target sqrt_insn } */
 
 #include <math.h>
 
index 43b6728a4b8123d15174067b33098eb43c1b9282..d0e3d60212194b8358413804d5d461bc913ed03d 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
-/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-require-effective-target sqrt_insn } */
 
 #include <math.h>
 
index b9fd63973b7281a530b74ff971176ef2360b13fe..2b9df737a9b0d0ab79a148e7d2fb951a7c5bb97d 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
-/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-require-effective-target sqrt_insn } */
 
 #include <math.h>
 
index 5affff13bdb6c7f8cc5ba1f0d0b3c30507397e1b..e6836f515e4f81787aa1ea6a6bb06a809c3e224c 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do run } */
-/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-require-effective-target sqrt_insn } */
 
 #include <math.h>