From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A0A33857C68; Mon, 18 Dec 2023 19:10:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A0A33857C68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702926656; bh=c08Fq0U0jkFpu3AjwVEI9ElHLDZwPZ79tRO8ZlyNLkY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hJ98pTRz+vdeUWjGolvMfc+gEe+tqO80U4grPz/ZnVUwQ121vRVZcB2HktQ49WolB mxobXklSD+38UnUx7EjTos7p4DzEq87kSuM0niZtDGkNNoz5y9ypE6yvcy7k98dI6V ZCHFcd4OxK8qd0KIyg1RZ3M+nV4n1CcBpgxH6crQ= 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:10:56 +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: 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 --- Comment #3 from Andrew Pinski --- here is the bool testcase which just allows the use of ^: ``` bool foo1(bool a, int b) { bool b1 =3D b =3D=3D 1; bool b2 =3D !b1; return (a ^ b1) & (a ^ b2); } ```=