From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 750233858292; Mon, 18 Dec 2023 07:14:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 750233858292 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702883670; bh=3bM3yU4fDbKejJLyMw7xguftL272fiCX/YvzoL6Z6cw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xyeW692ZdNASJFrMQw/Fb6xviUnlqE0NUeRUCMyoQsa+el2YhlxAEYDdbRb7WQ1rU Wjl+tT6cL71421YavHVG7qmxYYcq8buBxyHg9mu5XnoaW+e2+PCf7MhOF5ANcMk9ut NcC2Kinv8QOLxwK8eyDq8lyCoBvVmZRQ2UjbjPuk= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113026] Bogus -Wstringop-overflow warning on simple memcpy type loop Date: Mon, 18 Dec 2023 07:14:29 +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: 14.0 X-Bugzilla-Keywords: diagnostic, 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: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113026 --- Comment #5 from rguenther at suse dot de --- On Fri, 15 Dec 2023, avieira at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113026 >=20 > --- Comment #4 from avieira at gcc dot gnu.org --- > Drive by comments as it's been a while since I looked at this. I'm also > surprised we didn't adjust the bounds. But why do we only subtract VF? Li= ke you > say, if there's no loop around edge, can't we guarantee the epilogue will= only > need to iterate at most VF-1? This is assuming we didn't take an early e= xit, > if we do then we can't assume anything as the iterations 'reset'. Subtracting can bring down epilogue iterations max to 1 while yes, we should also apply a max of VF-1 but in addition to the subtraction.=