chf...@pathscale:~/gcc$ cat foo.c
float a[100], b[100], c[100];

void foo(int n)
{
  int i;
  for(i=1; i<n; i++)
  {
     a[i] = a[i] + c[i];
     b[i] = b[i-1] + a[i]; 
  } 
}
chf...@pathscale:~/gcc$ gcc -O3 -ftree-vectorizer-verbose=2
-ftree-loop-distribution -c foo.c

foo.c:6: note: not vectorized, possible dependence between data-refs
b[D.2730_7] and b[i_17]
foo.c:3: note: vectorized 0 loops in function.

Loop distribution itself may find not profitable to do such distribution.
However, partially vectorize this loop may obtain big profit. ICC can partially
vectorize it.


-- 
           Summary: vectorizer should invoke loop distribution to partially
                    vectorize this loop
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        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=43428

Reply via email to