This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/35343] New: Sum-reduction loop not recognized
- From: "xinliangli at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2008 04:28:01 -0000
- Subject: [Bug middle-end/35343] New: Sum-reduction loop not recognized
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It is beneficial to unroll reduction loop (and split the reduction target) to
reduce dependence height due to recurrence, but GCC does not perform such
optimization (-O3 -fno-tree-vectorize)
int a[1000];
int b[1000];
int foo(int n)
{
int s = 0;
int i = 0;
for (i = 0; i < 1000 ; i++)
{
s += a[i] + b[2*i];
}
return s;
}
--
Summary: Sum-reduction loop not recognized
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=35343