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

Sebastian Pop <spop at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spop at gcc dot gnu.org

--- Comment #7 from Sebastian Pop <spop at gcc dot gnu.org> ---
I think the patch is ok.

If in the future we want to handle those other loops, we will need to compute
the loop bound in add_loop_constraints() with a check for whether the stmt is
dominated by the exit or not.

Here is what we do today for all stmts in the loop:

  tree nb_iters = number_of_latch_executions (loop);
  if (TREE_CODE (nb_iters) == INTEGER_CST)
    {
      /* loop_i <= cst_nb_iters */

the constraint '<=' on statements' iteration domains implies that the loop
should be under a do-while form.

Reply via email to