From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DE2B3858D33; Wed, 9 Aug 2023 19:53:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DE2B3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691610780; bh=x9Na+Bn3xeNbV+4lF9b356pguunOnrzlj+EWwtMfPl8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rAwxzaDf36PJuMYuIAM6vBcLwjccpWiMiHhyt5EJ1Arbrg+L6LkzB6aJ98FPwPTbe cd0zisnDuXpT57T+qUkdyIxqDUOIKAe89IA1jaKdgADy77yDoffOYs18XSSK19nt9Y 1cEf6pLumvZHYfqVMNhmP4Wnry11A15dHhFeFEPo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110963] [14 Regression] Dead Code Elimination Regression since r14-2946-g46c8c225455 Date: Wed, 09 Aug 2023 19:52:59 +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: cf_reconfirmed_on bug_status everconfirmed 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=3D110963 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-08-09 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed. PRE seems to have missed an obvious redundant load here though: The IR after PRE: ``` pretmp_12 =3D h; if (f.2_9 !=3D 0) goto ; [50.00%] else goto ; [50.00%] ... [local count: 536870912]: if (pretmp_12 =3D=3D 0B) goto ; [30.00%] else goto ; [70.00%] [local count: 375809640]: h =3D 0B; [local count: 536870912]: g =3D 0; h.6_15 =3D h; ``` The IR before PRE: ``` [local count: 1073741824]: # VUSE <.MEM_2(D)> f.2_9 =3D f; if (f.2_9 !=3D 0) goto ; [50.00%] else goto ; [50.00%] [local count: 536870912]: # VUSE <.MEM_2(D)> _11 =3D h; if (_11 !=3D 0B) goto ; [0.00%] else goto ; [100.00%] ... [local count: 536870912]: # VUSE <.MEM_2(D)> _13 =3D h; if (_13 =3D=3D 0B) goto ; [30.00%] else goto ; [70.00%] [local count: 375809640]: # .MEM_20 =3D VDEF <.MEM_2(D)> h =3D 0B; [local count: 536870912]: # .MEM_16 =3D PHI <.MEM_2(D)(5), .MEM_20(6)> # .MEM_21 =3D VDEF <.MEM_16> g =3D 0; # VUSE <.MEM_21> h.6_15 =3D h; ```=