On Mon, Apr 27, 2020 at 04:48:02PM -0500, will schmidt wrote:
> On Mon, 2020-04-27 at 15:48 -0400, Michael Meissner via Gcc-patches
> wrote:
> > Add tests for generating PLI/PADDI with -mcpu=future.
> > 
> > This is patch #2 of 7.  This patch was run on a little endian power8
> > system
> > running Linux and the patches succeeded.
> > 
> > 2020-04-27  Michael Meissner  <meiss...@linux.ibm.com>
> > 
> >     * gcc.target/powerpc/prefix-add.c: New test for -mcpu=future
> >     generating PADDI for large constant adds.
> >     * gcc.target/powerpc/prefix-di-constant.c: New test for
> >     -mcpu=future generating PLI to load up large DImode constants.
> >     * gcc.target/powerpc/prefix-si-constant.c: New test for
> >     -mcpu=future generating PLI to load up large SImode constants.
> > 
> > --- /tmp/V53gPm_prefix-add.c        2020-04-27 13:51:49.231124761 -0400
> > +++ gcc/testsuite/gcc.target/powerpc/prefix-add.c   2020-04-27 
> > 13:51:38.392270487 -0400
> > @@ -0,0 +1,12 @@
> > +/* { dg-do compile } */
> > +/* { dg-require-effective-target powerpc_prefixed_addr } */
> > +/* { dg-options "-O2 -mdejagnu-cpu=future" } */
> > +
> > +/* Test that PADDI is generated to add a large constant.  */
> > +unsigned long
> 
> Just 'long' or should that be 'long long' ? 
> 
> otherwise, seems straightforward.

The testsuite should usually use "int" and "long long", for 32-bit resp.
64-bit items, so that it works on both 32-bit and 64-bit configureations;
and "long" for register size.  Both "int" and "long" will work fine here.

The patch is okay for trunk, once the effective target situation has been
worked out.


Segher

Reply via email to