On 01/07/2018 10:09 AM, Segher Boessenkool wrote: > 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? I guess, but I suspect the lp64 test would prevent it from running on the 32bit configurations anyway. And we probably are reliant on 64bits to expose the problematical conversions that we weren't handling well which led to 56605.
> >> /* { 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. Your later message indicates we should leave this as-is. So that's my plan here. > >> -/* { 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? I think we should check powerpc_vsx_ok -- If I understand 56605 correctly ivopts/vectorization created the problematical gimple that when converted to RTL wasn't handled well. So we probably want to run the test on any 64bit ppc with VSX capabilities. WRT whether or not the test has any value, it still seems to be testing for whether or not we're able to simplify stuff appropriately, so I think keeping it probably makes the most sense. RTL testing/scanning is painful. I'll do a bit of sniff testing around the suggestions you've made and commit something reasonable :-) Jeff