From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 828D23858C20; Mon, 1 Jan 2024 00:49:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 828D23858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704070188; bh=hKCY6irgEeyZBXCETVGiihIMoCWUeILeRylX7t0ipxQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BTrzb3MlPHvPQLSz5OaMPlOZSqDn4qSO/vEHMtBL+Zng14jp4Kb/hyuZ3qlXfknfD WTCU+0DtD8nZQl3mqueV4r/V5LOyy/MEmf1aI7NAKrpG5leM4b4RjrSFBsEe/XMMcV 0RSh00NUAyTekvMoyNj9Z/CMYu24zOfmY59I9pLo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113186] [13/14 Regression] `(a^c) & (a^!c)` is not optimized to 0 for bool Date: Mon, 01 Jan 2024 00:49:48 +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: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D113186 --- Comment #3 from Andrew Pinski --- So for the C testcase, we don't need to create a new pattern, just extend gimple_bitwise_inverted_equal_p to catch `a =3D=3D b` and `a ^ b` are inver= ted equals like we already do for `a =3D=3D b` and `a !=3D b`. This allows for= other patterns to work too ...=