This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/43184] New: gcc could not vectorize floating point reduction statements
- From: "changpeng dot fang at amd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2010 23:54:42 -0000
- Subject: [Bug middle-end/43184] New: gcc could not vectorize floating point reduction statements
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 4.5 could not vectorize floating point reductions.
float sum(float a[], int n) {
int i;
float total=0.0;
for(i=0; i< n; i++)
total += a[i];
return total;
}
"gcc -O3 -fdump-tree-vect-all" shows:
foo.c:4: note: Unsupported pattern.
foo.c:4: note: not vectorized: unsupported use in stmt.
foo.c:4: note: unexpected pattern.
foo.c:1: note: vectorized 0 loops in function.
I have verified that gcc can vectorize integer reduction, but not float and
double.
--
Summary: gcc could not vectorize floating point reduction
statements
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: changpeng dot fang at amd dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43184