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/97352] gcc.dg/vect/bb-slp-pr78205.c fails to vectorize all opportunities with AVX
Date: Tue, 13 Oct 2020 11:47:24 +0000	[thread overview]
Message-ID: <bug-97352-4-R2Q6mXE8LU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97352-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97352

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So a simpler testcase is the following (but hinting at the possibly not generic
enough solution to split the load group):

double a[6], b[6];
void foo()
{
  a[0] = b[0];
  a[1] = b[1];
  a[2] = b[2];
  a[3] = b[3];
  a[4] = b[4];
  a[5] = b[5];
}

produces with SSE:

        movapd  b(%rip), %xmm0
        movapd  b+16(%rip), %xmm1
        movapd  b+32(%rip), %xmm2
        movaps  %xmm0, a(%rip)
        movaps  %xmm1, a+16(%rip)
        movaps  %xmm2, a+32(%rip)

and with AVX:

        vmovsd  b+32(%rip), %xmm0
        vmovapd b(%rip), %ymm1
        vmovsd  %xmm0, a+32(%rip)
        vmovsd  b+40(%rip), %xmm0
        vmovapd %ymm1, a(%rip)
        vmovsd  %xmm0, a+40(%rip)

while we'd like to see sth like

        vmovapd b(%rip), %ymm1
        vmovapd %ymm1, a(%rip)
        movapd  b+32(%rip), %xmm2
        movaps  %xmm2, a+32(%rip)

  parent reply	other threads:[~2020-10-13 11:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 11:05 [Bug tree-optimization/97352] New: " rguenth at gcc dot gnu.org
2020-10-12  7:29 ` [Bug tree-optimization/97352] " rguenth at gcc dot gnu.org
2020-10-13 11:47 ` rguenth at gcc dot gnu.org [this message]
2021-09-02 10:18 ` pinskia at gcc dot gnu.org
2021-09-10 12:24 ` rguenth at gcc dot gnu.org
2021-09-27  8:24 ` cvs-commit at gcc dot gnu.org
2021-09-27  8:25 ` 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-97352-4-R2Q6mXE8LU@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: link
Be 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).