public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/95046] New: Vectorize V2SFmode operations Date: Mon, 11 May 2020 07:12:21 +0000 [thread overview] Message-ID: <bug-95046-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95046 Bug ID: 95046 Summary: Vectorize V2SFmode operations Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com Target Milestone: --- The compiler should vectorize V2SF operations using XMM registers. The same principles as applied to integer MMX operations (mmx-with-sse) should also apply to V2SF mode operations, but to avoid unwanted secondary effects (e.g. exceptions) extra care should be taken to load values to registers with parts outside V2SFmode cleared. Following testcase: --cut here-- float r[2], a[2], b[2]; void foo (void) { for (int i = 0; i < 2; i++) r[i] = a[i] + b[i]; } --cut here-- should vectorize to: movq a(%rip), %xmm0 movq b(%rip), %xmm1 addps %xmm1, %xmm0 movlps %xmm0, r(%rip) Please note movq insn that assures clearing of top 64bits of 128bit xmm register.
next reply other threads:[~2020-05-11 7:12 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-11 7:12 ubizjak at gmail dot com [this message] 2020-05-11 7:13 ` [Bug target/95046] " ubizjak at gmail dot com 2020-05-11 7:13 ` ubizjak at gmail dot com 2020-05-11 9:17 ` cvs-commit at gcc dot gnu.org 2020-05-11 14:39 ` cvs-commit at gcc dot gnu.org 2020-05-11 18:13 ` cvs-commit at gcc dot gnu.org 2020-05-12 15:06 ` cvs-commit at gcc dot gnu.org 2020-05-12 15:08 ` cvs-commit at gcc dot gnu.org 2020-05-12 16:38 ` cvs-commit at gcc dot gnu.org 2020-05-12 17:25 ` cvs-commit at gcc dot gnu.org 2020-05-14 7:16 ` cvs-commit at gcc dot gnu.org 2020-05-14 11:48 ` cvs-commit at gcc dot gnu.org 2020-05-14 17:52 ` cvs-commit at gcc dot gnu.org 2020-05-15 7:25 ` cvs-commit at gcc dot gnu.org 2020-05-15 8:03 ` cvs-commit at gcc dot gnu.org 2020-12-10 9:45 ` ubizjak at gmail dot com 2021-06-29 17:18 ` cvs-commit at gcc dot gnu.org 2021-12-24 16:10 ` cvs-commit at gcc dot gnu.org 2021-12-27 9:12 ` 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-95046-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).