https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116338
--- Comment #5 from kugan at gcc dot gnu.org --- (In reply to Richard Biener from comment #4) > You can try to see whether adding a SSA copy would make this supported, it > seems not allowing a PHI is simply a missed feature. We now fail in /* If this isn't a nested cycle or if the nested cycle reduction value is used ouside of the inner loop we cannot handle uses of the reduction value. */ if (nlatch_def_loop_uses > 1 || nphi_def_loop_uses > 1) Even if I comment this, I see: t1.c:16:25: note: worklist: examine stmt: _22 = x_18 + y_19; t1.c:16:25: note: vect_is_simple_use: operand x_18 = PHI <_1(5), x_10(2)>, type of def: unknown t1.c:16:25: missed: Unsupported pattern. t1.c:10:6: missed: not vectorized: unsupported use in stmt. t1.c:16:25: missed: unexpected pattern. t1.c:16:25: note: ***** Analysis failed with vector mode V4SF Do we need to somehow mark both the PHI stents as part of the first order reduction? <bb 3> [local count: 1063004408]: # x_18 = PHI <_1(5), x_10(2)> # y_19 = PHI <x_18(5), y_11(2)> # i_20 = PHI <i_13(5), 0(2)> # ivtmp_17 = PHI <ivtmp_16(5), 32000(2)> _1 = b[i_20]; _22 = x_18 + y_19; _3 = _1 + _22; _4 = _3 * 3.33000004291534423828125e-1; a[i_20] = _4; i_13 = i_20 + 1; ivtmp_16 = ivtmp_17 - 1; if (ivtmp_16 != 0) goto <bb 5>; [98.99%] else goto <bb 4>; [1.01%] <bb 5> [local count: 1052266995]: goto <bb 3>; [100.00%]