public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/109747] New: [12/13/14 Regression] SLP cost of constructors is off
@ 2023-05-05 11:56 rguenth at gcc dot gnu.org
  2023-05-05 12:02 ` [Bug target/109747] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-05 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109747
           Summary: [12/13/14 Regression] SLP cost of constructors is off
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

When r12-7319-g90d693bdc9d718 added the accounting for GPR->XMM moves to the
cost of SLP CTORs I failed to realize that the costing code will pass down
the very same (and full) SLP node from vect_prologue_cost_for_slp but
will generate costs for each individual actual vector that's constructed.

So for the case where the SLP node covers more than one vector the costing
will be off.  That's visible in the costing of the testcase for PR108724
for example which is

void foo(int *a, const int *__restrict b, const int *__restrict c)
{
  for (int i = 0; i < 16; i++) {
    a[i] = b[i] + c[i];
  }
}

and we end up with

_17 8 times unaligned_store (misalign -1) costs 96 in body
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue
node 0x3fb5838 1 times vec_construct costs 100 in prologue

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-23 17:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05 11:56 [Bug target/109747] New: [12/13/14 Regression] SLP cost of constructors is off rguenth at gcc dot gnu.org
2023-05-05 12:02 ` [Bug target/109747] " rguenth at gcc dot gnu.org
2023-05-08 12:27 ` 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

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).