[Bug target/124339] ARM64 -O3 (ftree-vectorize) giant assembly with inc inside the loop condition

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 3 09:28:08 GMT 2026


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't see anything wrong with this and there is a check first to see if we
can load 16 bytes at a time first.
There is an early exit vectorization happening (happens on x86_64 with -mavx
too).

Moving  s++; into the loop changes the loop to be uncountable but that is
vectorized on the trunk.


More information about the Gcc-bugs mailing list