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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-11-30
   Target Milestone|---                         |14.5
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed on x86_64 with GCC 15.3.0 and trunk 17.0.0 (experimental) using -O3
-mgeneral-regs-only. Compiling with -fno-tree-loop-vectorize or --param
vect-max-peeling-for-alignment=0 passes.

In vect_do_peeling, niters is computed as unsigned char (`niters.9_30 = hi -
prolog_loop_niters`). When hi == 0 and prolog_loop_niters == 0 (256
iterations), niters.9_30 wraps to 0. However, vect_do_peeling sets an exported
range of [VF, +INF] on niters.9_30. Consequently, VRP simplifies ((niters - VF)
>> 3) + 1 into niters >> 3, evaluating to 0 iterations for the vectorized loop.

Reply via email to