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/99412] s352 benchmark of TSVC is vectorized by clang and not by gcc
Date: Thu, 12 Jan 2023 13:42:30 +0000	[thread overview]
Message-ID: <bug-99412-4-puoSi170sF@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99412-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC now does

.L2:
        vmovaps b(%rax), %xmm6
        vmulps  a(%rax), %xmm6, %xmm0
        addq    $80, %rax
        vmovaps b-64(%rax), %xmm7
        vmovaps b-48(%rax), %xmm6
        vaddps  %xmm0, %xmm5, %xmm5
        vmulps  a-64(%rax), %xmm7, %xmm0
        vmovaps b-32(%rax), %xmm7
        vaddps  %xmm0, %xmm1, %xmm1
        vmulps  a-48(%rax), %xmm6, %xmm0
        vmovaps b-16(%rax), %xmm6
        vaddps  %xmm0, %xmm4, %xmm4
        vmulps  a-32(%rax), %xmm7, %xmm0
        vaddps  %xmm0, %xmm2, %xmm2
        vmulps  a-16(%rax), %xmm6, %xmm0
        vaddps  %xmm0, %xmm3, %xmm3
        cmpq    $128000, %rax
        jne     .L2

thus uses a VF of 4 with -Ofast.  Your LLVM snippet uses 5 lanes
instead of our 20 with four lanes in a V4SF and one lane in a scalar.
That's interesting but not something we support.

Re-rolling would mean using a single v4sf 4 lane vector here.  For
a pure SLP loop something like this should be possible without too
much hassle I think.  We'd just need to try ... (and think of if it's
worth in real life)

For the purpose of the Summary this is fixed now.

  parent reply	other threads:[~2023-01-12 13:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 14:54 [Bug middle-end/99412] New: " hubicka at gcc dot gnu.org
2021-03-08  8:32 ` [Bug tree-optimization/99412] " rguenth at gcc dot gnu.org
2021-06-09 12:54 ` rguenth at gcc dot gnu.org
2023-01-11 19:14 ` hubicka at gcc dot gnu.org
2023-01-12  9:12 ` rguenth at gcc dot gnu.org
2023-01-12  9:30 ` rguenth at gcc dot gnu.org
2023-01-12 13:30 ` cvs-commit at gcc dot gnu.org
2023-01-12 13:42 ` rguenth at gcc dot gnu.org [this message]
2023-01-12 13:42 ` 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-99412-4-puoSi170sF@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).