Hi! On Wed, Jul 10, 2024 at 01:39:05PM -0400, Michael Meissner wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/power11-1.c > @@ -0,0 +1,12 @@ > +/* { dg-do compile { target powerpc*-*-* } } */
Everything in gcc.target/powerpc is only run for target powerpc*-*-* anyway, so make this just /* { dg-do compile } */ please. (Or nothing, it is the default after all, but you may want to have it explicit). > +/* { dg-options "-mdejagnu-cpu=power11 -O2" } */ > + > +/* Basic check to see if the compiler supports -mcpu=power11. */ And to check if _ARCH_PWR11 works. > +#ifndef _ARCH_PWR11 > +#error "-mcpu=power11 is not supported" > +#endif > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/power11-2.c > @@ -0,0 +1,22 @@ > +/* Require VSX and Linux to eliminate systems where you can't do > + __attribute__((__target__(...))). */ > +/* { dg-do compile { target { powerpc*-*-linux* } } } */ Same. > +/* { dg-require-effective-target powerpc_vsx_ok } */ Why is this needed? It needs a comment saying that. Saying that this is "to test if can use the target attr" is nonsense. That does not need Linux either btw. Target selection might not work correctly currently on some other systems, but this is not a run test! > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/power11-3.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile { target powerpc*-*-* } } */ > +/* Require VSX and Linux to eliminate systems where you can't do > + __attribute__((__target_clones__(...))). */ All the same things here, mutatis mutandis. Segher