From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 01FB138582B5; Fri, 24 Nov 2023 15:56:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01FB138582B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700841363; bh=N1YKUnnlyUdEjDFLSxXL56dBv2HA7KhKFISw4D7s668=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eVHk2A/rJZdLk2Rj+Ev7kJpYVqc/ZKQ5X+AKRGIi0b7rUTRQ7cENLGwbW7bLlitbn E2ReKyDX9cuxvAQRtHuqC0x7cglDv+0fHpDoVDNNU1Q1oq5EtUbz+vgHyCqyXMkoDt ejY/MvBbsppfQst4beh8BlQKqKnWOkVGV33YfGdg= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111293] [14 Regression] Missed Dead Code Elimination since r14-3414-g0cfc9c953d0 Date: Fri, 24 Nov 2023 15:56:02 +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: amacleod at redhat 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: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111293 --- Comment #2 from Andrew Macleod --- It seems like we set 'e' to 3 immediately at the start: [local count: 1073741824]: e =3D 3; goto ; [100.00%] and it is never changed again. However, when we load from 'e' later in the = IL [local count: 9485263241]: e.1_6 =3D e; we simply get varying. Is some pass suppose to propagate this? This remind= s me of a few other regression PRs where we no longer propagate known values from loads from memory into ssa-names. If we knew that e.1_6 was '3', then the call to foo would be folded away as never executable.=