Hi Carl,

On Fri, Jul 20, 2018 at 12:42:33PM -0700, Carl Love wrote:
> The following patch fixes errors on AIX for the "vector double" tests
> in altivec-1-runnable.c file.  The type "vector double" requires the
> use of the GCC command line option -mvsx. The vector double tests
> in altivec-1-runnable.c should be in altivec-2-runnable.c.  It looks
> like my Linux testing of the original patch worked because I configured
> GCC by default with -mcpu=power8.  AIX is not using that as the default
> processor thus causing the compile of altivec-1-runnable.c to fail.

This also fails on powerpc64-linux on a Power7.

> The vec_or tests in builtins-1.c were moved to another file by a
> previous patch.  The vec_or test generated the xxlor instruction.  The
> count of the xxlor instruction varies depending on the target as it is
> used as a move instruction.  No other tests generate the xxlor
> instruction. Hence, the count check was removed.

Okay, good idea.

> --- a/gcc/testsuite/gcc.target/powerpc/builtins-1.c
> +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1.c
> @@ -287,7 +287,6 @@ int main ()
>     vec_mergeh          xxmrglw, vmrglh
>     vec_mul             mulld | mullw, mulhwu
>     vec_nor             xxlnor
> -   vec_or              xxlor

So there is no vec_or test anymore?  Is there more incorrect / out of date
in this comment?

> @@ -334,8 +331,10 @@ int main ()
>  /* { dg-final { scan-assembler-times "divd" 8  { target lp64 } } } */
>  /* { dg-final { scan-assembler-times "divdu" 2  { target lp64 } } } */
>  /* { dg-final { scan-assembler-times "mulld" 4  { target lp64 } } } */
> -/* { dg-final { scan-assembler-times {\mbl __divdi3\M} 2  { target { ilp32 } 
> } } } */
> -/* { dg-final { scan-assembler-times {\mbl __udivdi3\M} 2  { target {ilp32 } 
> } } } */
> +/* { dg-final { scan-assembler-times {\mbl .__divdi3\M} 2   { target { ilp32 
> &&  powerpc*-*-aix* } } } } */
> +/* { dg-final { scan-assembler-times {\mbl .__udivdi3\M} 2  { target { ilp32 
> &&  powerpc*-*-aix* } } } } */
> +/* { dg-final { scan-assembler-times {\mbl __divdi3\M} 2  { target { ilp32 
> && powerpc*-*-linux* } } } } */
> +/* { dg-final { scan-assembler-times {\mbl __udivdi3\M} 2 { target { ilp32 
> && powerpc*-*-linux* } } } } */

Those "." are the dot in a regexp, i.e. they match any character.

You could do something like

/* { dg-final { scan-assembler-times {\mbl \.?__divdi3\M} 2   { target { ilp32 
} } } } */
/* { dg-final { scan-assembler-times {\mbl \.?__udivdi3\M} 2  { target { ilp32 
} } } } */

to handle both ABIs with and without dots.

But, current patch is okay for trunk as well.  Thanks!


Segher

Reply via email to