On Mon, 2017-11-20 at 11:23 -0600, Segher Boessenkool wrote:
> Hi!
> 
> On Fri, Nov 17, 2017 at 11:30:27AM -0600, Will Schmidt wrote:
> > [testsuite]
> >     * fold-vec-neg-int.c: Specify -mcpu=power8
> 
> Dot at end of sentence (quite a few times), please.
> 
> > -/* { dg-final { scan-assembler-times "vspltisw|vxor" 1 } } */
> > +//# Power9 added xxspltib instruction.
> > +/* { dg-final { scan-assembler-times "vspltisw|vxor|xxspltib" 1 } } */
> 
> That's not the usual comment style (and it won't work with all compiler
> settings).  But does this comment bring any value?  Just leave it out?

In the grand scheme, no.  mostly useful while sifting out the changes in
my sandbox.  I'll cut those.

> > --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-abs-int-fwrapv.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-abs-int-fwrapv.c
> > @@ -1,11 +1,11 @@
> >  /* Verify that overloaded built-ins for vec_abs with int
> >     inputs produce the right results.  */
> >  
> >  /* { dg-do compile } */
> >  /* { dg-require-effective-target powerpc_altivec_ok } */
> > -/* { dg-options "-maltivec -O2 -fwrapv" } */
> > +/* { dg-options "-maltivec -O2 -fwrapv -mcpu=power8" } */
> 
> Is this testcase really testing something specific to power8 codegen?

Yes, in contrast to power9 codegen.

for example in this case
power8 gens:
/* { dg-final { scan-assembler-times "vspltisw|vxor" 1 } } */
/* { dg-final { scan-assembler-times "vsubuwm" 1 } } */
/* { dg-final { scan-assembler-times "vmaxsw" 1 } } */
power9 gens:
+/* { dg-final { scan-assembler-times "vnegw" 1 } } */

> Making all these testcases use -mcpu=power8 means they won't be
tested 
> with any other settings.  (Also, does that work if the user puts another
> -mcpu= in RUNTESTFLAGS).

possibly not.  I did (do?) have a do-not-override option in place
initially for a couple of the tests, but didn't seem to need it during
my sniff-testing.    I can try a few runs with manually specifying -mcpu
flags and revisit. 
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" }
{ "-mcpu=power8" } } */

> I'm all for making the testresults cleaner, but let's not do that by
> (effectively) disabling all failing tests ;-)

No, thats really not my intent here.  I'm not really convinced thats
what I've done here either.   I've added .p9 versions for most of what
I've touched, with the intent to continue to have good coverage.
Adding the -mcpu=foo option to dg-options shouldn't be disabling the
test..?

I see no -mcpu=power8-or-earlier option.  :-/

I'll need a suggestion or two on how to do some of these differently.

> (Please split this up a bit when you repost it btw).

Ok.

> 
> Segher
> 


Reply via email to