From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2555385840D; Thu, 9 May 2024 14:28:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2555385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715264935; bh=Z/751U0sntg8PuL8aMwMeHOrmNR4dPNz2XJNo0Z3ufQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lM03Ugmn+oiKaBJ+vP83Ekx9Qqmt5JYZ3QgGOhalQdCl43IN2GXL/1IuXbhc7WW3d dzMglwS8ux6YyZ2Wn48NloVK+JzGBKsymR/DlxWvKVGPATGd14vpW/pycSk/MtvNEA 7GFU0H9GKDAaHQMuGEDBV/OL5yNXOIsIcHYu/Qrg= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115011] [14/15 Regression] Missed optimization: (bool) (f ? 1: t) ==> 1 when bool t = (0 >= f) + x; Date: Thu, 09 May 2024 14:28:55 +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: 15.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: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on 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=3D115011 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2024-05-09 00:00:00 | Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org --- Comment #2 from Andrew Pinski --- Confirmed. this was "exposed/caused" by my r14-3486-gd9a0d692ffc695 . We miss this in previous releases too (LLVM is only able to optimize it for LLVM 18+): ``` bool x; bool fn3(unsigned long long int f) { bool t =3D (0 >=3D f) + x; bool t1 =3D t | (f !=3D 0); return t1; } ``` I will look into this in a few weeks since I suspect it is a minor regressi= on.=