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

--- Comment #2 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> ---
Thank you!

For this case, there are two exits, and through these two exits, different
niters(number of iterations) are calculated.  It fails to handle this kind of
case well.

In ivcanon pass, the edge on the condition was removed incorrectly.

int a;
int main() {
  unsigned b = 0;
  int c = 1;
  for (;b < 3; b++) {
    if (c < b)
      __builtin_abort ();
    c+=3;
  }
  return 0;
}

Reply via email to