public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Update pr88233.c test (pr91799)
@ 2021-01-14 21:25 will schmidt
  2021-01-15 23:41 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: will schmidt @ 2021-01-14 21:25 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, David Edelsohn

[PATCH, rs6000] Update pr88233.c test (pr91799)

Hi,

This is a follow-up fix to clean up pr91799.  Per review of test results,
it appears that the combination of target and dg-require stanzas is
not sufficient to properly limit the test to 64-bit only on darwin.

This adds additional clauses to limit the test to 64-bit environments, and
to configs that support at least power8 codegen.

Tested on power7 and power8 using assorted variations of
  make -k check-gcc-c "RUNTESTFLAGS=powerpc.exp=pr88233.c
  --target_board=unix/'{-mcpu=power7,-mcpu=power6,-mcpu=power8}''{-m32,-m64}'"

OK for trunk?

PR target/91799

2021-01-14  Will Schmidt <will_schmidt@vnet.ibm.com>

gcc/testsuite/ChangeLog:
	* gcc.target/powerpc/pr88233.c: Update dg-require stanzas.

diff --git a/gcc/testsuite/gcc.target/powerpc/pr88233.c b/gcc/testsuite/gcc.target/powerpc/pr88233.c
index 8e5f15b83b50..acea7a586867 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr88233.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr88233.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target lp64 } } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target has_arch_pwr8 } */
 /* { dg-options "-O2 -mdejagnu-cpu=power8" } */
 
 typedef struct { double a[2]; } A;
 A
 foo (const A *a)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, rs6000] Update pr88233.c test (pr91799)
  2021-01-14 21:25 [PATCH, rs6000] Update pr88233.c test (pr91799) will schmidt
@ 2021-01-15 23:41 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2021-01-15 23:41 UTC (permalink / raw)
  To: will schmidt; +Cc: gcc-patches, David Edelsohn

Hi!

On Thu, Jan 14, 2021 at 03:25:46PM -0600, will schmidt wrote:
> This is a follow-up fix to clean up pr91799.  Per review of test results,
> it appears that the combination of target and dg-require stanzas is
> not sufficient to properly limit the test to 64-bit only on darwin.
> 
> This adds additional clauses to limit the test to 64-bit environments, and
> to configs that support at least power8 codegen.

> --- a/gcc/testsuite/gcc.target/powerpc/pr88233.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr88233.c
> @@ -1,6 +1,7 @@
> -/* { dg-do compile { target lp64 } } */
> +/* { dg-require-effective-target lp64 } */

This is needed on at least some versions of dejagnu :-(

This part is approved, as obvious even, if you need to change this in
any other test as well, that is pre-approved.

> +/* { dg-require-effective-target has_arch_pwr8 } */
>  /* { dg-options "-O2 -mdejagnu-cpu=power8" } */

But this I do not see: it tests whether the host is power8, which isn't
right.  You might want powerpc_p8vector_ok instead?

(There is nothing in the testcase that requires p8, certainly not on LE,
but it may be generating different code when targetting older machines,
so who knows -- that -mcpu=power8 was there already, and it does require
testing an effective target).

Okay for trunk with this fixed one way or another.  Thanks!


Segher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-15 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 21:25 [PATCH, rs6000] Update pr88233.c test (pr91799) will schmidt
2021-01-15 23:41 ` Segher Boessenkool

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