From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B61AD3858C2D; Tue, 10 Jan 2023 16:20:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B61AD3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673367626; bh=wEGWRuEDmZPnIBs/8X4AChWlnrAlr3McN5iU/VUTbf4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yPJIdSVxRe15LK11bgoJnZDNbzbZdl/DUCd9mcTG17zHLC8luIzesc2GWmc06elic u9u5F86xqN7WC8sPKruiYMrU7wtcNuL2aREPgHbibZR2CoxZPsI3B5lfJmIs7/chlJ NwiC9awF6/L6VhCQg4xQC45vQtnxoYA/9TUCyTh8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108355] [13 Regression] Dead Code Elimination Regression at -O2 since r13-2772-g9baee6181b4e42 Date: Tue, 10 Jan 2023 16:20:26 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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=3D108355 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org --- Comment #1 from Richard Biener --- Confirmed. We're doing Value numbering stmt =3D _2 =3D e[5][a.0_1]; Skipping possible redundant definition e[5][0] =3D 1; Setting value number of _2 to _2 (changed) now, by skipping the def we're no longer then optimistically assuming a.0_1 =3D=3D 0 when formerly using the assignment-from-constant _3 trick. That wasn't done by design - if we'd handle this optimistically by design we'd have more canonical reference ops for e[5][a.0_1]. Not sure if worth fixing.=