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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
number_of_iterations_lt_to_ne turns this into {0, +, 61} != 4 in signed int
and we set ->no_overflow to be true on this IV.  Under the assumption
that a.1_16 != -2147483629 && a.1_16 + -20 >= -2147483592 (a.1_16 is zero).

Somehow

  /* IV0 < IV1 does not loop if IV0->base >= IV1->base.  */
  if (mpz_cmp (mmod, bnds->below) < 0)
    noloop = boolean_false_node;
  else
    noloop = fold_build2 (GE_EXPR, boolean_type_node,
                          iv0->base, iv1->base);

hits the first condition even though clearly

a.1_16 + -20 >= a.1_16 + -72

for a.1_16 == 0 at least.  So sth in the computation earlier or the
input to number_of_iterations_lt_to_ne goes off.  It isn't very well
documented, so will have to reverse engineer that (again).

Reply via email to