On Fri, May 17, 2019 at 12:04:16AM +0200, Jakub Jelinek wrote: > On Thu, May 16, 2019 at 11:39:38PM +0200, Jakub Jelinek wrote: > > One possibility is to add -fdump-tree-optimized and scan for > > /* { dg-final { scan-tree-dump "pow \\(\[^\n\r]*\\); \\\[tail call\\\]" > > "optimized" } } */ > > resp. > > /* { dg-final { scan-tree-dump "log \\(\[^\n\r]*\\); \\\[tail call\\\]" > > "optimized" } } */ > > Here it is in patch form. > > That said, I'm not convinced your patch does what you wanted, because > comparing a month old trunk with today's trunk generates the same assembly > except for .ident, generates as many [tail call] lines in *.optimized dump > as before, emits the same number of jmp\tpow and jmp\tlog instructions as > before (one in a separate routine). > > But at least the tests aren't UNSUPPORTED anymore. > > 2019-05-16 Jakub Jelinek <ja...@redhat.com> > > PR tree-optimization/90106 > * gcc.dg/cdce1.c: Don't scan-assembler, instead -fdump-tree-optimized > and scan-tree-dump for tail call. > * gcc.dg/cdce2.c: Likewise.
I'd like to ping this patch. A new cdce3.c testcase has been added in the mean time, so the above "That said," paragraph is resolved through that. > --- gcc/testsuite/gcc.dg/cdce1.c.jj 2019-05-16 11:28:22.750177582 +0200 > +++ gcc/testsuite/gcc.dg/cdce1.c 2019-05-16 23:50:23.618450891 +0200 > @@ -1,9 +1,9 @@ > -/* { dg-do run } */ > -/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */ > +/* { dg-do run } */ > +/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details > -fdump-tree-optimized -lm" } */ > /* { dg-require-effective-target int32plus } */ > -/* { dg-final { scan-tree-dump "cdce1.c:17: .* function call is > shrink-wrapped into error conditions\." "cdce" } } */ > -/* { dg-final { scan-assembler "jmp pow" } } */ > /* { dg-require-effective-target large_double } */ > +/* { dg-final { scan-tree-dump "cdce1.c:17: .* function call is > shrink-wrapped into error conditions\." "cdce" } } */ > +/* { dg-final { scan-tree-dump "pow \\(\[^\n\r]*\\); \\\[tail call\\\]" > "optimized" } } */ > > #include <stdlib.h> > #include <math.h> > --- gcc/testsuite/gcc.dg/cdce2.c.jj 2019-05-16 11:28:22.781177075 +0200 > +++ gcc/testsuite/gcc.dg/cdce2.c 2019-05-16 23:50:58.505880845 +0200 > @@ -1,8 +1,8 @@ > -/* { dg-do run } */ > +/* { dg-do run } */ > /* { dg-skip-if "doubles are floats" { "avr-*-*" } } */ > -/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */ > -/* { dg-final { scan-tree-dump "cdce2.c:16: .* function call is > shrink-wrapped into error conditions\." "cdce" } } */ > -/* { dg-final { scan-assembler "jmp log" } } */ > +/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details > -fdump-tree-optimized -lm" } */ > +/* { dg-final { scan-tree-dump "cdce2.c:16: .* function call is > shrink-wrapped into error conditions\." "cdce" } } */ > +/* { dg-final { scan-tree-dump "log \\(\[^\n\r]*\\); \\\[tail call\\\]" > "optimized" } } */ > > #include <stdlib.h> > #include <math.h> > Jakub