From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCF4A386F444; Wed, 10 Jan 2024 22:25:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCF4A386F444 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704925519; bh=RwSadtsJ5itP2AZGuormRYxtMUbIJyaOEkrr6jlgSUo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EKIxOErH4NcncPKdrMfmK4VAVGCmVzynrqwtONelnoq8i4AfkWrVDnEBkPATCjQIK i3GCDsGDGghV78TLxoyQZAdFlJzD/Eoj20GImV70PmyZMA8kgwMWwUQ4XkP3Qgo+Gz LnG1yeaWszdp83lhH1Ln+I4ikWwXWzU0ge8zrNbg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113301] [12/13/14 Regression] Missed optimization: (1/(x+1))/2 => 0 since gcc-12 Date: Wed, 10 Jan 2024 22:25:17 +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: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status see_also 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=3D113301 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org Status|NEW |ASSIGNED See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D103257 --- Comment #7 from Andrew Pinski --- I have a patch which disables the "simplification" of "1/x" for signed until late which solves this missed optimization. I will post it once it finishes testing. Note we already delayed the simplification of `bool * d` to `bool?A:0` until late for similar reasons, see PR 103257 on that.=