https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96167
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |12.1.0 Known to fail| |10.5.0 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For x86_64, this was fixed in GCC 11+ at -O3 and for GCC 12+ for -O2 by the vectorizer. But I think we could do better at the code generation at the gimple level. We have: vect__4.7_8 = MEM <vector(2) int> [(int &)x_1(D)]; vect_tmp_3.8_9 = VEC_PERM_EXPR <vect__4.7_8, vect__4.7_8, { 1, 0 }>; MEM <vector(2) int> [(int &)x_1(D)] = vect_tmp_3.8_9; Which could just be: tmp = MEM<long>[(int&)x_1(D)]; tmp = tmp ror 32; MEM<long>[(int&)x_1(D)] = tmp;