This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PR testsuite/81010] Fix PPC test


Hi!

On Sun, Jan 07, 2018 at 12:58:25AM -0700, Jeff Law wrote:
> As you note in the comments, the code we generate now is actually more
> efficient so the test needs to be tweaked.
> 
> Rather than checking the form in doloop, I check the form in .combine
> and look for
> 
> (compare:CC (zero_extend:DI (reg:SI
> 
> The test is also twiddled to run on ppc64le.
> 
> OK for the trunk?
> 
> Jeff

> 	PR testsuite/81010
> 	* gcc.target/powerpc/pr56605.c: Run on ppc64le too.  Verify
> 	the zero extension is part of the test in the combiner dump.
> 
> 
> 
> diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
> index 3bc335f..be6456c 100644
> --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
> @@ -1,7 +1,7 @@
>  /* PR rtl-optimization/56605 */
> -/* { dg-do compile { target { powerpc64-*-* && lp64 } } } */
> +/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */

You could as well do powerpc*-*-* afaics?

>  /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */

And you could delete this line, since nothing in the testcase _needs_ the
-mcpu=power7.

> -/* { dg-options "-O3 -mvsx -mcpu=power7 -fno-unroll-loops -fdump-rtl-loop2_doloop" } */
> +/* { dg-options "-O3 -mvsx -mcpu=power7 -fno-unroll-loops -fdump-rtl-combine" } */

Something should check powerpc_vsx_ok, hrm.  Or just remove -mvsx?

>  
>  void foo (short* __restrict sb, int* __restrict ia)
>  {
> @@ -10,4 +10,4 @@ void foo (short* __restrict sb, int* __restrict ia)
>      ia[i] = (int) sb[i];
>  }
>  
> -/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\(subreg:SI \\\(reg:DI" 1 "loop2_doloop" } } */
> +/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\(zero_extend:DI \\\(reg:SI" 1 "combine" } } */

Yay, toothpickeritus ;-)

But none of that is new, so okay with or without those extra cleanups.
Thanks!


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]