public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] [testsuite] require sqrt_insn effective target where needed Date: Sun, 28 Apr 2024 05:22:13 +0000 (GMT) [thread overview] Message-ID: <20240428052213.C7DE53858CD1@sourceware.org> (raw) https://gcc.gnu.org/g:df1330158bb0926d6af9a3d115dd63a931a3006d commit df1330158bb0926d6af9a3d115dd63a931a3006d Author: Alexandre Oliva <oliva@adacore.com> Date: Mon Apr 22 01:12:55 2024 -0300 [testsuite] require sqrt_insn effective target where needed 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. Diff: --- gcc/testsuite/gcc.dg/cdce3.c | 3 ++- gcc/testsuite/gcc.target/powerpc/pr46728-10.c | 2 +- gcc/testsuite/gcc.target/powerpc/pr46728-11.c | 2 +- gcc/testsuite/gcc.target/powerpc/pr46728-13.c | 2 +- gcc/testsuite/gcc.target/powerpc/pr46728-14.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/gcc.dg/cdce3.c b/gcc/testsuite/gcc.dg/cdce3.c index 601ddf055fd..f759a95972e 100644 --- a/gcc/testsuite/gcc.dg/cdce3.c +++ b/gcc/testsuite/gcc.dg/cdce3.c @@ -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-*-* } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-10.c b/gcc/testsuite/gcc.target/powerpc/pr46728-10.c index 3be4728d333..c04a3101c11 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr46728-10.c +++ b/gcc/testsuite/gcc.target/powerpc/pr46728-10.c @@ -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> diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-11.c b/gcc/testsuite/gcc.target/powerpc/pr46728-11.c index 43b6728a4b8..d0e3d602121 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr46728-11.c +++ b/gcc/testsuite/gcc.target/powerpc/pr46728-11.c @@ -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> diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-13.c b/gcc/testsuite/gcc.target/powerpc/pr46728-13.c index b9fd63973b7..2b9df737a9b 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr46728-13.c +++ b/gcc/testsuite/gcc.target/powerpc/pr46728-13.c @@ -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> diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-14.c b/gcc/testsuite/gcc.target/powerpc/pr46728-14.c index 5affff13bdb..e6836f515e4 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr46728-14.c +++ b/gcc/testsuite/gcc.target/powerpc/pr46728-14.c @@ -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>
next reply other threads:[~2024-04-28 5:22 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-28 5:22 Alexandre Oliva [this message] -- strict thread matches above, loose matches on Subject: below -- 2024-04-23 2:38 Alexandre Oliva 2024-04-22 6:57 Alexandre Oliva 2024-04-22 5:13 Alexandre Oliva
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=20240428052213.C7DE53858CD1@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).