chf...@pathscale:~/gcc$ cat foo.c int a[100], b[100]; void foo(int n, int mid) { int i, t = 0; for(i=0; i<n; i++) { a[i] = b[i] + t; t = b[i]; } } chf...@pathscale:~/gcc$ gcc -O3 -ftree-vectorizer-verbose=7 -c foo.c
foo.c:6: note: not vectorized: unsupported use in stmt. foo.c:3: note: vectorized 0 loops in function. scalar expansion of t into array to carry the values accross iteration. -- Summary: enhance scalar expansion to vectorize this loop Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c 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=43425