public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113027] New: aarch64 is missing vec_set and vec_extract for structure modes Date: Thu, 14 Dec 2023 22:44:40 +0000 [thread overview] Message-ID: <bug-113027-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113027 Bug ID: 113027 Summary: aarch64 is missing vec_set and vec_extract for structure modes Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: rsandifo at gcc dot gnu.org Target Milestone: --- The lack of vec_set and vec_extract optabs for structure modes means that the following testcase spills to the stack when compiled at -O2: #include <arm_neon.h> float64x2x2_t f1 (float64x2x2_t x) { x.val[0][1] += 1.0; return x; } float64x2x3_t f2 (float64x2x3_t x) { x.val[0][0] = x.val[1][1] + x.val[2][0]; return x; } float64x2x4_t f3 (float64x2x4_t x) { x.val[0][0] = x.val[1][1] + x.val[2][0] - x.val[3][1]; return x; } For example: f1: sub sp, sp, #32 fmov d31, 1.0e+0 st1 {v0.2d - v1.2d}, [sp] ldr d30, [sp, 8] fadd d31, d31, d30 str d31, [sp, 8] ld1 {v0.2d - v1.2d}, [sp] add sp, sp, 32 ret With the extra patterns, we instead get: f1: dup d31, v0.d[1] fmov d30, 1.0e+0 fadd d30, d31, d30 ins v0.d[1], v30.d[0] ret f2: dup d31, v1.d[1] fadd d31, d31, d2 ins v0.d[0], v31.d[0] ret f3: dup d31, v1.d[1] dup d30, v3.d[1] fadd d31, d31, d2 fsub d30, d31, d30 ins v0.d[0], v30.d[0] ret Fixing this might also make it possible to use structure modes for arrays (c.f. PR109543).
next reply other threads:[~2023-12-14 22:44 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-14 22:44 rsandifo at gcc dot gnu.org [this message] 2024-02-05 22:11 ` [Bug target/113027] " 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-113027-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).