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/109747] [12/13/14 Regression] SLP cost of constructors is off Date: Fri, 05 May 2023 12:02:50 +0000 [thread overview] Message-ID: <bug-109747-4-dcG8dKhbAm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109747-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109747 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |12.3 Target| |x86_64-*-* i?86-*-* Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED CC| |rsandifo at gcc dot gnu.org Ever confirmed|0 |1 Keywords| |missed-optimization Last reconfirmed| |2023-05-05 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- A fix, and maybe exactly a step in the right direction, would be to construct individual new SLP nodes for each call to record_stmt_cost from vect_prologue_cost_for_slp: /* ??? We're just tracking whether vectors in a single node are the same. Ideally we'd do something more global. */ for (unsigned int start : starts) { vect_cost_for_stmt kind; if (SLP_TREE_DEF_TYPE (node) == vect_constant_def) kind = vector_load; else if (vect_scalar_ops_slice { ops, start, nelt_limit }.all_same_p ()) kind = scalar_to_vec; else kind = vec_construct; record_stmt_cost (cost_vec, 1, kind, node, vectype, 0, vect_prologue); } alternatively we could pass down 'start' as well. The x86 backend code could also detect the mismatch of TYPE_VECTOR_SUBPARTS * count and the number of SLP lanes (but not sure what it should do in that case). Note we can't currently meaningfully put such a split set of SLP nodes into the SLP graph, but in the end we might want to go into the direction of splitting it into individual vector ops, esp. for load/store vectorization and interleaving. Short-term passing down 'start' (and only interpreting it with count is one?) might be easiest. Any opinions?
next prev parent reply other threads:[~2023-05-05 12:02 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-05 11:56 [Bug target/109747] New: " rguenth at gcc dot gnu.org 2023-05-05 12:02 ` rguenth at gcc dot gnu.org [this message] 2023-05-08 12:27 ` [Bug target/109747] " rguenth at gcc dot gnu.org 2023-05-09 11:05 ` rguenth at gcc dot gnu.org 2023-05-23 16:59 ` cvs-commit at gcc dot gnu.org 2023-05-23 17:00 ` [Bug target/109747] [12/13 " 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-109747-4-dcG8dKhbAm@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).