* [Bug rtl-optimization/109858] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
@ 2023-05-15 2:24 ` pinskia at gcc dot gnu.org
2023-05-15 2:25 ` pinskia at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-15 2:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target Milestone|--- |14.0
CC| |pinskia at gcc dot gnu.org
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
2023-05-15 2:24 ` [Bug rtl-optimization/109858] " pinskia at gcc dot gnu.org
@ 2023-05-15 2:25 ` pinskia at gcc dot gnu.org
2023-05-15 7:43 ` [Bug rtl-optimization/109858] [14 Regression] " crazylht at gmail dot com
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-15 2:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=109610
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Maybe once PR 109610 is fixed this also is fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
2023-05-15 2:24 ` [Bug rtl-optimization/109858] " pinskia at gcc dot gnu.org
2023-05-15 2:25 ` pinskia at gcc dot gnu.org
@ 2023-05-15 7:43 ` crazylht at gmail dot com
2023-05-15 9:40 ` linkw at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: crazylht at gmail dot com @ 2023-05-15 7:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
Does https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617431.html help?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (2 preceding siblings ...)
2023-05-15 7:43 ` [Bug rtl-optimization/109858] [14 Regression] " crazylht at gmail dot com
@ 2023-05-15 9:40 ` linkw at gcc dot gnu.org
2023-05-16 2:50 ` crazylht at gmail dot com
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-05-15 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Hongtao.liu from comment #2)
> Does https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617431.html help?
Sorry, I just measured those degraded bmks with this fix, the results showed it
didn't help.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (3 preceding siblings ...)
2023-05-15 9:40 ` linkw at gcc dot gnu.org
@ 2023-05-16 2:50 ` crazylht at gmail dot com
2023-05-16 2:53 ` crazylht at gmail dot com
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: crazylht at gmail dot com @ 2023-05-16 2:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
Created attachment 55091
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55091&action=edit
Only use NO_REGS in cost calculation when !hard_regno_mode_ok for GENERAL_REGS
and mode.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (4 preceding siblings ...)
2023-05-16 2:50 ` crazylht at gmail dot com
@ 2023-05-16 2:53 ` crazylht at gmail dot com
2023-05-16 3:08 ` linkw at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: crazylht at gmail dot com @ 2023-05-16 2:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Kewen Lin from comment #3)
> (In reply to Hongtao.liu from comment #2)
> > Does https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617431.html help?
>
> Sorry, I just measured those degraded bmks with this fix, the results showed
> it didn't help.
Sorry for the inconvience, could you try again with attached patch.
The patch will still use GENERAL_REGS when hard_regno_mode_ok for mode and
GENERAL_REGS(which is the case in PR109610), hope it can also fix this
regression.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (5 preceding siblings ...)
2023-05-16 2:53 ` crazylht at gmail dot com
@ 2023-05-16 3:08 ` linkw at gcc dot gnu.org
2023-05-16 15:17 ` segher at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-05-16 3:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #6 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Hongtao.liu from comment #5)
> (In reply to Kewen Lin from comment #3)
> > (In reply to Hongtao.liu from comment #2)
> > > Does https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617431.html help?
> >
> > Sorry, I just measured those degraded bmks with this fix, the results showed
> > it didn't help.
>
> Sorry for the inconvience, could you try again with attached patch.
> The patch will still use GENERAL_REGS when hard_regno_mode_ok for mode and
> GENERAL_REGS(which is the case in PR109610), hope it can also fix this
> regression.
Thanks for the prompt fix, I'll do the perf evaluation once the perf boxes get
released (they are used by others now) and get back to you.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (6 preceding siblings ...)
2023-05-16 3:08 ` linkw at gcc dot gnu.org
@ 2023-05-16 15:17 ` segher at gcc dot gnu.org
2023-05-17 1:25 ` crazylht at gmail dot com
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: segher at gcc dot gnu.org @ 2023-05-16 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #7 from Segher Boessenkool <segher at gcc dot gnu.org> ---
> The patch will still use GENERAL_REGS when hard_regno_mode_ok for mode and
> GENERAL_REGS(which is the case in PR109610), hope it can also fix this
> regression.
That sounds more reasonable. But, why use any heuristics like this? Can't you
just look at the actual costs of using mem and regs?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (7 preceding siblings ...)
2023-05-16 15:17 ` segher at gcc dot gnu.org
@ 2023-05-17 1:25 ` crazylht at gmail dot com
2023-05-17 5:21 ` linkw at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: crazylht at gmail dot com @ 2023-05-17 1:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Segher Boessenkool from comment #7)
> > The patch will still use GENERAL_REGS when hard_regno_mode_ok for mode and
> > GENERAL_REGS(which is the case in PR109610), hope it can also fix this
> > regression.
>
> That sounds more reasonable. But, why use any heuristics like this? Can't
> you
> just look at the actual costs of using mem and regs?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109610#c2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (8 preceding siblings ...)
2023-05-17 1:25 ` crazylht at gmail dot com
@ 2023-05-17 5:21 ` linkw at gcc dot gnu.org
2023-05-17 14:48 ` segher at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-05-17 5:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #9 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Kewen Lin from comment #6)
> (In reply to Hongtao.liu from comment #5)
> > (In reply to Kewen Lin from comment #3)
> > > (In reply to Hongtao.liu from comment #2)
> > > > Does https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617431.html help?
> > >
> > > Sorry, I just measured those degraded bmks with this fix, the results showed
> > > it didn't help.
> >
> > Sorry for the inconvience, could you try again with attached patch.
> > The patch will still use GENERAL_REGS when hard_regno_mode_ok for mode and
> > GENERAL_REGS(which is the case in PR109610), hope it can also fix this
> > regression.
>
> Thanks for the prompt fix, I'll do the perf evaluation once the perf boxes
> get released (they are used by others now) and get back to you.
I re-evaluated all SPEC2017 bmks on Power9 and Power10 with this patch (r14-171
vs. r14-172 + this fix), and confirmed it does fix all three degradation found
before and it doesn't cause any new degradation (btw, all the >1% improvements
are gone as well, all the results are neutral).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (9 preceding siblings ...)
2023-05-17 5:21 ` linkw at gcc dot gnu.org
@ 2023-05-17 14:48 ` segher at gcc dot gnu.org
2023-05-26 1:46 ` cvs-commit at gcc dot gnu.org
2023-06-20 10:35 ` linkw at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: segher at gcc dot gnu.org @ 2023-05-17 14:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #10 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Hongtao.liu from comment #8)
> (In reply to Segher Boessenkool from comment #7)
> > > The patch will still use GENERAL_REGS when hard_regno_mode_ok for mode and
> > > GENERAL_REGS(which is the case in PR109610), hope it can also fix this
> > > regression.
> >
> > That sounds more reasonable. But, why use any heuristics like this? Can't
> > you
> > just look at the actual costs of using mem and regs?
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109610#c2
That is not an answer to my question at all?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (10 preceding siblings ...)
2023-05-17 14:48 ` segher at gcc dot gnu.org
@ 2023-05-26 1:46 ` cvs-commit at gcc dot gnu.org
2023-06-20 10:35 ` linkw at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-26 1:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:
https://gcc.gnu.org/g:4fb66b2329319e9b47e89200d613b6f741a114fc
commit r14-1252-g4fb66b2329319e9b47e89200d613b6f741a114fc
Author: liuhongt <hongtao.liu@intel.com>
Date: Tue May 16 10:36:16 2023 +0800
Only use NO_REGS in cost calculation when !hard_regno_mode_ok for
GENERAL_REGS and mode.
r14-172-g0368d169492017 replaces GENERAL_REGS with NO_REGS in cost
calculation when the preferred register class are not known yet.
It regressed powerpc PR109610 and PR109858, it looks too aggressive to use
NO_REGS when mode can be allocated with GENERAL_REGS.
The patch takes a step back, still use GENERAL_REGS when
hard_regno_mode_ok for mode and GENERAL_REGS, otherwise uses NO_REGS.
gcc/ChangeLog:
PR target/109610
PR target/109858
* ira-costs.cc (scan_one_insn): Only use NO_REGS in cost
calculation when !hard_regno_mode_ok for GENERAL_REGS and
mode, otherwise still use GENERAL_REGS.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/109858] [14 Regression] r14-172 caused some SPEC2017 bmk to degrade on Power
2023-05-15 2:06 [Bug rtl-optimization/109858] New: r14-172 caused some SPEC2017 bmk to degrade on Power linkw at gcc dot gnu.org
` (11 preceding siblings ...)
2023-05-26 1:46 ` cvs-commit at gcc dot gnu.org
@ 2023-06-20 10:35 ` linkw at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-06-20 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109858
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |crazylht at gmail dot com
--- Comment #12 from Kewen Lin <linkw at gcc dot gnu.org> ---
Already fixed by Hongtao's fix.
^ permalink raw reply [flat|nested] 14+ messages in thread