From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77031385843E; Fri, 10 Mar 2023 08:50:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77031385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678438249; bh=Gyl3EPPFJDF6WYNjvRRYPLH8A5irJOOGc7QD3AnppiY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hhZwOm85tto49VWXD70A5A/UjqEc/rmMHdB6fYQSjWA7LD0XTEIZzV+mubFzklDcX ShM9a+LZs9wIkyH1/mZeEmX5ddamyah71nlmD9DD8QbKY+/MPjAVJ2hroC4672OGGk fdLovox/EKPvurjZ1+wb5nUqoYwWqwQ1UsDCwyXU= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109072] [12/13 Regression] SLP costs for vec duplicate too high since g:4963079769c99c4073adfd799885410ad484cbbe Date: Fri, 10 Mar 2023 08:50:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D109072 --- Comment #8 from rsandifo at gcc dot gnu.org --- (In reply to Richard Biener from comment #7) > Whatever you do with cost heuristics you'll find a testcase where that > regresses. Yep. That's the one true invariant of costing :-) I think a heuristic based on vld1 does make sense though. Code like the example is the recommended endian-agnostic way of initialising an ACLE vector, so we should try extra hard to vectorise stores that are later reloaded using vld1. A longer-term fix that avoids the need for costing would be good too. But costing seems like the easiest way of avoiding this particular regression (in a way that's suitable for GCC 12 and 13).=