This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49782] New: Missed optimization due to dependency analysis
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jul 2011 07:22:41 +0000
- Subject: [Bug tree-optimization/49782] New: Missed optimization due to dependency analysis
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49782
Summary: Missed optimization due to dependency analysis
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
CC: jakub@gcc.gnu.org, irar@il.ibm.com,
rsandifo@gcc.gnu.org, zsojka@seznam.cz
Depends on: 49771
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
In the pr49771.c testcase:
static int a[1000];
int
foo (void)
{
int j;
int i;
for (i = 0; i < 1000; i++)
for (j = 0; j < 1000; j++)
a[j] = a[i] + 1;
return a[0];
}
the dependency analysis doesn't figure out that a[i] for any i between 0 and
999
(but due to size of the array for any i) always overlaps the a[j] from 0 to
999.