[PATCH, rs6000] testsuite fixup pr96139 tests

will schmidt will_schmidt@vnet.ibm.com
Fri Sep 11 19:55:03 GMT 2020


On Fri, 2020-09-11 at 12:37 -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Fri, Sep 11, 2020 at 09:44:54AM -0500, will schmidt wrote:
> >       As reported, the recently added pr96139 tests will fail on older targets
> >       because the tests are missing the appropriate -mvsx or -maltivec options.
> >       This adds the options and clarifies the dg-require statements.
> >     gcc/testsuite/ChangeLog:
> >         * gcc.target/powerpc/pr96139-a.c: specify -mvsx option and require.
> >         * gcc.target/powerpc/pr96139-a.c: specify -mvsx option and require.
> >         * gcc.target/powerpc/pr96139-a.c: specify -maltivec option and require.
> 
> (Capital "S" on each line.)
> ("and require" isn't clear...  "dg-require"?)
> (And the files are -a, -b, -c).

Thanks for the review.

I've updated that to read:

gcc/testsuite/ChangeLog:                                                        
	* gcc.target/powerpc/pr96139-a.c: Specify -mvsx option and update the       
	dg-require stanza to match.                                                 
	* gcc.target/powerpc/pr96139-b.c: Same.                                     
	* gcc.target/powerpc/pr96139-c.c: Specify -maltivec option and update       
	the dg-require stanza to match.                                             
                                              

> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/pr96139-a.c b/gcc/testsuite/gcc.target/powerpc/pr96139-a.c
> > index b3daee4..12a3383 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/pr96139-a.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/pr96139-a.c
> > @@ -1,9 +1,9 @@
> >  /* { dg-do compile } */
> > -/* { dg-options "-O2 -Wall -m32" } */
> > +/* { dg-options "-O2 -Wall -m32 -mvsx" } */
> >  /* { dg-require-effective-target ilp32 } */
> > -/* { dg-require-effective-target powerpc_altivec_ok } */
> > +/* { dg-require-effective-target powerpc_vsx_ok } */
> 
> This uses vector long long.  Okay.
> 
> > --- a/gcc/testsuite/gcc.target/powerpc/pr96139-b.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/pr96139-b.c
> 
> Ditto.
> 
> > diff --git a/gcc/testsuite/gcc.target/powerpc/pr96139-c.c b/gcc/testsuite/gcc.target/powerpc/pr96139-c.c
> > index 2464b8d..3ada260 100644
> > --- a/gcc/testsuite/gcc.target/powerpc/pr96139-c.c
> > +++ b/gcc/testsuite/gcc.target/powerpc/pr96139-c.c
> > @@ -1,7 +1,7 @@
> >  /* { dg-do run } */
> > -/* { dg-options "-O2 -Wall" } */
> > +/* { dg-options "-O2 -Wall -maltivec" } */
> >  /* { dg-require-effective-target powerpc_altivec_ok } */
> 
> But this one as well, why does it not need VSX like the rest?

I made these changes based on the failures reported when I tested
against older targets, and thats all it seems to want.  :-) 

Upon further investigation, it appears that the logic simplifies down
to a BIT_FIELD_REF against the llfoo symbol and the call to printf. 
The actual code generation consists entirely of non-vector instructions
(lis,ori,std,addi,... bl..).  So it simply does not need the vsx
support.

It is still sufficient to trigger the initially reported error, so it
does still serve that purpose.

thanks,
-Will

> 
> 
> Segher



More information about the Gcc-patches mailing list