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/99409] s252 benchmark of TSVC is vectorized by clang and not by gcc
Date: Mon, 08 Mar 2021 08:23:21 +0000	[thread overview]
Message-ID: <bug-99409-4-cZLL5dEMj9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99409-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Blocks|                            |53947
          Component|middle-end                  |tree-optimization

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, we can't do 'scalar expansion'.  We'd need some pre-pass to turn PHIs
into data accesses.  Here we want

        t[0] = (real_t) 0.;
        for (int i = 0; i < LEN_1D; i++) {
            s = b[i] * c[i];
            a[i] = s + t[i];
            t[i+1] = s;
        }

and then of course the trick is to elide the actual array and instead do
clever shuffling of vector registers instead.

IIRC one of the other TSVC examples was similar.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

  reply	other threads:[~2021-03-08  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 14:23 [Bug middle-end/99409] New: " hubicka at gcc dot gnu.org
2021-03-08  8:23 ` rguenth at gcc dot gnu.org [this message]
2022-10-17 10:36 ` [Bug tree-optimization/99409] " cvs-commit at gcc dot gnu.org
2022-10-17 10:40 ` 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-99409-4-cZLL5dEMj9@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).