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/101895] [11/12 Regression] SLP Vectorizer change pushes VEC_PERM_EXPR into bad location spoiling further optimization opportunities
Date: Mon, 16 Aug 2021 07:49:36 +0000	[thread overview]
Message-ID: <bug-101895-4-lX3lVZHgue@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101895-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P2
             Target|                            |x86_64-*-*
   Last reconfirmed|                            |2021-08-16

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

void foo(float * restrict a, float b, float *c) {
  a[0] = c[0]*b + a[0];
  a[1] = c[2]*b + a[1];
  a[2] = c[1]*b + a[2];
  a[3] = c[3]*b + a[3];
}

shows the issue on x86_64 with a lack of an FMA.  One complication is that
FMA forming is done in a later pass only thus the vectorizer has no guidance
to decide on placement of the permute.

Note the vectorizer permute optimization propagates in one direction only
(but the optimistic pieces), the intent is to reduce the number of permutes
which almost exclusively come from loads.

  parent reply	other threads:[~2021-08-16  7:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13  5:01 [Bug tree-optimization/101895] New: " law at gcc dot gnu.org
2021-08-13  5:24 ` [Bug tree-optimization/101895] " pinskia at gcc dot gnu.org
2021-08-13  5:24 ` pinskia at gcc dot gnu.org
2021-08-16  7:49 ` rguenth at gcc dot gnu.org [this message]
2021-08-25  4:40 ` law at gcc dot gnu.org
2021-08-25  7:19 ` rguenth at gcc dot gnu.org
2022-03-11 23:51 ` roger at nextmovesoftware dot com
2022-03-15  9:06 ` cvs-commit at gcc dot gnu.org
2022-03-15 23:44 ` roger at nextmovesoftware dot com
2022-03-16  7:10 ` [Bug tree-optimization/101895] [11 " rguenth at gcc dot gnu.org
2022-03-16 23:13 ` law at gcc dot gnu.org
2022-03-17 23:18 ` law at gcc dot gnu.org
2022-04-21  7:50 ` rguenth at gcc dot gnu.org
2023-05-29 10:05 ` jakub 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-101895-4-lX3lVZHgue@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).