https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65443
--- Comment #6 from vries at gcc dot gnu.org ---
After looking into it a bit further, I think what we're trying to get is:
...
<bb x>:
goto <bb y>;
<bb 4>:
i_17 = (int) ivtmp_y;
_7 = (long unsigned int) i_17;
_8 = _7 * 4;
_9 = pretmp_24 + _8;
_10 = *_9;
sum_11 = _10 + sum_y;
i_12 = i_17 + 1;
i.1_3 = (unsigned int) i_12;
goto <bb 6>;
<bb 6>:
ivtmp_6 = ivtmp_y + 1;
goto <bb y>;
<bb y>:
# sum_y = PHI <1(x), sum_11(6)>
# ivtmp_y = PHI <0(x), ivtmp_6(6)>
if (ivtmp_y < _20 + 1)
goto <bb 4>;
else
goto <bb 5>;
<bb 5>:
# sum_21 = PHI <sum_y(y), sum_26(8)>
goto <bb 7>;
...