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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
   Last reconfirmed|                            |2025-08-01

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Interesting.

      uint64_t niters = (uint64_t) avg_loop_niter (data->current_loop);
      if (niters > (uint64_t) cost)
        return (round_up_p && cost != 0) ? 1 : 0;
      return (cost + (round_up_p ? niters - 1 : 0)) / niters;

should fix it.

Reply via email to