From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B4C5385700D; Sun, 18 Jul 2021 21:09:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B4C5385700D From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61051] Duplicated instructions in both conditional branches Date: Sun, 18 Jul 2021 21:09:48 +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: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component bug_status resolution target_milestone keywords 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: Sun, 18 Jul 2021 21:09:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61051 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |tree-optimization Status|WAITING |RESOLVED Resolution|--- |FIXED Target Milestone|--- |10.0 Keywords| |missed-optimization --- Comment #3 from Andrew Pinski --- Fixed on the trunk: x.0_4 =3D x; if (_3 !=3D x.0_4) goto ; [66.00%] else goto ; [34.00%] [local count: 195204118]: [local count: 574129753]: # prephitmp_24 =3D PHI <1(3), 2(4)> r.1_5 =3D r; pretmp_26 =3D d; if (r.1_5 > 0) goto ; [59.00%] else goto ; [41.00%] [local count: 338736556]: f_18 =3D pretmp_26 + 1; [local count: 574129754]: # f_9 =3D PHI I think it has been fixed in since at least GCC 10 even.=