From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C6C93858D38; Mon, 9 Jan 2023 12:48:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C6C93858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673268488; bh=4d4NmYVRLnCYaVVtvGjNKgZ5SuSdA4gs8h5cyFc8Cok=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dt9FDD896AcMs5Qv8xYMG5eSZhtGKGxqN71gSJmT2evN51WIpwuInqpYk/DSF8er/ H8LTgD2PW4QXxCK3EWGXjeGJRSsDNmz9FdYh3rqo7HeiexA5ofp2sGVhvRK0TTKzWA G/83AcDm/ZBNASTDvnLd0BN/tJCmUyx6Zy3r0VH8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108008] [12 Regression] wrong code with -O3 and posix_memalign since r12-4526-gd8edfadfc7a9795b Date: Mon, 09 Jan 2023 12:48:07 +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.2.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority cc see_also cf_known_to_work keywords 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=3D108008 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 CC| |rguenth at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D107323 Known to work| |13.0 Keywords| |needs-bisection --- Comment #13 from Richard Biener --- (In reply to Alexander Monakov from comment #9) > I think this is tree-ldist placing memset(sameZ, 0, zPlaneCount) after the > loop, overwriting conditional 'sameZ[i] =3D true' assignments that happen= in > the loop. >=20 > For the smaller testcase from comment #6, -O2 -ftree-loop-distribution is > enough, namely: >=20 > works: >=20 > gcc-12 -O2 -ftree-loop-distribution -fno-tree-vectorize > -fno-tree-loop-distribute-patterns >=20 > breaks: >=20 > gcc-12 -O2 -ftree-loop-distribution -fno-tree-vectorize Note I can not reproduce on the branch after r12-8855-g19a9b5e587e87f52, so maybe that's truly the duplicate. Bisecting on the branch might reveal that.=