https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69992
--- Comment #9 from acsawdey at gcc dot gnu.org --- OK, that makes sense, 64-bit target is an essential piece of this as part of the problem is that the loop index variable i is not chosen as an induction variable because it is not DImode. If you change the code to make size, i, and n all 64-bit, then i is chosen as one of the IVs and this infinite loop problem does not occur.