From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B670B3858C2C; Mon, 25 Oct 2021 08:57:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B670B3858C2C From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102902] [12 Regression] -O3 produces code that uses an uninitialized variable but originally was not used by r12-3876 Date: Mon, 25 Oct 2021 08:57: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: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org 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: 12.0 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: Mon, 25 Oct 2021 08:57:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102902 --- Comment #4 from Martin Li=C5=A1ka --- (In reply to Martin Li=C5=A1ka from comment #3) > I guess fixed with: >=20 > commit aa15952d646fd5dd569fce287b719a737ae66e4f (HEAD -> master, > origin/trunk, origin/master, origin/HEAD) > Author: Richard Biener > Date: Mon Oct 25 09:33:15 2021 +0200 >=20 > tree-optimization/102920 - fix PHI VN with undefined args >=20=20=20=20=20 > This fixes a latent issue exposed by now allowing VN_TOP in PHI > arguments. We may only use optimistic equality when merging values on > different edges, not when merging values on the same edge - in partic= ular > we may not choose the undef value on any edge when there's a not undef > value as well. >=20=20=20=20=20 > 2021-10-25 Richard Biener >=20=20=20=20=20 > PR tree-optimization/102920 > * tree-ssa-sccvn.h (expressions_equal_p): Add argument > controlling VN_TOP matching behavior. > * tree-ssa-sccvn.c (expressions_equal_p): Likewise. > (vn_phi_eq): Do not optimistically match VN_TOP. >=20=20=20=20=20 > * gcc.dg/torture/pr102920.c: New testcase. Sorry, wrong PR.=