https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61175
Bug ID: 61175 Summary: failing vectorization Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vincenzo.innocente at cern dot ch of these three function only "oneOk" vectorize. float px[1024]; float vx[1024]; unsigned int N=1024; void one(unsigned int i) { for (auto j=i+1; j<N; ++j) { auto ax = px[j]-px[i]; vx[i]-=ax; vx[j]+=ax; } } void oneOK(unsigned int k) { auto tmp = vx[k]; for (auto j=0; j<k-1; ++j) { auto ax = px[j]-px[k]; tmp-=ax; vx[j]+=ax; } vx[k]=tmp; } void oneNope(unsigned int k) { for (auto j=0; j<k-1; ++j) { auto ax = px[j]-px[k]; vx[k]-=ax; vx[j]+=ax; } }