public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/9553: No induction variable elimination
@ 2003-02-03 20:16 binsh00
0 siblings, 0 replies; 2+ messages in thread
From: binsh00 @ 2003-02-03 20:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 9553
>Category: optimization
>Synopsis: No induction variable elimination
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Mon Feb 03 20:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: binsh00@hotmail.com
>Release: gcc (GCC) 3.3 20030129 (prerelease)
>Organization:
>Environment:
Debian GNU/Linux (unstable)
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii gcc 3.2.2-0 The GNU C compiler.
>Description:
int a[20];
int b[20];
void
f()
{
int i1, i2;
for (i1 = 0, i2 = 0; i1 < 20; ++i1)
a[i1] = b[i2++];
}
In the above code i2 equals i1 and can be eliminated.
% /usr/lib/gcc-snapshot/bin/gcc -Wall -O3 -S -o - bug.c
[...]
xorl %edx, %edx
xorl %ecx, %ecx
.p2align 2,,3
.L6:
movl b(,%ecx,4), %eax
movl %eax, a(,%edx,4)
incl %edx
incl %ecx
cmpl $19, %edx
jle .L6
[...]
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/9553: No induction variable elimination
@ 2003-02-18 8:14 ebotcazou
0 siblings, 0 replies; 2+ messages in thread
From: ebotcazou @ 2003-02-18 8:14 UTC (permalink / raw)
To: binsh00, gcc-bugs, gcc-prs, nobody
Synopsis: No induction variable elimination
State-Changed-From-To: open->analyzed
State-Changed-By: ebotcazou
State-Changed-When: Tue Feb 18 08:14:53 2003
State-Changed-Why:
Confirmed. GCC doesn't know how to prove that two (independent)
basic induction variables are equal throughout the whole loop.
I'm not sure whether that would be really useful in practice though.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9553
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-18 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-03 20:16 optimization/9553: No induction variable elimination binsh00
2003-02-18 8:14 ebotcazou
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).