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 target/99881] Regression compare -O2 -ftree-vectorize with -O2 on SKX/CLX Date: Tue, 06 Apr 2021 11:44:22 +0000 [thread overview] Message-ID: <bug-99881-4-Q7vReEIVQq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99881-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99881 --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Hongtao.liu from comment #4) > (In reply to Richard Biener from comment #3) > > But 2 element construction _should_ be cheap. What is missing is the move > > cost from GPR to XMM regs (but we do not have a good idea whether the sources > > are memory, so it's not as clear-cut here either). > > > > IMHO a better approach might be to up unaligned vector store/load costs? > > > > For the testcase at hand why does a throughput of 1 pose a problem? There's > > only one punpckldq instruction around? > > > > There're several lea/add(which also may use port 5) instructions around > punckldq, considering that FAST LEA and Int ALU will be common in address > computation, throughput of 1 for punckldq will be a bottleneck. > > refer to https://godbolt.org/z/hK9r5vTzd for original case Too bad. But this is starting to model resource constraints which are not at all handled by the generic part of the vectorizer cost model. We kind-of have the ability to do this in the target (see how rs6000 models some of this in its finis_cost hook via rs6000_density_test). But then the cost model suffers from quite some GIGO already and I fear adding complexity will only produce more 'G'. As you have seen you need quite some offset to make up for the saved store, I think trying to get integer_to_sse costed for the movd/pinsrq would be a better way than parametrizing 'vec_construct' (because there's no vec_construct instruction - there's multiple pieces to it). > > Note that for the case of non-loop vectorization of 'double' the two element > > vector CTORs are common and important to handle cheaply. See also all the > > discussion in PR98856
next prev parent reply other threads:[~2021-04-06 11:44 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-02 3:49 [Bug target/99881] New: " crazylht at gmail dot com 2021-04-02 14:29 ` [Bug target/99881] " hjl.tools at gmail dot com 2021-04-02 19:34 ` hjl.tools at gmail dot com 2021-04-06 7:48 ` rguenth at gcc dot gnu.org 2021-04-06 10:06 ` crazylht at gmail dot com 2021-04-06 11:44 ` rguenth at gcc dot gnu.org [this message] 2021-07-28 2:48 ` cvs-commit at gcc dot gnu.org 2021-07-28 2:49 ` crazylht at gmail dot com 2021-07-28 22:47 ` jakub at gcc dot gnu.org 2021-07-29 1:09 ` crazylht at gmail dot com 2021-07-29 2:18 ` cvs-commit at gcc dot gnu.org 2021-08-19 2:32 ` crazylht at gmail dot com 2022-02-22 7:59 ` cvs-commit at gcc dot gnu.org 2022-02-22 8:00 ` 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-99881-4-Q7vReEIVQq@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: linkBe 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).