public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop
@ 2008-09-10 22:58 pinskia at gcc dot gnu dot org
2008-09-14 4:44 ` [Bug rtl-optimization/37471] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-10 22:58 UTC (permalink / raw)
To: gcc-bugs
I was looking at some code generation for an internal benchmark when I noticed
this. With the current trunk on powerpc, we get a mfcr which is slow for the
cell (and most likely other PPCs too) as we pulled too many cmps with some
loops.
A simple example:
int f(int b, int l, int d, int c, int e)
{
int i = 0;
for(i = 0;i< l;i ++)
{
if (b)
g();
if (c)
g();
if (d)
g();
if (e)
g();
}
}
--
Summary: Move invariant pulls too many cmps out of a loop
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37471] Move invariant pulls too many cmps out of a loop
2008-09-10 22:58 [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop pinskia at gcc dot gnu dot org
@ 2008-09-14 4:44 ` pinskia at gcc dot gnu dot org
2008-09-21 0:33 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-14 4:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-09-14 04:42 -------
Note this is not a regression as loop.c did the same.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.0 3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37471] Move invariant pulls too many cmps out of a loop
2008-09-10 22:58 [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop pinskia at gcc dot gnu dot org
2008-09-14 4:44 ` [Bug rtl-optimization/37471] " pinskia at gcc dot gnu dot org
@ 2008-09-21 0:33 ` pinskia at gcc dot gnu dot org
2010-03-02 18:53 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-21 0:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-09-21 00:32 -------
While looking a different bug dealing with invariant motion, I noticed that
estimate_reg_pressure_cost does not take into account the mode of the new
register. This seems like a big issue. Also init_set_costs always uses SImode
which is not a good representation of the register pressure in general.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37471] Move invariant pulls too many cmps out of a loop
2008-09-10 22:58 [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop pinskia at gcc dot gnu dot org
2008-09-14 4:44 ` [Bug rtl-optimization/37471] " pinskia at gcc dot gnu dot org
2008-09-21 0:33 ` pinskia at gcc dot gnu dot org
@ 2010-03-02 18:53 ` pinskia at gcc dot gnu dot org
2010-03-02 21:58 ` steven at gcc dot gnu dot org
2010-03-02 22:02 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-03-02 18:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2010-03-02 18:53 -------
Still happens on the trunk.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37471] Move invariant pulls too many cmps out of a loop
2008-09-10 22:58 [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-03-02 18:53 ` pinskia at gcc dot gnu dot org
@ 2010-03-02 21:58 ` steven at gcc dot gnu dot org
2010-03-02 22:02 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-03-02 21:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from steven at gcc dot gnu dot org 2010-03-02 21:58 -------
Can you post the output .s of gcc, and the .s you expect?
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/37471] Move invariant pulls too many cmps out of a loop
2008-09-10 22:58 [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-03-02 21:58 ` steven at gcc dot gnu dot org
@ 2010-03-02 22:02 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-03-02 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2010-03-02 22:02 -------
It is pretty obvious from doing a cross build. We get a couple sets of:
lwz 0,112(1)
rlwinm 0,0,4,0xffffffff
mtcrf 1,0
rlwinm 0,0,28,0xffffffff
beq 7,.L6
Which loads r0 from the stack and then puts it into a conditional register and
the branches. Note the rlwinm's are there to shift the registers around to put
it into the correct location for the mtcrf.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37471
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <bug-37471-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2021-12-19 0:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10 22:58 [Bug rtl-optimization/37471] New: Move invariant pulls too many cmps out of a loop pinskia at gcc dot gnu dot org
2008-09-14 4:44 ` [Bug rtl-optimization/37471] " pinskia at gcc dot gnu dot org
2008-09-21 0:33 ` pinskia at gcc dot gnu dot org
2010-03-02 18:53 ` pinskia at gcc dot gnu dot org
2010-03-02 21:58 ` steven at gcc dot gnu dot org
2010-03-02 22:02 ` pinskia at gcc dot gnu dot org
[not found] <bug-37471-4@http.gcc.gnu.org/bugzilla/>
2021-12-19 0:49 ` pinskia at gcc dot gnu.org
2021-12-19 0:50 ` pinskia at gcc dot gnu.org
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).