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: Wed, 25 Aug 2021 07:19:17 +0000	[thread overview]
Message-ID: <bug-101895-4-FwszfO2jJn@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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #3)
> Understood WRT phase ordering.  That was fully expected.
> 
> What I still don't understand is why moving the permute down is profitable
> here or generally why moving a permute into a dependency chain is profitable.
> 
> ISTM that hoisting a permute up a dependency chain so that it's fed by a
> load is profitable.  Similarly sinking a permute to the end of a dependency
> chain so that it feeds a store is profitable.  Moving a permute so that it
> feeds or is fed by another permute is probably profitable too.  Otherwise
> moving a permute into the middle of a dependency chain seems like a
> pessimization.

Yes, I agree.  As said vect_optimize_slp misses a part that pushes the
permutes back towards the loads.  At the moment it is designed to
move everything towards the stores (or reductions) with the intend to
get rid of them.  If that doesn't succeed the final placement of the
permutes isn't optimized - only the number of permutes is.

  parent reply	other threads:[~2021-08-25  7:19 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
2021-08-25  4:40 ` law at gcc dot gnu.org
2021-08-25  7:19 ` rguenth at gcc dot gnu.org [this message]
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-FwszfO2jJn@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).