Both these loop kernels from FFmpeg fail with: gcc-4.5 -c vector_fmul_window.c -O3 -ffast-math -ftree-vectorizer-verbose=7 -msse2 [...] vector_fmul_window.c:7: note: not vectorized: complicated access pattern.
They look similar in the fact that they use both an increasing and a decreasing induction variables indexing data references. void vector_fmul_reverse_c(float *dst, const float *src0, const float *src1, int len){ int i; src1 += len-1; for(i=0; i<len; i++) dst[i] = src0[i] * src1[-i]; } void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len) { int i,j; dst += len; win += len; src0+= len; for(i=-len, j=len-1; i<0; i++, j--) { float s0 = src0[i]; float s1 = src1[j]; float wi = win[i]; float wj = win[j]; dst[i] = s0*wj - s1*wi + add_bias; dst[j] = s0*wi + s1*wj + add_bias; } } -- Summary: Missed vectorization: "complicated access pattern" for increasing and decreasing data indexing Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: spop at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43433