From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8D22C385773B; Fri, 5 May 2023 11:56:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D22C385773B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683287779; bh=n6+hrL8AuMf0CW5qDqoZLoJ+qzLevosJ94cCa9400NU=; h=From:To:Subject:Date:From; b=Ef+bJN72cxSv8Q7CD0JbDBnzgBSFn8pNhcv3FQxGuBBlhz7yMI/7FxoiqWMmKRfW9 RSj6LlHe8wB2+W1kF/VoLDOc1jO/agxadqUIpgBUWz2/8svqiY8tnUQjhAjZlWosvR h1549FnarmKWM4gdRf9/sMcPT7j2CGI3+c7z7hqQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109747] New: [12/13/14 Regression] SLP cost of constructors is off Date: Fri, 05 May 2023 11:56:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109747 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 =3D 0; i < 16; i++) { a[i] =3D 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=