From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 148E63857831; Wed, 4 May 2022 13:06:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 148E63857831 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103116] SLP vectoriser fails to peel for gaps Date: Wed, 04 May 2022 13:06:21 +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: 12.0 X-Bugzilla-Keywords: wrong-code 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: --- 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: Wed, 04 May 2022 13:06:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103116 --- Comment #6 from rguenther at suse dot de --- On Wed, 4 May 2022, rsandifo at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103116 >=20 > --- Comment #5 from rsandifo at gcc dot gnu.org --- > (In reply to Richard Biener from comment #3) > > We could make peeling for gaps handle this by making it not a flag but > > indicate the number of vector(!?) iterations we need to peel. > I think it'd be better to keep it in scalar iterations if possible. > For example, we still need to peel for gaps when using masked LD2s > if only the first vector result is needed. But we do only need to > peel 1 scalar iteration, rather than a whole vector's worth. >=20 > But yeah, agree that moving from 0-or-1 to a general number sounds good. Yep. I'll keep that for GCC 13, the posted fix should be what we can reasonably easy backport.=