[Bug middle-end/64396] Missed optimization in post-loop register handling

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 23 20:55:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64396

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The reason is GCC tries to be smart of calculating s4 outside of the loop
because the iv that might be selected is not related at all to s4.  That is it
might do:
int limit = es4-s4;
int i = 0;

  for(i=0;i<limit;i++) {
    add_carry32(sum, *s4[i]);
  }



More information about the Gcc-bugs mailing list