public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target
@ 2018-02-07 17:16 Will Schmidt
  2018-02-07 18:29 ` Segher Boessenkool
  2018-02-09 15:44 ` [PATCH, rs6000] (v2) Update vsx-vector-6-le.c tests Will Schmidt
  0 siblings, 2 replies; 7+ messages in thread
From: Will Schmidt @ 2018-02-07 17:16 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, David Edelsohn, Bill Schmidt

Hi,
Noted during review of test results on P9.   Due to changes and improvements,
our codegen is different for this test on power9.
Modified the existing test to target P8, and added a P9 variant with updated
counts.
    
Sniff-tested, now runs clean on P9.  OK for trunk?

Thanks,
-Will
    
[testsuite]

2018-02-07  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/vsx-vector-6-le.c:  Update CPU target.
	* gcc.target/powerpc/vsx-vector-6-le.p9.c:  New.

diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
index ddb0089..7fe691b 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
@@ -1,11 +1,11 @@
 /* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-mvsx -O2" } */
+/* { dg-options "-mvsx -O2 -mcpu=power8" } */
 
-/* Expected instruction counts for Little Endian */
+/* Expected instruction counts for Little Endian targeting Power8. */
 
 /* { dg-final { scan-assembler-times "xvabsdp" 1 } } */
 /* { dg-final { scan-assembler-times "xvadddp" 1 } } */
 /* { dg-final { scan-assembler-times "xxlnor" 8 } } */
 /* { dg-final { scan-assembler-times "xxlor" 30 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
new file mode 100644
index 0000000..450cd52
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mvsx -O2 -mcpu=power9" } */
+
+/* Expected instruction counts for Little Endian targeting Power9. */
+
+/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvadddp" 1 } } */
+/* { dg-final { scan-assembler-times "xxlnor" 7 } } */
+/* { dg-final { scan-assembler-times "xxlor" 20 } } */
+/* { dg-final { scan-assembler-times "xvcmpeqdp" 5 } } */
+/* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */
+/* { dg-final { scan-assembler-times "xvcmpgedp" 8 } } */
+/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */
+/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */
+/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmindp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */
+/* { dg-final { scan-assembler-times "vperm" 1 } } */
+/* { dg-final { scan-assembler-times "xvrdpic" 1 } } */
+/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */
+/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */
+/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */
+/* { dg-final { scan-assembler-times "vmsumshs" 1 } } */
+/* { dg-final { scan-assembler-times "xxland" 13 } } */
+
+/* Source code for the test in vsx-vector-6.h */
+#include "vsx-vector-6.h"


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

* Re: [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target
  2018-02-07 17:16 [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target Will Schmidt
@ 2018-02-07 18:29 ` Segher Boessenkool
  2018-02-07 23:23   ` Will Schmidt
  2018-02-09 15:46   ` Will Schmidt
  2018-02-09 15:44 ` [PATCH, rs6000] (v2) Update vsx-vector-6-le.c tests Will Schmidt
  1 sibling, 2 replies; 7+ messages in thread
From: Segher Boessenkool @ 2018-02-07 18:29 UTC (permalink / raw)
  To: Will Schmidt; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

Hi!

On Wed, Feb 07, 2018 at 11:16:12AM -0600, Will Schmidt wrote:
> Noted during review of test results on P9.   Due to changes and improvements,
> our codegen is different for this test on power9.
> Modified the existing test to target P8, and added a P9 variant with updated
> counts.

> diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> index ddb0089..7fe691b 100644
> --- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> @@ -1,11 +1,11 @@
>  /* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
>  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
>  /* { dg-require-effective-target powerpc_vsx_ok } */
> -/* { dg-options "-mvsx -O2" } */
> +/* { dg-options "-mvsx -O2 -mcpu=power8" } */

Why not -mcpu=power7?  And you'll need

/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */

You could also do instead

/* { dg-skip-if "this is not for p9" { powerpc_p9vector_ok } } */

or something like that; a bit neater.

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
> @@ -0,0 +1,32 @@
> +/* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
> +/* { dg-skip-if "" { powerpc*-*-darwin* } } */
> +/* { dg-require-effective-target powerpc_p9vector_ok } */
> +/* { dg-options "-mvsx -O2 -mcpu=power9" } */

This needs the "do not override -mcpu" thing as well.


Segher

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

* Re: [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target
  2018-02-07 18:29 ` Segher Boessenkool
@ 2018-02-07 23:23   ` Will Schmidt
  2018-02-07 23:35     ` Segher Boessenkool
  2018-02-09 15:46   ` Will Schmidt
  1 sibling, 1 reply; 7+ messages in thread
From: Will Schmidt @ 2018-02-07 23:23 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

On Wed, 2018-02-07 at 12:28 -0600, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, Feb 07, 2018 at 11:16:12AM -0600, Will Schmidt wrote:
> > Noted during review of test results on P9.   Due to changes and improvements,
> > our codegen is different for this test on power9.
> > Modified the existing test to target P8, and added a P9 variant with updated
> > counts.
> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> > index ddb0089..7fe691b 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> > @@ -1,11 +1,11 @@
> >  /* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
> >  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
> >  /* { dg-require-effective-target powerpc_vsx_ok } */
> > -/* { dg-options "-mvsx -O2" } */
> > +/* { dg-options "-mvsx -O2 -mcpu=power8" } */
> 
> Why not -mcpu=power7?  And you'll need

My default answer on that one is "power7 + le = nope". :-)
I can be convinced otherwise if there are strong feelings, etc. 

> /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
> 
> You could also do instead
> 
> /* { dg-skip-if "this is not for p9" { powerpc_p9vector_ok } } */
> 
> or something like that; a bit neater.

ok.  I'll poke at this a bit, and will post (v2) for this once it's
ready.

> 
> > --- /dev/null
> > +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
> > @@ -0,0 +1,32 @@
> > +/* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
> > +/* { dg-skip-if "" { powerpc*-*-darwin* } } */
> > +/* { dg-require-effective-target powerpc_p9vector_ok } */
> > +/* { dg-options "-mvsx -O2 -mcpu=power9" } */
> 
> This needs the "do not override -mcpu" thing as well.

ok.

Thanks,
-Will

> 
> Segher
> 


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

* Re: [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target
  2018-02-07 23:23   ` Will Schmidt
@ 2018-02-07 23:35     ` Segher Boessenkool
  0 siblings, 0 replies; 7+ messages in thread
From: Segher Boessenkool @ 2018-02-07 23:35 UTC (permalink / raw)
  To: Will Schmidt; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

On Wed, Feb 07, 2018 at 05:23:31PM -0600, Will Schmidt wrote:
> > >  /* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
> > >  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
> > >  /* { dg-require-effective-target powerpc_vsx_ok } */
> > > -/* { dg-options "-mvsx -O2" } */
> > > +/* { dg-options "-mvsx -O2 -mcpu=power8" } */
> > 
> > Why not -mcpu=power7?  And you'll need
> 
> My default answer on that one is "power7 + le = nope". :-)
> I can be convinced otherwise if there are strong feelings, etc. 

No really strong feelings no.  But previously we ran this test on power7
(but the powerpc64le-* prevents that in reality) and now we don't anymore.


Segher

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

* [PATCH, rs6000] (v2) Update vsx-vector-6-le.c tests
  2018-02-07 17:16 [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target Will Schmidt
  2018-02-07 18:29 ` Segher Boessenkool
@ 2018-02-09 15:44 ` Will Schmidt
  2018-02-09 20:44   ` Segher Boessenkool
  1 sibling, 1 reply; 7+ messages in thread
From: Will Schmidt @ 2018-02-09 15:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, David Edelsohn, Bill Schmidt

Hi,
Noted during review of test results on P9.   Due to changes and improvements,
our codegen is different for this test on power9.
Modified the existing test to target P8 and added a P9 variant with updated
counts.

(v2) Updated/added dg-requires and dg-skip-if stanzas pre review and re-check
of the test results.
    
Sniff-tested good, now runs clean on P9 where it did not before. Runs clean on
P8LE, P8BE, P7.
OK for trunk?
    
Thanks,
-Will
    
[testsuite]

2018-02-09  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/vsx-vector-6-le.c:  Update dg-* stanzas.
	* gcc.target/powerpc/vsx-vector-6-le.p9.c:  New.

diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
index ddb0089..c3f795c 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
@@ -1,11 +1,12 @@
 /* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-mvsx -O2" } */
+/* { dg-options "-mvsx -O2 -mcpu=power8" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 
-/* Expected instruction counts for Little Endian */
+/* Expected instruction counts for Little Endian targeting Power8. */
 
 /* { dg-final { scan-assembler-times "xvabsdp" 1 } } */
 /* { dg-final { scan-assembler-times "xvadddp" 1 } } */
 /* { dg-final { scan-assembler-times "xxlnor" 8 } } */
 /* { dg-final { scan-assembler-times "xxlor" 30 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
new file mode 100644
index 0000000..290d4b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
@@ -0,0 +1,33 @@
+/* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
+/* { dg-options "-mvsx -O2 -mcpu=power9" } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
+
+/* Expected instruction counts for Little Endian targeting Power9. */
+
+/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvadddp" 1 } } */
+/* { dg-final { scan-assembler-times "xxlnor" 7 } } */
+/* { dg-final { scan-assembler-times "xxlor" 20 } } */
+/* { dg-final { scan-assembler-times "xvcmpeqdp" 5 } } */
+/* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */
+/* { dg-final { scan-assembler-times "xvcmpgedp" 8 } } */
+/* { dg-final { scan-assembler-times "xvrdpim" 1 } } */
+/* { dg-final { scan-assembler-times "xvmaddadp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmsubadp" 1 } } */
+/* { dg-final { scan-assembler-times "xvsubdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmindp" 1 } } */
+/* { dg-final { scan-assembler-times "xvmuldp" 1 } } */
+/* { dg-final { scan-assembler-times "vperm" 1 } } */
+/* { dg-final { scan-assembler-times "xvrdpic" 1 } } */
+/* { dg-final { scan-assembler-times "xvsqrtdp" 1 } } */
+/* { dg-final { scan-assembler-times "xvrdpiz" 1 } } */
+/* { dg-final { scan-assembler-times "xvmsubasp" 1 } } */
+/* { dg-final { scan-assembler-times "xvnmaddasp" 1 } } */
+/* { dg-final { scan-assembler-times "vmsumshs" 1 } } */
+/* { dg-final { scan-assembler-times "xxland" 13 } } */
+
+/* Source code for the test in vsx-vector-6.h */
+#include "vsx-vector-6.h"


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

* Re: [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target
  2018-02-07 18:29 ` Segher Boessenkool
  2018-02-07 23:23   ` Will Schmidt
@ 2018-02-09 15:46   ` Will Schmidt
  1 sibling, 0 replies; 7+ messages in thread
From: Will Schmidt @ 2018-02-09 15:46 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

On Wed, 2018-02-07 at 12:28 -0600, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, Feb 07, 2018 at 11:16:12AM -0600, Will Schmidt wrote:
> > Noted during review of test results on P9.   Due to changes and improvements,
> > our codegen is different for this test on power9.
> > Modified the existing test to target P8, and added a P9 variant with updated
> > counts.
> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> > index ddb0089..7fe691b 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c
> > @@ -1,11 +1,11 @@
> >  /* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
> >  /* { dg-skip-if "" { powerpc*-*-darwin* } } */
> >  /* { dg-require-effective-target powerpc_vsx_ok } */
> > -/* { dg-options "-mvsx -O2" } */
> > +/* { dg-options "-mvsx -O2 -mcpu=power8" } */
> 
> Why not -mcpu=power7?  And you'll need
> 
> /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
> 
> You could also do instead
> 
> /* { dg-skip-if "this is not for p9" { powerpc_p9vector_ok } } */
> 
> or something like that; a bit neater.

I did try that, it had the effect of disabling the test if the system
was able to generate P9 code, which included my p8 environment. :-)
Ended up specifying "do not overrides" for both tests.  (v2) has been
posted.

> 
> > --- /dev/null
> > +++ b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c
> > @@ -0,0 +1,32 @@
> > +/* { dg-do compile { target { powerpc64le-*-* && lp64 } } } */
> > +/* { dg-skip-if "" { powerpc*-*-darwin* } } */
> > +/* { dg-require-effective-target powerpc_p9vector_ok } */
> > +/* { dg-options "-mvsx -O2 -mcpu=power9" } */
> 
> This needs the "do not override -mcpu" thing as well.
> 
> 
> Segher
> 


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

* Re: [PATCH, rs6000] (v2) Update vsx-vector-6-le.c tests
  2018-02-09 15:44 ` [PATCH, rs6000] (v2) Update vsx-vector-6-le.c tests Will Schmidt
@ 2018-02-09 20:44   ` Segher Boessenkool
  0 siblings, 0 replies; 7+ messages in thread
From: Segher Boessenkool @ 2018-02-09 20:44 UTC (permalink / raw)
  To: Will Schmidt; +Cc: gcc-patches, David Edelsohn, Bill Schmidt

Hi Will,

On Fri, Feb 09, 2018 at 09:44:28AM -0600, Will Schmidt wrote:
> Noted during review of test results on P9.   Due to changes and improvements,
> our codegen is different for this test on power9.
> Modified the existing test to target P8 and added a P9 variant with updated
> counts.
> 
> (v2) Updated/added dg-requires and dg-skip-if stanzas pre review and re-check
> of the test results.
>     
> Sniff-tested good, now runs clean on P9 where it did not before. Runs clean on
> P8LE, P8BE, P7.
> OK for trunk?

Yes, thanks!


Segher


> 2018-02-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
> 
> 	* gcc.target/powerpc/vsx-vector-6-le.c:  Update dg-* stanzas.
> 	* gcc.target/powerpc/vsx-vector-6-le.p9.c:  New.

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

end of thread, other threads:[~2018-02-09 20:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 17:16 [PATCH, rs6000] Update vsx-vector-6-le.c tests for p9 target Will Schmidt
2018-02-07 18:29 ` Segher Boessenkool
2018-02-07 23:23   ` Will Schmidt
2018-02-07 23:35     ` Segher Boessenkool
2018-02-09 15:46   ` Will Schmidt
2018-02-09 15:44 ` [PATCH, rs6000] (v2) Update vsx-vector-6-le.c tests Will Schmidt
2018-02-09 20:44   ` 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).