https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113134
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
The loop is rotated by header copying and the "combined" exit test looks like
if (i_21 == 1001)
goto <bb 5>; [1.00%]
else
goto <bb 4>; [99.00%]
<bb 4> [local count: 1004539166]:
i_18 = i_21 + 1;
if (N_13(D) > i_18)
goto <bb 3>; [94.50%]
else
goto <bb 5>; [5.50%]
this could be rewritten to use min(1002, N_13(D)) with the knowledge how
'i' evolves. We get i_21 != 1001 || N_13(D) > (i_21 + 1) for the iteration
condition which I think we cannot combine in general.
The "easiest" way would be to have loop splitting split the loop on the
i_21 == 1001 condition I think.