https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84648
--- Comment #3 from bin cheng <amker at gcc dot gnu.org> --- (In reply to Richard Biener from comment #2) > So we run into > > /* Ignore loops of while (i-- < 10) type. */ > if (code != NE_EXPR) > { > if (iv0->step && tree_int_cst_sign_bit (iv0->step)) > return false; > > if (!integer_zerop (iv1->step) && !tree_int_cst_sign_bit (iv1->step)) > return false; > } > > where code == LE_EXPR from 0 <= iv1 with iv1 being {0, +, 1}. > > This specifically singles out loop-until-wrap. We'd need to teach niter > analysis this kind of loop. Thanks, I will have a look how niter analysis should be improved for this.