https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105463
--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> --- Note with -O3 GCC 11 also has the problem, it's just that with GCC 12 vectorization was enabled by default at -O2. GCC 10 seems unaffected.