From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 505F83858028; Mon, 18 Dec 2023 19:09:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 505F83858028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702926543; bh=yBnjMu0QRW3iWi/fHUondcqKym+qffdIU7ycGKr0qOs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TCOQvwfo3xdP5L1Tqs6JwbC705Hs8ba1OYd2ZJB7Aaoc+sppqIcwIzfngWzYJ4D0X LvaxbZPv/kYVd4teRAGnyvZ01OLq8Jk8xSur3HyTUNZZBBnPdO0JMRg0XR/WaElT4Y yd3K7NLaIummGhByuy+y3vpM2z84wZbcntFoj2ck= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113072] `(a ^ CST0) & (~a ^ CST0)` is not optimized to 0 at the gimple level Date: Mon, 18 Dec 2023 19:09:03 +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: TREE X-Bugzilla-Severity: enhancement 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D113072 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D111149 --- Comment #2 from Andrew Pinski --- Looks like bool sometimes produces !=3D or ^ :) ``` bool foo(bool a, int b) { bool b1 =3D b =3D=3D 1; bool b2 =3D !b1; bool c =3D (a ^ b1); return c & (a ^ b2); } ``` Though that is PR 111149 .=