On Tue, 2017-05-30 at 17:26 -0500, Segher Boessenkool wrote: > On Fri, May 26, 2017 at 10:32:54AM -0500, Steven Munroe wrote: > > * gcc.target/powerpc/bmi2-pdep32-1.c []: Add -mcpu=power7 to > > dg-options. Change dg-require-effective-target powerpc_vsx_ok > > to vsx_hw. > > Stray "[]"? Yes, still not sure of the changelog conventions for DG options > > > --- gcc/testsuite/gcc.target/powerpc/bmi2-pdep32-1.c (revision > > 248468) > > +++ gcc/testsuite/gcc.target/powerpc/bmi2-pdep32-1.c (working copy) > > @@ -1,7 +1,7 @@ > > /* { dg-do run } */ > > -/* { dg-options "-O3" } */ > > +/* { dg-options "-O3 -mcpu=power7" } */ > > /* { dg-require-effective-target lp64 } */ > > -/* { dg-require-effective-target powerpc_vsx_ok } */ > > +/* { dg-require-effective-target vsx_hw } */ > > Other testcases selecting a -mcpu= also use > > /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { > "-mcpu=power7" } } */ > > Do you really want -mcpu=power7 always? Or just at least power7? >
I need at least -mcpu=power7 to generate popcntd/bpermd. The pdep_u32/pext_u32 implementations call the respective 64-bit versions as the ISA does not provide a 32-bit bpermd. It is not obvious how to the skip until a minimum -mcpu=power7 for these dc-do run tests. If the dg-skip-if is required I will add it. For the dg-do compile test for _pext_u64 I need the -mcpu=power7 specifically to get the correct counts for bpermd, popcntd and cntlzd.