From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E03753858D33; Fri, 2 Apr 2021 14:29:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E03753858D33 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99881] Regression compare -O2 -ftree-vectorize with -O2 on SKX/CLX Date: Fri, 02 Apr 2021 14:29:27 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW 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: cf_reconfirmed_on everconfirmed bug_status 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: Fri, 02 Apr 2021 14:29:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99881 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-04-02 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from H.J. Lu --- (In reply to Hongtao.liu from comment #0) > testcase is extracted from 557.xz_r >=20 > void > foo (int* __restrict a, int n, int c) > { > a[0] =3D n; > a[1] =3D c; > } >=20 > gcc -O2 -ftree-vectorize -fvect-cost-model=3Dvery-cheap >=20 > foo(int*, int, int): > movd xmm0, esi > movd xmm1, edx > punpckldq xmm0, xmm1 > movq QWORD PTR [rdi], xmm0 > ret >=20 > without vectorization >=20 > foo(int*, int, int): > mov DWORD PTR [rdi], esi > mov DWORD PTR [rdi+4], edx > ret >=20 > cost model: > scalar: 2 times scalar_store costs 24, > vector: 1 times unaligned_store costs 12, vec_contruct 8 How is vec_contruct cost computed today?=