On Thu, Sep 01, 2022 at 01:30:18PM +0800, HAO CHEN GUI wrote: > --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c > @@ -1,6 +1,10 @@ > -/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -mdejagnu-cpu=power9 -mvsx" } */
-mcpu=power9 already implies -mvsx. If you would keep -mvsx, that belongs *after* testing powerpc_vsx_ok. > +/* { dg-require-effective-target has_arch_ppc64 } */ > +/* { dg-require-effective-target int128 } */ > /* { dg-require-effective-target powerpc_vsx_ok } */ > -/* { dg-options "-O2 -mvsx" } */ > +/* The test case can be compiled on all platforms with compiling option > + -mdejagnu-cpu=power9. */ Please don't put in comments like this: that is what the code already *does*, after all :-) > --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c > @@ -1,6 +1,8 @@ > -/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */ > -/* { dg-require-effective-target powerpc_vsx_ok } */ > /* { dg-options "-O2 -mvsx" } */ You cannot add -mvsx without first testing powerpc_vsx_ok (unless it is guaranteed some other way of course; here, it isn't). > +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ Please keep dg-do first thing in the file. > --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c > @@ -1,5 +1,6 @@ > -/* { dg-do compile { target has_arch_ppc64 } } */ > +/* { dg-do compile } */ > /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ > +/* { dg-require-effective-target has_arch_ppc64 } */ This is fine, but it doesn't change anything, unless we have a bug. Segher