https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80355
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 51277 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51277&action=edit gcc12-pr80355-1.patch Untested fix. For 32-byte vectors/AVX512VL we don't need this, we already emit vperm2i128 or vpermq.