From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F16C383F947; Wed, 8 Jun 2022 23:53:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F16C383F947 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105903] Missed optimization for __synth3way Date: Wed, 08 Jun 2022 23:53:22 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: component bug_status everconfirmed bug_severity cf_reconfirmed_on 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: Wed, 08 Jun 2022 23:53:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105903 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |tree-optimization Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Severity|normal |enhancement Last reconfirmed| |2022-06-08 Keywords| |missed-optimization --- Comment #1 from Andrew Pinski --- Confirmed. Currently we have inside phiopt4 if (_5 < _6) goto ; [50.00%] else goto ; [50.00%] [local count: 536870913]: _9 =3D _5 > _6; [local count: 1073741824]: # prephitmp_10 =3D PHI <0(2), _9(3)> That is: (_5 < _6) ? 0 : (_5 > _6) Which I think can be optimized to just: (_5 > _6)=