On Wed, Jul 14, 2021 at 01:52:05PM -0400, Michael Meissner wrote:
> This patch updates eq/ne tests in the testsuite to adjust the test if
> power10 code generation is used.

eq0/ne0.

> --- a/gcc/testsuite/gcc.target/powerpc/ppc-eq0-1.c
> +++ b/gcc/testsuite/gcc.target/powerpc/ppc-eq0-1.c

> -/* { dg-final { scan-assembler "cntlzw|isel" } } */
> +/* { dg-final { scan-assembler {\mcntlzw|isel|setbc\M} } } */

This does not do wha you perhaps think it does.  It looks for one of the
three atoms
"\mcntlzw", "isel", or "setbc\M".  You should write
  \m(cntlzw|isel|setbc)\M
or, if you need it to not capture (like in a scan-assembler-times)
  \m(?:cntlzw|isel|setbc)\M

> --- a/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c
> +++ b/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c

> -/* { dg-final { scan-assembler-times "addic" 4 } } */
> -/* { dg-final { scan-assembler-times "subfe" 1 } } */
> -/* { dg-final { scan-assembler-times "addze" 3 } } */
> +/* { dg-final { scan-assembler-times {\maddic\M}  4 { target { ! 
> has_arch_pwr10 } } } } */
> +/* { dg-final { scan-assembler-times {\msubfe\M}  1 { target { ! 
> has_arch_pwr10 } } } } */
> +/* { dg-final { scan-assembler-times {\maddic\M}  3 { target {   
> has_arch_pwr10 } } } } */
> +/* { dg-final { scan-assembler-not   {\msubfe\M}    { target {   
> has_arch_pwr10 } } } } */
> +/* { dg-final { scan-assembler-times {\msetbcr\M} 1 { target {   
> has_arch_pwr10 } } } } */
> +/* { dg-final { scan-assembler-times {\maddze\M}  3 } } */

It may be easier to split the patch into two, where one part can get the
setbcr (the first, simplest function), and the rest stays the same.

Okay for trunk like that.  Thanks!


Segher

Reply via email to