public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Change fma_reassoc_width tuning for ampere1
@ 2023-06-20  3:58 Di Zhao OS
  2023-06-22 14:17 ` Richard Sandiford
  0 siblings, 1 reply; 5+ messages in thread
From: Di Zhao OS @ 2023-06-20  3:58 UTC (permalink / raw)
  To: gcc-patches

This patch enables reassociation of floating-point additions on ampere1.
This brings about 1% overall benefit on spec2017 fprate cases. (There
are minor regressions in 510.parest_r and 508.namd_r, analyzed here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110279 .)

Bootstrapped and tested on aarch64-unknown-linux-gnu. Is this OK for trunk?

Thanks,
Di Zhao

gcc/ChangeLog:

        * config/aarch64/aarch64.cc: Change fma_reassoc_width for ampere1
---
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index d16565b5581..301c9f6c0cd 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -1927,7 +1927,7 @@ static const struct tune_params ampere1_tunings =
   "32:12",	/* loop_align.  */
   2,	/* int_reassoc_width.  */
   4,	/* fp_reassoc_width.  */
-  1,	/* fma_reassoc_width.  */
+  4,	/* fma_reassoc_width.  */
   2,	/* vec_reassoc_width.  */
   2,	/* min_div_recip_mul_sf.  */
   2,	/* min_div_recip_mul_df.  */
-- 
2.25.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change fma_reassoc_width tuning for ampere1
  2023-06-20  3:58 [PATCH] Change fma_reassoc_width tuning for ampere1 Di Zhao OS
@ 2023-06-22 14:17 ` Richard Sandiford
  2023-06-22 14:23   ` Philipp Tomsich
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Sandiford @ 2023-06-22 14:17 UTC (permalink / raw)
  To: Di Zhao OS via Gcc-patches; +Cc: Di Zhao OS

Di Zhao OS via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> This patch enables reassociation of floating-point additions on ampere1.
> This brings about 1% overall benefit on spec2017 fprate cases. (There
> are minor regressions in 510.parest_r and 508.namd_r, analyzed here:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110279 .)
>
> Bootstrapped and tested on aarch64-unknown-linux-gnu. Is this OK for trunk?
>
> Thanks,
> Di Zhao
>
> gcc/ChangeLog:
>
>         * config/aarch64/aarch64.cc: Change fma_reassoc_width for ampere1

Thanks, pushed to trunk.

Richard

> ---
> diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
> index d16565b5581..301c9f6c0cd 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -1927,7 +1927,7 @@ static const struct tune_params ampere1_tunings =
>    "32:12",	/* loop_align.  */
>    2,	/* int_reassoc_width.  */
>    4,	/* fp_reassoc_width.  */
> -  1,	/* fma_reassoc_width.  */
> +  4,	/* fma_reassoc_width.  */
>    2,	/* vec_reassoc_width.  */
>    2,	/* min_div_recip_mul_sf.  */
>    2,	/* min_div_recip_mul_df.  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change fma_reassoc_width tuning for ampere1
  2023-06-22 14:17 ` Richard Sandiford
@ 2023-06-22 14:23   ` Philipp Tomsich
  2023-06-26 14:27     ` Richard Sandiford
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Tomsich @ 2023-06-22 14:23 UTC (permalink / raw)
  To: Richard Sandiford, Di Zhao OS via Gcc-patches, Di Zhao OS

Richard,

OK for backport to GCC-13?

Thanks,
Philipp.

On Thu, 22 Jun 2023 at 16:18, Richard Sandiford via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Di Zhao OS via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> > This patch enables reassociation of floating-point additions on ampere1.
> > This brings about 1% overall benefit on spec2017 fprate cases. (There
> > are minor regressions in 510.parest_r and 508.namd_r, analyzed here:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110279 .)
> >
> > Bootstrapped and tested on aarch64-unknown-linux-gnu. Is this OK for trunk?
> >
> > Thanks,
> > Di Zhao
> >
> > gcc/ChangeLog:
> >
> >         * config/aarch64/aarch64.cc: Change fma_reassoc_width for ampere1
>
> Thanks, pushed to trunk.
>
> Richard
>
> > ---
> > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
> > index d16565b5581..301c9f6c0cd 100644
> > --- a/gcc/config/aarch64/aarch64.cc
> > +++ b/gcc/config/aarch64/aarch64.cc
> > @@ -1927,7 +1927,7 @@ static const struct tune_params ampere1_tunings =
> >    "32:12",   /* loop_align.  */
> >    2, /* int_reassoc_width.  */
> >    4, /* fp_reassoc_width.  */
> > -  1, /* fma_reassoc_width.  */
> > +  4, /* fma_reassoc_width.  */
> >    2, /* vec_reassoc_width.  */
> >    2, /* min_div_recip_mul_sf.  */
> >    2, /* min_div_recip_mul_df.  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Change fma_reassoc_width tuning for ampere1
  2023-06-22 14:23   ` Philipp Tomsich
@ 2023-06-26 14:27     ` Richard Sandiford
  2023-07-29 14:22       ` Di Zhao OS
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Sandiford @ 2023-06-26 14:27 UTC (permalink / raw)
  To: Philipp Tomsich; +Cc: Di Zhao OS via Gcc-patches, Di Zhao OS

Philipp Tomsich <philipp.tomsich@vrull.eu> writes:
> Richard,
>
> OK for backport to GCC-13?

Yeah, OK for GCC 13 too.

Thanks,
Richard

> Thanks,
> Philipp.
>
> On Thu, 22 Jun 2023 at 16:18, Richard Sandiford via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>> Di Zhao OS via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>> > This patch enables reassociation of floating-point additions on ampere1.
>> > This brings about 1% overall benefit on spec2017 fprate cases. (There
>> > are minor regressions in 510.parest_r and 508.namd_r, analyzed here:
>> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110279 .)
>> >
>> > Bootstrapped and tested on aarch64-unknown-linux-gnu. Is this OK for trunk?
>> >
>> > Thanks,
>> > Di Zhao
>> >
>> > gcc/ChangeLog:
>> >
>> >         * config/aarch64/aarch64.cc: Change fma_reassoc_width for ampere1
>>
>> Thanks, pushed to trunk.
>>
>> Richard
>>
>> > ---
>> > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
>> > index d16565b5581..301c9f6c0cd 100644
>> > --- a/gcc/config/aarch64/aarch64.cc
>> > +++ b/gcc/config/aarch64/aarch64.cc
>> > @@ -1927,7 +1927,7 @@ static const struct tune_params ampere1_tunings =
>> >    "32:12",   /* loop_align.  */
>> >    2, /* int_reassoc_width.  */
>> >    4, /* fp_reassoc_width.  */
>> > -  1, /* fma_reassoc_width.  */
>> > +  4, /* fma_reassoc_width.  */
>> >    2, /* vec_reassoc_width.  */
>> >    2, /* min_div_recip_mul_sf.  */
>> >    2, /* min_div_recip_mul_df.  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] Change fma_reassoc_width tuning for ampere1
  2023-06-26 14:27     ` Richard Sandiford
@ 2023-07-29 14:22       ` Di Zhao OS
  0 siblings, 0 replies; 5+ messages in thread
From: Di Zhao OS @ 2023-07-29 14:22 UTC (permalink / raw)
  To: Richard Sandiford, Philipp Tomsich; +Cc: gcc-patches

Cherry-picked this to gcc-13.

Thanks,
Di Zhao

> -----Original Message-----
> From: Richard Sandiford <richard.sandiford@arm.com>
> Sent: Monday, June 26, 2023 10:28 PM
> To: Philipp Tomsich <philipp.tomsich@vrull.eu>
> Cc: Di Zhao OS via Gcc-patches <gcc-patches@gcc.gnu.org>; Di Zhao OS
> <dizhao@os.amperecomputing.com>
> Subject: Re: [PATCH] Change fma_reassoc_width tuning for ampere1
> 
> Philipp Tomsich <philipp.tomsich@vrull.eu> writes:
> > Richard,
> >
> > OK for backport to GCC-13?
> 
> Yeah, OK for GCC 13 too.
> 
> Thanks,
> Richard
> 
> > Thanks,
> > Philipp.
> >
> > On Thu, 22 Jun 2023 at 16:18, Richard Sandiford via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> >>
> >> Di Zhao OS via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> >> > This patch enables reassociation of floating-point additions on ampere1.
> >> > This brings about 1% overall benefit on spec2017 fprate cases. (There
> >> > are minor regressions in 510.parest_r and 508.namd_r, analyzed here:
> >> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110279 .)
> >> >
> >> > Bootstrapped and tested on aarch64-unknown-linux-gnu. Is this OK for
> trunk?
> >> >
> >> > Thanks,
> >> > Di Zhao
> >> >
> >> > gcc/ChangeLog:
> >> >
> >> >         * config/aarch64/aarch64.cc: Change fma_reassoc_width for
> ampere1
> >>
> >> Thanks, pushed to trunk.
> >>
> >> Richard
> >>
> >> > ---
> >> > diff --git a/gcc/config/aarch64/aarch64.cc
> b/gcc/config/aarch64/aarch64.cc
> >> > index d16565b5581..301c9f6c0cd 100644
> >> > --- a/gcc/config/aarch64/aarch64.cc
> >> > +++ b/gcc/config/aarch64/aarch64.cc
> >> > @@ -1927,7 +1927,7 @@ static const struct tune_params ampere1_tunings =
> >> >    "32:12",   /* loop_align.  */
> >> >    2, /* int_reassoc_width.  */
> >> >    4, /* fp_reassoc_width.  */
> >> > -  1, /* fma_reassoc_width.  */
> >> > +  4, /* fma_reassoc_width.  */
> >> >    2, /* vec_reassoc_width.  */
> >> >    2, /* min_div_recip_mul_sf.  */
> >> >    2, /* min_div_recip_mul_df.  */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-29 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20  3:58 [PATCH] Change fma_reassoc_width tuning for ampere1 Di Zhao OS
2023-06-22 14:17 ` Richard Sandiford
2023-06-22 14:23   ` Philipp Tomsich
2023-06-26 14:27     ` Richard Sandiford
2023-07-29 14:22       ` Di Zhao OS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).