public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43184]  New: gcc could not vectorize floating point reduction statements
@ 2010-02-25 23:54 changpeng dot fang at amd dot com
  2010-02-25 23:58 ` [Bug middle-end/43184] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: changpeng dot fang at amd dot com @ 2010-02-25 23:54 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-26 13:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 23:54 [Bug middle-end/43184] New: gcc could not vectorize floating point reduction statements changpeng dot fang at amd dot com
2010-02-25 23:58 ` [Bug middle-end/43184] " pinskia at gcc dot gnu dot org
2010-02-26  0:28 ` changpeng dot fang at amd dot com
2010-02-26  0:47 ` pinskia at gcc dot gnu dot org
2010-02-26 13:20 ` manu at gcc dot gnu dot org
2010-02-26 13:21 ` manu at gcc dot gnu dot org

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).