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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-01-05
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note the pass is run but we have

      /* Avoid loop header copying when optimizing for size unless we can
         determine that the loop condition is static in the first
         iteration.  */
      if (optimize_loop_for_size_p (loop)
          && !loop->force_vectorize
          && !entry_loop_condition_is_static (loop, query))

guarding it where the optimize_loop_for_size_p is conservative to size for -Os.
We might want to use similar logic as unrolling to determine the size cost of
the BB peeling done (basically share it) and thus allow more cases.

Reply via email to