From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F9253858C20; Mon, 7 Mar 2022 09:03:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F9253858C20 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101929] [12 Regression] r12-7319 regress x264_r by 4% on CLX. Date: Mon, 07 Mar 2022 09:03:54 +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: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Mon, 07 Mar 2022 09:03:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101929 --- Comment #9 from rguenther at suse dot de --- On Mon, 7 Mar 2022, crazylht at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101929 >=20 > --- Comment #8 from Hongtao.liu --- > (In reply to Richard Biener from comment #7) > > Another change to mute the effect somewhat (but not fixing x264) that w= as > > mentioned is > >=20 > > diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc > > index b2bf90576d5..acf2cc977b4 100644 > > --- a/gcc/config/i386/i386.cc > > +++ b/gcc/config/i386/i386.cc > > @@ -22595,7 +22595,7 @@ ix86_builtin_vectorization_cost (enum > > vect_cost_for_stmt type_of_cost, > > case vec_construct: > > { > > /* N element inserts into SSE vectors. */ > > - int cost =3D TYPE_VECTOR_SUBPARTS (vectype) * ix86_cost->sse_= op; > > + int cost =3D (TYPE_VECTOR_SUBPARTS (vectype) - 1) * > > ix86_cost->sse_op; > n - 1 is right for 128-bit vector, but for 256-bit vector, shouldn't it b= e n - > 2, since we have a separate cost for vinserti128, and n - 4 for 512-bit o= ne. True! Note that without SLP the gpr->xmm move cost is not yet accounted for (for loops the cases where we will need an actual gpr->xmm move will be restricted to CTORs emitted in the prologue - in-loop cases will always come from memory, so it might not be too important to get that correct for the non-SLP case).=