On Mon, Apr 26, 2021 at 03:21:29PM -0500, acsaw...@linux.ibm.com wrote:
> This patch adds a function to genfusion.pl to add a couple
> more patterns so combine can do fusion of pairs of add and
> vaddudm instructions.

> +sub gen_addadd
> +{
> +    my ($kind, $vchr, $op, $ty, $mode, $pred, $constraint);

Does spelling out $type conflict with anything? :-)

> +  KIND: foreach $kind ('scalar','vector') {
Why put a label on this?  It isn't used.

> --- a/gcc/config/rs6000/rs6000.c
> +++ b/gcc/config/rs6000/rs6000.c
> @@ -4467,6 +4467,9 @@ rs6000_option_override_internal (bool global_init_p)
>    if (TARGET_POWER10 && (rs6000_isa_flags_explicit & 
> OPTION_MASK_P10_FUSION_2LOGICAL) == 0)
>      rs6000_isa_flags |= OPTION_MASK_P10_FUSION_2LOGICAL;
>  
> +  if (TARGET_POWER10 && (rs6000_isa_flags_explicit & 
> OPTION_MASK_P10_FUSION_2ADD) == 0)

Line too long.  Just break before the &&?

> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/powerpc/fusion-p10-addadd.c
> @@ -0,0 +1,41 @@
> +/* { dg-do compile { target { powerpc*-*-* } } } */

Just omit the target, anything in gcc.target/powerpc/ is run only for
powerpc already.  You can also omit the dg-do coompletely, "compile" is
the default, but it can be nice documentation.

> +/* { dg-skip-if "" { powerpc*-*-darwin* } } */

Do we know it does not work on darwin?  If not, please don't disable it
there -- if we do that unnecessarily all the time, much tooo little is
tested on darwin.

Okay for trunk, and a backport to 11 later.  Thanks!  And the previous
patch is fine for backport as well of course.


Segher

Reply via email to