https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87716
--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> --- A slightly older compiler gave test1: movdqa (%rdi), %xmm2 pavgb (%rsi), %xmm2 movdqa %xmm2, %xmm3 punpckhbw %xmm1, %xmm2 punpcklbw %xmm1, %xmm3 pmulhuw %xmm0, %xmm2 pmulhuw %xmm0, %xmm3 packuswb %xmm2, %xmm3 movaps %xmm3, (%rdx) ret What is so super strange about the current generated code?