public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/101908] [12 regression] cray regression with -O2 -ftree-slp-vectorize compared to -O2
Date: Mon, 14 Mar 2022 09:16:00 +0000	[thread overview]
Message-ID: <bug-101908-4-eNkhIDmgtg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101908-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #40 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 14 Mar 2022, crazylht at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101908
> 
> --- Comment #39 from Hongtao.liu <crazylht at gmail dot com> ---
> 
> > I'll see if I get around to prototype some argument classification
> > in the vectorizer (looking how hard it is to use
> > INIT_CUMULATIVE_ARGS in a context where we are not expanding to RTL),
> > unfortunately stack passing is done by code in function.cc (plus
> > extra target hooks of course), but it might be easy enough to figure
> > alignment and size at least (and whether arguments are passed on
> > the stack or not).
> 
> According to Intel software optimization guide,  
> When using an unmasked store instruction, and load instruction after it, data
> forwarding depends on ***load type, size and address offset from store
> address***, and does not depend on the store address itself (i.e., the store
> address does not have to be aligned to or fit into cache line, forwarding will
> occur for nonaligned and even line-split stores).
> The figure below describes all possible cases when data forwarding will occur.
> 
> I'm not sure if we can get store size in the vectorizer, how parameter been
> pushed to stack by caller also matters for STLF.

Yes, but since we now use _by_pieces for stack pushing we can try aligning
heuristics on both sides.  The main point of using INIT_CUMULATIVE_ARGS
is of course to figure whether a decl is passed in registers - there
are plenty of PRs where we get costs wrong for that case.

My additional worry is that we're going to be too pessimistic for
cases that execute long after the argument setup and thus will fetch
from L1 instead of forward from the store buffers.

  parent reply	other threads:[~2022-03-14  9:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 14:27 [Bug middle-end/101908] New: " hubicka at gcc dot gnu.org
2021-08-16  8:33 ` [Bug middle-end/101908] " crazylht at gmail dot com
2021-08-16  9:05 ` [Bug tree-optimization/101908] " rguenth at gcc dot gnu.org
2021-08-16  9:06 ` rguenth at gcc dot gnu.org
2021-08-25  7:47 ` crazylht at gmail dot com
2021-10-28 12:26 ` [Bug tree-optimization/101908] [12 regression] " hubicka at gcc dot gnu.org
2021-10-28 12:39 ` hubicka at gcc dot gnu.org
2021-10-28 13:02 ` rguenth at gcc dot gnu.org
2021-10-28 13:05 ` rguenth at gcc dot gnu.org
2021-10-28 13:06 ` hubicka at kam dot mff.cuni.cz
2021-10-28 13:09 ` hubicka at kam dot mff.cuni.cz
2021-10-28 13:09 ` rguenth at gcc dot gnu.org
2021-10-28 13:12 ` hubicka at kam dot mff.cuni.cz
2021-10-28 13:13 ` rguenth at gcc dot gnu.org
2021-10-28 13:15 ` rguenth at gcc dot gnu.org
2021-10-28 13:21 ` rguenth at gcc dot gnu.org
2021-10-29 13:58 ` hubicka at kam dot mff.cuni.cz
2022-01-20 11:12 ` rguenth at gcc dot gnu.org
2022-01-20 11:26 ` [Bug target/101908] " rguenth at gcc dot gnu.org
2022-01-20 11:52 ` rguenth at gcc dot gnu.org
2022-02-24  9:54 ` rguenth at gcc dot gnu.org
2022-02-25  3:57 ` crazylht at gmail dot com
2022-02-25  7:33 ` rguenth at gcc dot gnu.org
2022-02-25  8:26 ` lili.cui at intel dot com
2022-02-25  8:31 ` lili.cui at intel dot com
2022-02-25 15:27 ` hjl.tools at gmail dot com
2022-02-28  1:29 ` crazylht at gmail dot com
2022-02-28  1:30 ` crazylht at gmail dot com
2022-02-28  5:13 ` lili.cui at intel dot com
2022-03-01  9:33 ` crazylht at gmail dot com
2022-03-10 13:47 ` crazylht at gmail dot com
2022-03-10 13:54 ` crazylht at gmail dot com
2022-03-10 13:55 ` crazylht at gmail dot com
2022-03-11  7:11 ` crazylht at gmail dot com
2022-03-11  8:32 ` rguenth at gcc dot gnu.org
2022-03-11  8:48 ` crazylht at gmail dot com
2022-03-11 10:41 ` rguenth at gcc dot gnu.org
2022-03-11 13:14 ` crazylht at gmail dot com
2022-03-11 13:27 ` rguenther at suse dot de
2022-03-14  9:05 ` crazylht at gmail dot com
2022-03-14  9:16 ` rguenther at suse dot de [this message]
2022-03-15  1:52 ` crazylht at gmail dot com
2022-03-15  7:14 ` rguenther at suse dot de
2022-03-29  3:40 ` crazylht at gmail dot com
2022-03-29  4:01 ` crazylht at gmail dot com
2022-03-29  6:47 ` rguenther at suse dot de
2022-03-29  8:27 ` crazylht at gmail dot com
2022-03-29 10:00 ` rguenther at suse dot de
2022-04-05  5:17 ` cvs-commit at gcc dot gnu.org
2022-04-05  6:24 ` 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-101908-4-eNkhIDmgtg@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).