public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100165] New: fmov could be used to zero out the upper bits instead of movi/zip or movi/ins with __builtin_shuffle and zero vector Date: Wed, 21 Apr 2021 00:47:06 +0000 [thread overview] Message-ID: <bug-100165-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100165 Bug ID: 100165 Summary: fmov could be used to zero out the upper bits instead of movi/zip or movi/ins with __builtin_shuffle and zero vector Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: aarch64-*-* Take: typedef double V __attribute__((vector_size(16))); typedef long long VI __attribute__((vector_size(16))); V foo (V x) { return __builtin_shuffle (x, (V) { 0, 0, }, (VI) {0, 3}); } ----- CUT ---- Or typedef float V __attribute__((vector_size(16))); typedef int VI __attribute__((vector_size(16))); V foo (V x) { return __builtin_shuffle (x, (V) { 0, 0, 0, 0 }, (VI) {0, 1, 4, 5}); } ---- CUT ---- Both should just produce: fmov d0, d0 ret ---- CUT ---- The x86_64 specific version of this was PR 94680 which I just confirmed today.
next reply other threads:[~2021-04-21 0:47 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-21 0:47 pinskia at gcc dot gnu.org [this message] 2021-08-25 8:13 ` [Bug target/100165] " pinskia at gcc dot gnu.org 2023-11-12 21:27 ` pinskia at gcc dot gnu.org 2023-11-12 21:32 ` pinskia at gcc dot gnu.org 2023-11-12 21:45 ` pinskia at gcc dot gnu.org 2023-11-12 21:45 ` pinskia at gcc dot gnu.org 2024-02-27 8:44 ` pinskia 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-100165-4@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).