public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/66051] New: can't vectorize reductions inside an SLP group Date: Thu, 07 May 2015 14:16:00 -0000 [thread overview] Message-ID: <bug-66051-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66051 Bug ID: 66051 Summary: can't vectorize reductions inside an SLP group Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Blocks: 53947 Target Milestone: --- void foo (int *p, short *q, int n) { int i; for (i = 0; i < n; ++i) { p[i*4+0] = q[i*8+0] + q[i*8+4]; p[i*4+1] = q[i*8+1] + q[i*8+5]; p[i*4+2] = q[i*8+2] + q[i*8+6]; p[i*4+3] = q[i*8+3] + q[i*8+7]; } } is vectorized by unrolling the loop 4 times instead of using SLP because t3.c:4:3: note: Build SLP for _15 = *_14; t3.c:4:3: note: Build SLP failed: grouped loads have gaps _15 = *_14; which isn't the whole story (I don't think we support this kind of "reductions"). The SLP build runs into two load children, one loading [0, 3] and one loading [4, 7] of a single group (and thus producing gaps). Ideally we vectorize this with a single load of [0, 7], shuffle, add and only unpack the low part. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations
next reply other threads:[~2015-05-07 14:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-05-07 14:16 rguenth at gcc dot gnu.org [this message] 2015-05-07 14:16 ` [Bug tree-optimization/66051] " rguenth 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-66051-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).