public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35357] New: Loop peeling not happening
@ 2008-02-25 5:02 xinliangli at gmail dot com
2008-02-25 11:49 ` [Bug tree-optimization/35357] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-25 5:02 UTC (permalink / raw)
To: gcc-bugs
//David Li
Loop peeling is special case of index splitting. Gcc has support for this
(under -O3 -funrool_loops, also -fno-tree-vectorize for the simple case), but
it does not happen for the following cases:
int a[100];
int b[1000];
void foo(int n)
{
int i;
for ( i = 0; i <= n; i++)
{
b[i*2] = a[3*i+1];
if (i < n)
b[i*2] +=1;
}
}
---------------------
int a[100];
int b[1000];
void foo(int n)
{
int i;
for ( i = 0; i < n; i++)
{
if (i==0) b[i*2] +=1;
b[i*2] = a[3*i+1];
}
}
--
Summary: Loop peeling not happening
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35357
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-25 11:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25 5:02 [Bug middle-end/35357] New: Loop peeling not happening xinliangli at gmail dot com
2008-02-25 11:49 ` [Bug tree-optimization/35357] " rguenth 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).