https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83857
--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Slightly reduced testcase: f (double *x, double y) { double a = 0; for (int i = 0; i < 100; ++i) { a += y; x[i * 2] += a; x[i * 2 + 1] += a; } return a - y; } The problem is that we need the phi to be treated as an SLP operation when calculating ncopies.