public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/5269: loop unroller fails to pull the right number of copies out
@ 2002-01-03 15:16 dalej
0 siblings, 0 replies; 2+ messages in thread
From: dalej @ 2002-01-03 15:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 5269
>Category: optimization
>Synopsis: loop unroller fails to pull the right number of copies out
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 03 15:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: dale johannesen
>Release: gcc version 3.1 20011229 (experimental)
>Organization:
>Environment:
ppc Darwin (but probably doesn't matter)
>Description:
The following program will abort when compiled with -O2 -funroll-loops. This is because the loop in "foo"
is unrolled incorrectly. It is unrolled 4 times and
executed 49 times, for 196 stores, plus there is 1 extra store before the loop. This is not enough; there should be 3 stores pulled out of the loop.
int a[200];
int foo() {
int i;
for (i=198; i>=0; i--)
a[i] = i;
a[199] = 199;
}
main() {
int i;
foo();
for ( i=0; i<199; i++ )
if ( a[i]!=i )
abort();
}
>How-To-Repeat:
gcc -O2 -funroll-loops
a.out
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/5269: loop unroller fails to pull the right number of copies out
@ 2002-01-10 13:03 rth
0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-01-10 13:03 UTC (permalink / raw)
To: dalej, gcc-bugs, gcc-prs, nobody
Synopsis: loop unroller fails to pull the right number of copies out
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Thu Jan 10 13:03:00 2002
State-Changed-Why:
http://gcc.gnu.org/ml/gcc-patches/2002-01/msg00762.html
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5269
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-01-10 21:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-03 15:16 optimization/5269: loop unroller fails to pull the right number of copies out dalej
2002-01-10 13:03 rth
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).