Hi! On Fri, Jun 18, 2021 at 01:16:23PM -0500, Aaron Sawdey wrote: > Update the count of matches for the fusion combine patterns after > the recent changes to them. At Segher's request, used \m and \M > in the match patterns. Also I have grouped together all alternatives of > each fusion insn, which should hopefully make this test a little less > fragile.
> * gcc.target/powerpc/fusion-p10-2logical.c: Update pattern > match counts. > * gcc.target/powerpc/fusion-p10-addadd.c: Update pattern match > counts. > * gcc.target/powerpc/fusion-p10-ldcmpi.c: Update pattern match > counts. > * gcc.target/powerpc/fusion-p10-logadd.c: Update pattern match > counts. All of these fit on one line, fwiw. > /* Recreate with: > - grep ' \*fuse_' fusion-p10-2logical.s|sed -e 's,^.*\*,,' |sort -k 7,7 > |uniq -c|awk '{l=30-length($2); printf("/%s* { %s { scan-assembler-times > \"%s\"%-*s %4d { target lp64 } } } > *%s/\n","","dg-final",$2,l,"",$1,"");}' > + grep ' \*fuse_' fusion-p10-2logical.s|sed -e 's,^.*\*,,' -e 's,/[0-9],/,' > |sort -k 7,7 |uniq -c|awk '{l=30-length($2); printf("/%s* { %s { > scan-assembler-times {\\m%s\\M}%-*s %4d { target lp64 } } } > *%s/\n","","dg-final",$2,l,"",$1,"");}' > */ Let me see if I can understand that :-) ... well enough. Okay. Maybe rewrite this as a Perl script before you reach a line length of 250 chars? :-) (But only if you need any significant changes here again of course.) > +/* { dg-final { scan-assembler-times {\mfuse_xor_or\M/} > 32 { target lp64 } } } */ > +/* { dg-final { scan-assembler-times {\mfuse_xor_orc\M/} > 32 { target lp64 } } } */ \M matters for things like this (or the former would match everything the latter does as well). You didn't have that problem when your REs didn't end in text, of course. \m isn't so important here of course, but it is easier to just add it than to reason about if you need it. I take it you have checked that the new counts are correct and/or expected. This is okay for trunk, and for 11 too once it has shown reasonable results for all configs these tests failed on before. Thanks! Segher