https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101142
Bug ID: 101142 Summary: [11/12 regression] Regression due to supporting bitwise operators on AVX512 masks. Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: crazylht at gmail dot com Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-*-* i?86-*-* Created attachment 51040 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51040&action=edit test.cpp options to reproduce regression: g++ byteswap.cpp test.cpp -march=native -O3 -DDTYPE32 The regression is due to r11-2796-g388cb292a94f98a276548cd6ce01285cf36d17df which supports bitwise operator for avx512 masks. In byteswap.cpp there're a lot of bitwise operations, the register pressure is very high, so LRA allocate some bitwise operations to mask registers to avoid spills, the problem is mask bitwise instructions has 1/4 throught of those gpr versions which causes the regression.