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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-10-19
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
early-break loop vectorization where cheap disables versioning for alignment.

With -march=x86-64-v4 I see

t.c:59:22: optimized: loop vectorized using 64 byte vectors and unroll factor 4
t.c:59:22: optimized:  loop versioned for vectorization to enhance alignment

and with the cheap cost model we do not version for alignment and thus end up
with an unsupported (possibly trapping) vector load.

It's not clear how the data is laid out but I assume the mutual alignment
is almost never achieved and thus we pay the penalty of that alignment
check before falling back to the scalar loop (which is also assumed to
be only taken 20% of the time).

Reply via email to