https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117192
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- before is before r15-4397-g70f59d2a1c51bd --- before.s 2024-10-17 20:17:06.172435278 +0000 +++ after.s 2024-10-17 20:15:24.703424849 +0000 @@ -15,21 +15,21 @@ main: movl c(%rip), %eax movl a(%rip), %esi movl $6, d(%rip) - movq 16(%rsp), %xmm2 + movq 16(%rsp), %xmm1 testl %eax, %eax sete %dl cmpl $5, b(%rip) jg .L3 movzbl %dl, %eax - pxor %xmm1, %xmm1 + pxor %xmm2, %xmm2 movl $6, b(%rip) negl %eax movd %eax, %xmm3 pshufd $0xe0, %xmm3, %xmm0 - pcmpeqd %xmm1, %xmm0 - pcmpeqd %xmm1, %xmm0 - pandn %xmm2, %xmm0 - pshufd $0xe5, %xmm0, %xmm4 + pcmpeqd %xmm2, %xmm0 + pcmpeqd %xmm2, %xmm0 + pandn %xmm0, %xmm1 + pshufd $0xe5, %xmm1, %xmm4 movd %xmm4, %esi movd %xmm4, a(%rip) .L3: The andn is swapped.