From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E96A3858D28; Mon, 7 Aug 2023 08:40:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E96A3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691397617; bh=j+J8A67dnfYd/QttEqSjiaUDDCIp+yX9WJVLwDmFFSU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nOXkx+DIxpZ80IgvBwYgdYdgY9OkeseAw0Twb0/eEdJ25uN/NTwcmwy2xDSs0Ofn7 JqTqqRjDL79vwGc/HIEfMZ44bj0hpdilZUoDGSZDYF46Tj+ruqaiG1oE8yjoATUHva qXpaVuXwsz2tR+qLMBHv+8TWza17K8Doh7hExrVc= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105832] [13/14 Regression] Dead Code Elimination Regression at -O3 (trunk vs. 12.1.0) Date: Mon, 07 Aug 2023 08:40:12 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to 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=3D105832 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org --- Comment #14 from Andrew Pinski --- (In reply to Andrew Pinski from comment #10) > I think the simple way of fixing this is optimizing: > ``` > bool f(int g) > { > return (1 >> g) !=3D 0; > } > ``` > into > ``` > bool f0(int g) > { > return g =3D=3D 0; > } > ``` I am going to do the above.=