https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120233
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://gcc.gnu.org/g:c475080b3a11d530f0c5415d3776d42101ff282d commit r16-7576-gc475080b3a11d530f0c5415d3776d42101ff282d Author: H.J. Lu <[email protected]> Date: Thu Feb 19 08:03:35 2026 +0800 x86: Update gcc.target/i386/pr108938-3.c commit 4b71cafc8447e09ee41aff02acb5b26e8b112466 Author: Jakub Jelinek <[email protected]> Date: Tue Feb 17 11:43:43 2026 +0100 bswap: Handle VEC_PACK_TRUNC_EXPR [PR120233] compiles void foo2 (char* a, short* __restrict b) { a[0] = b[0] >> 8; a[1] = b[0]; a[2] = b[1] >> 8; a[3] = b[1]; } into movl (%rsi), %eax bswap %eax roll $16, %eax movl %eax, (%rdi) ret instead of movzwl (%rsi), %eax movzwl 2(%rsi), %edx movl %eax, %ecx sall $16, %eax sarw $8, %cx movzwl %cx, %ecx orl %ecx, %eax movd %eax, %xmm0 movl %edx, %eax sall $16, %edx sarw $8, %ax movdqa %xmm0, %xmm2 movzwl %ax, %eax orl %eax, %edx movd %edx, %xmm1 punpcklbw %xmm1, %xmm2 punpcklbw %xmm1, %xmm0 pshufd $65, %xmm2, %xmm2 punpcklbw %xmm2, %xmm0 movd %xmm0, (%rdi) ret Update gcc.target/i386/pr108938-3.c to also scan 3 bswaps for x86-64. PR target/120233 * gcc.target/i386/pr108938-3.c: Also scan 3 bswaps for x86-64. Signed-off-by: H.J. Lu <[email protected]>
