Created attachment 11889 [details] Test case t3025 and t1519 from http://llvm.org/bugs/show_bug.cgi?id=16431#c22 are misoptimized. As described in http://llvm.org/bugs/show_bug.cgi?id=16431#c23 "The diff tests are vectorizer bugs (look like the same bug): t3025 and t1519. They disappear with -fno-vectorize. Furthermore, it seems to be the loops: for (k1 = 54; k1 > 2; k1--) { gp += gp - ((++n) + k1); // Test Loop Vectorization for (ju = 1; ju < 1; ++ju) { d5[ju] = ff[k1][k1]; } } and for (k = 2; k < 61; ++k) { n += n - ((f + k7) + (nf++)); xs5[k] = 13 + 5; xs5[k] += nt7--; } We should not be vectorizing them. “gp” and “n” are not reductions. But we seem to :(."
xref rdar://15851149
Fixed in r199570.