From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9599F388A406; Thu, 15 Apr 2021 11:30:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9599F388A406 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99971] GCC generates partially vectorized and scalar code at once Date: Thu, 15 Apr 2021 11:30:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: --- 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: Thu, 15 Apr 2021 11:30:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99971 --- Comment #5 from Richard Biener --- (In reply to Richard Biener from comment #4) > (In reply to andysem from comment #3) > > I tried adding __restrict__ to the equivalents of x, y1 and y2 in the > > original larger code base and it didn't help. The compiler (gcc 10.2) w= ould > > still generate the same half-vectorized code. >=20 > Hmm, that's odd. I suppose the equivalent of test() was inlined in the > larger code base? >=20 > I'd be interested in preprocessed source of a translation unit that exhib= its > this issue (and a pointer to the point in the source that is relevant). >=20 > Note for GCC 12 I have a patch to improve things w/o requiring the use > of __restrict (and I'm curious on whether that helps for the larger code > base). https://gcc.gnu.org/pipermail/gcc-patches/2021-April/567805.html is the patch which applies to current master.=