On Fri, Dec 29, 2017 at 12:35:03AM -0500, Michael Meissner wrote:
>       * gcc.target/powerpc/float128-hw7.c: Likewise.

> --- gcc/testsuite/gcc.target/powerpc/float128-hw7.c   (nonexistent)
> +++ gcc/testsuite/gcc.target/powerpc/float128-hw7.c   (working copy)
> @@ -0,0 +1,27 @@
> +/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
> +/* { dg-require-effective-target powerpc_p9vector_ok } */
> +/* { dg-options "-mpower9-vector -O2" } */
> +
> +extern _Float128 fabsf128 (_Float128);
> +extern _Float128 copysignf128 (_Float128, _Float128);
> +
> +/* Check copysign optimizations that are done for double are also done for
> +   _Float128.  */
> +
> +_Float128
> +cs_x_pos1 (_Float128 x)
> +{
> +  return copysignf128 (x, 1.0Q);             /* XSABSQP.  */
> +}
> +
> +_Float128 cs_x_neg2 (_Float128 x)
> +{
> +  return copysignf128 (x, -2.0Q);            /* XSNABSQP.  */
> +}
> +
> +/* { dg-final { scan-assembler-times {\mxsabsqp\M}  1 } } */
> +/* { dg-final { scan-assembler-not   {\mxsnabsqp\M} 1 } } */
> +/* { dg-final { scan-assembler-not   {\mxscpsgnqp\M}  } } */
> +/* { dg-final { scan-assembler-not   {\mlxvx\M}       } } */
> +/* { dg-final { scan-assembler-not   {\mlxv\M}        } } */
> +/* { dg-final { scan-assembler-not   {\mbl\M}         } } */

This testcase fails with a syntax error, scan-assembler-not with
2 operands would need to have target or xfail as the second operand, not 1.
Removing the 1 doesn't work, because xsnabsqp instruction is actually
emitted.  Given that the comments on the functions explicitly mention
that it expects one XSABSQP and one XSNABSQP instruction, I've changed
it to scan-assembler-times instead, tested on powerpc64le-linux and
committed as obvious to trunk.

2018-01-12  Jakub Jelinek  <ja...@redhat.com>

        * gcc.target/powerpc/float128-hw7.c: Use scan-assembler-times
        instead of scan-assembler-not for xsnabsqp.

--- gcc/testsuite/gcc.target/powerpc/float128-hw7.c.jj  2018-01-12 
18:14:53.714091910 +0000
+++ gcc/testsuite/gcc.target/powerpc/float128-hw7.c     2018-01-12 
20:13:43.706918034 +0000
@@ -20,7 +20,7 @@ _Float128 cs_x_neg2 (_Float128 x)
 }
 
 /* { dg-final { scan-assembler-times {\mxsabsqp\M}  1 } } */
-/* { dg-final { scan-assembler-not   {\mxsnabsqp\M} 1 } } */
+/* { dg-final { scan-assembler-times {\mxsnabsqp\M} 1 } } */
 /* { dg-final { scan-assembler-not   {\mxscpsgnqp\M}  } } */
 /* { dg-final { scan-assembler-not   {\mlxvx\M}       } } */
 /* { dg-final { scan-assembler-not   {\mlxv\M}        } } */


        Jakub

Reply via email to