From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3FBD73858C53; Sat, 26 Aug 2023 00:06:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3FBD73858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693008380; bh=O+ufwWso1I3i4Xid9SZmER/kwnbzBqIz+UqGzVOxR1E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r+lebD8bM8rXHnPs2yBctIardtyvFlK5glNHLFru+wiuCppAhkYFtD8PoVWiTkyMR 2VpHoa191ADJfc3dgY9mfRRlME843J4yce5zlUi3FszU+UWfS1XYQYxi4cDJh6QHt5 DCihTDiA2uYzVCLbov1TdMZ9GvinRkb2k0C3HOII= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110891] [14 Regression] Dead Code Elimination Regression since r14-2674-gd0de3bf9175 Date: Sat, 26 Aug 2023 00:06:20 +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: pinskia 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: 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=3D110891 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > One thing I noticed (I don't know if causes the missed optimization) is t= hat > we have before PRE: > ``` > [local count: 1073531371]: > if (a.0_1 !=3D 0) > goto ; [50.00%] > else > goto ; [50.00%] >=20 > [local count: 536765686]: > if (_28 =3D=3D &d) > goto ; [30.00%] > else > goto ; [70.00%] >=20 > [local count: 536765685]: > if (_28 =3D=3D &d) > goto ; [30.00%] > else > goto ; [70.00%] > ``` > Which obvious should just be `if (_28 =3D=3D &d) goto bb9; else goto bb7;= ` and > not check `a.0_1` at all. I wonder if ifcombine could optimize that instead of requiring PRE. I think that might even fix the issue too.=