public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113871] psrlq is not used for PERM<a,{0},1,2,3,4> Date: Wed, 14 Feb 2024 19:44:51 +0000 [thread overview] Message-ID: <bug-113871-4-u32iWGy2xS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113871-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113871 --- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>: https://gcc.gnu.org/g:2c2f57e4158924467afbf4c2fd3938e507287dab commit r14-8989-g2c2f57e4158924467afbf4c2fd3938e507287dab Author: Uros Bizjak <ubizjak@gmail.com> Date: Wed Feb 14 20:41:42 2024 +0100 i386: psrlq is not used for PERM<a,{0},1,2,3,4> [PR113871] Introduce vec_shl_<mode> and vec_shr_<mode> expanders to improve '*a = __builtin_shufflevector(*a, (vect64){0}, 1, 2, 3, 4);' and '*a = __builtin_shufflevector((vect64){0}, *a, 3, 4, 5, 6);' shuffles. The generated code improves from: movzwl 6(%rdi), %eax movzwl 4(%rdi), %edx salq $16, %rax orq %rdx, %rax movzwl 2(%rdi), %edx salq $16, %rax orq %rdx, %rax movq %rax, (%rdi) to: movq (%rdi), %xmm0 psrlq $16, %xmm0 movq %xmm0, (%rdi) and to: movq (%rdi), %xmm0 psllq $16, %xmm0 movq %xmm0, (%rdi) in the second case. The patch handles 32-bit vectors as well and improves generated code from: movd (%rdi), %xmm0 pxor %xmm1, %xmm1 punpcklwd %xmm1, %xmm0 pshuflw $230, %xmm0, %xmm0 movd %xmm0, (%rdi) to: movd (%rdi), %xmm0 psrld $16, %xmm0 movd %xmm0, (%rdi) and to: movd (%rdi), %xmm0 pslld $16, %xmm0 movd %xmm0, (%rdi) PR target/113871 gcc/ChangeLog: * config/i386/mmx.md (V248FI): New mode iterator. (V24FI_32): DItto. (vec_shl_<V248FI:mode>): New expander. (vec_shl_<V24FI_32:mode>): Ditto. (vec_shr_<V248FI:mode>): Ditto. (vec_shr_<V24FI_32:mode>): Ditto. * config/i386/sse.md (vec_shl_<V_128:mode>): Simplify expander. (vec_shr_<V248FI:mode>): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr113871-1a.c: New test. * gcc.target/i386/pr113871-1b.c: New test. * gcc.target/i386/pr113871-2a.c: New test. * gcc.target/i386/pr113871-2b.c: New test. * gcc.target/i386/pr113871-3a.c: New test. * gcc.target/i386/pr113871-3b.c: New test. * gcc.target/i386/pr113871-4a.c: New test.
next prev parent reply other threads:[~2024-02-14 19:44 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-11 5:23 [Bug target/113871] New: " pinskia at gcc dot gnu.org 2024-02-11 5:32 ` [Bug target/113871] " pinskia at gcc dot gnu.org 2024-02-11 5:56 ` pinskia at gcc dot gnu.org 2024-02-12 8:46 ` rguenth at gcc dot gnu.org 2024-02-13 18:27 ` ubizjak at gmail dot com 2024-02-14 8:16 ` ubizjak at gmail dot com 2024-02-14 19:44 ` cvs-commit at gcc dot gnu.org [this message] 2024-02-14 19:48 ` ubizjak at gmail dot com 2024-02-27 17:42 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113871-4-u32iWGy2xS@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).