From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A41CD3858036; Tue, 17 May 2022 02:47:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A41CD3858036 From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105617] [12/13 Regression] Slp is maybe too aggressive in some/many cases Date: Tue, 17 May 2022 02:47:29 +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.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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: 12.2 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2022 02:47:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105617 --- Comment #7 from Hongtao.liu --- Hmm, we have specific code to add scalar->vector(vmovq) cost to vector construct, but it seems not to work here, guess it's because &r0,and though= t it was load not scalar=EF=BC=9F=20 r0.1_21 1 times scalar_store costs 12 in body r1.3_23 1 times scalar_store costs 12 in body r2.5_25 1 times scalar_store costs 12 in body r3.7_27 1 times scalar_store costs 12 in body node 0x866f238 1 times vec_construct costs 4 in prologue node 0x866f238 1 times vec_construct costs 4 in prologue r0.1_21 2 times unaligned_store (misalign -1) costs 24 in body /app/example.c:10:10: note: Cost model analysis for part in loop 0: Vector cost: 32 Scalar cost: 48=