public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/32200] New: IV-OPTS does not produce good code for some loops
@ 2007-06-04 5:27 pinskia at gcc dot gnu dot org
2007-06-09 2:10 ` [Bug tree-optimization/32200] " pinskia at gcc dot gnu dot org
2008-10-13 23:39 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-04 5:27 UTC (permalink / raw)
To: gcc-bugs
While just looking around on the pointer_plus branch I noticed that if I have
independent IVs to start, the code is much worse and there are storing to the
stack (on x86) and everything go crazy after that.
Compare:
void foo (int *a, int *b, int *c, int *d, int *e, int *f)
{
int i;
for (i = 0; i < 8; i++)
*(b++) = *(a++) = *(c++) = *(d++) = *(e++) = *(f++);
}
To:
void foo (int *a, int *b, int *c, int *d, int *e, int *f)
{
int i;
for (i = 0; i < 8; i++)
b[i] = a[i] = c[i] = d[i] = e[i] = f[i];
}
----------- cut ---------
You will see that in the latter case, we optimize the IV based on one IV (i)
while in the first case, we have 7 IVs which is just wrong.
--
Summary: IV-OPTS does not produce good code for some loops
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32200
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-13 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-04 5:27 [Bug tree-optimization/32200] New: IV-OPTS does not produce good code for some loops pinskia at gcc dot gnu dot org
2007-06-09 2:10 ` [Bug tree-optimization/32200] " pinskia at gcc dot gnu dot org
2008-10-13 23:39 ` pinskia at gcc dot gnu dot 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).