From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E69413858CDA; Thu, 14 Sep 2023 01:16:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E69413858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694654202; bh=yoU2+DTqGzwnD4+78O8OFwMVH/RH6cgrEbMgZuAfSR4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fVLr0G6ehdk+TPg/1Fre4jjjiz++QsWt+LEoo5NPYEDnnAk9IiR2PTzH3yTCimqTz 9I3QYFNorEX6qwWV86HyBZyPaHjzBJmgcVg3k9N7iH43jY0DxyjBbLSbnBADeTgMPQ 1WMAFdxTMTeIJ3fEdKvuIffCaNIz+7/2alY52600= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111402] Loop distribution fail to optimize memmove for multiple consecutive moves within a loop Date: Thu, 14 Sep 2023 01:16:41 +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: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht 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: 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=3D111402 --- Comment #2 from Hongtao.liu --- Adjust code in foo1, use < n instead of !=3D n, the issue remains. void foo1 (v4di* __restrict a, v4di *b, int n) { for (int i =3D 0; i < n; i+=3D2) { a[i] =3D b[i]; a[i+1] =3D b[i+1];=20=20=20 } }=