diff mbox series

[gcc-7,backport,rs6000/PR84388] fix fold-vec-mult-int128 testcases

Message ID 1518648476.11602.343.camel@brimstone.rchland.ibm.com
State New
Headers show
Series [gcc-7,backport,rs6000/PR84388] fix fold-vec-mult-int128 testcases | expand

Commit Message

will schmidt Feb. 14, 2018, 10:47 p.m. UTC
Hi, 
  This backports some testcase fixes to the gcc7 branch.  The testcases 
touched here would now match their gcc-trunk equivalents.

OK for gcc-7 ?

Thanks,
-Will

[testsuite]

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

        PR target/84388
	* gcc.target/powerpc/fold-vec-mult-int128-p8.c: Update dg-options
	and scan-assembler stanzas.
	* gcc.target/powerpc/fold-vec-mult-int128-p9.c: Same.

Comments

Peter Bergner Feb. 14, 2018, 11:02 p.m. UTC | #1
On 2/14/18 4:47 PM, Will Schmidt wrote:
> -/* { dg-options "-maltivec -mvsx -mpower8-vector" } */
> +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */

[snip]

> -/* { dg-options "-maltivec -mvsx -mcpu=power9 -O2" } */
> +/* { dg-options "-mpower9-vector -mcpu=power9 -O2" } */

As we discussed offline, I don't know why we need -mpower[89]-vector
in dg-options if we're already specifying -mcpu=power[89].
Those are both implied by the -mcpu=power[89] options.

Peter
Segher Boessenkool Feb. 14, 2018, 11:32 p.m. UTC | #2
On Wed, Feb 14, 2018 at 04:47:56PM -0600, Will Schmidt wrote:
>   This backports some testcase fixes to the gcc7 branch.  The testcases 
> touched here would now match their gcc-trunk equivalents.
> 
> OK for gcc-7 ?

Sure, thanks!  But see other thread...


Segher


> 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
> 
>         PR target/84388
> 	* gcc.target/powerpc/fold-vec-mult-int128-p8.c: Update dg-options
> 	and scan-assembler stanzas.
> 	* gcc.target/powerpc/fold-vec-mult-int128-p9.c: Same.
Segher Boessenkool Feb. 14, 2018, 11:36 p.m. UTC | #3
On Wed, Feb 14, 2018 at 05:02:19PM -0600, Peter Bergner wrote:
> On 2/14/18 4:47 PM, Will Schmidt wrote:
> > -/* { dg-options "-maltivec -mvsx -mpower8-vector" } */
> > +/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */
> 
> [snip]
> 
> > -/* { dg-options "-maltivec -mvsx -mcpu=power9 -O2" } */
> > +/* { dg-options "-mpower9-vector -mcpu=power9 -O2" } */
> 
> As we discussed offline, I don't know why we need -mpower[89]-vector
> in dg-options if we're already specifying -mcpu=power[89].
> Those are both implied by the -mcpu=power[89] options.

Yes, or the other way around.  -mcpu= has the advantage that it fixes
more variables (scheduling model, potentially some instruction selection,
etc.; -mpower9-vector has the advantage that you do not need the skip-if-
some-other-cpu-is-already-set dance.  Will, your choice.

If you want to change it, please first do so on trunk.


Segher
diff mbox series

Patch

Index: fold-vec-mult-int128-p8.c
===================================================================
--- fold-vec-mult-int128-p8.c	(revision 257672)
+++ fold-vec-mult-int128-p8.c	(working copy)
@@ -4,7 +4,9 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
 /* { dg-require-effective-target int128 } */
-/* { dg-options "-maltivec -mvsx -mpower8-vector" } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mpower8-vector -mcpu=power8 -O2" } */
 /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */
 
 #include "altivec.h"
@@ -21,5 +23,5 @@ 
   return vec_mul (x, y);
 }
 
-/* { dg-final { scan-assembler-times "\[ \t\]mulld " 6 } } */
-/* { dg-final { scan-assembler-times "\[ \t\]mulhdu" 2 } } */
+/* { dg-final { scan-assembler-times {\mmulld\M} 6 } } */
+/* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */
Index: fold-vec-mult-int128-p9.c
===================================================================
--- fold-vec-mult-int128-p9.c	(revision 257672)
+++ fold-vec-mult-int128-p9.c	(working copy)
@@ -2,10 +2,10 @@ 
    inputs produce the right results.  */
 
 /* { dg-do compile } */
-/* { dg-require-effective-target powerpc_float128_hw_ok } */
+/* { dg-require-effective-target powerpc_p9vector_ok } */
 /* { dg-require-effective-target int128 } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
-/* { dg-options "-maltivec -mvsx -mcpu=power9 -O2" } */
+/* { dg-options "-mpower9-vector -mcpu=power9 -O2" } */
 /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */
 
 #include "altivec.h"
@@ -22,4 +22,5 @@ 
   return vec_mul (x, y);
 }
 
-/* { dg-final { scan-assembler-times "\[ \t\]xsmulqp" 2 } } */
+/* { dg-final { scan-assembler-times {\mmulld\M} 4 } } */
+/* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */