From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA9A33858D3C; Mon, 28 Nov 2022 02:22:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA9A33858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669602136; bh=HYR5YgP7b2FB+suBHxJsvnSEhCiAdkx4pprdU+t/gDM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GU6j9kkFaWIQJG58nMzV2fkiiSSzHqXBeRAGjovqRYk0IKF1dwEG1/uGsf2tLdLmh XKQS5qRKS7Lp11d7x7zIDlAlitftnmfNp1ISktedAtzJZ2G4vsN+WWfn/YOygYyMP+ VT/IaaCQqpHvz3iYivFzTGPBvB4yXR8okQRn0VpA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107881] (a <= b) == (b >= a) should be optimized to (a == b) Date: Mon, 28 Nov 2022 02:22:16 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D107881 --- Comment #6 from Andrew Pinski --- I was thinking about having reassociation changing bool =3D=3D bool, bool <= bool, and bool <=3D bool into ~(bool ^ bool), !bool & bool, !bool | bool to "linearizing" so then reassociation can handle the rest (with the xor patch still? or we change ^ to how we expand xor like it is done in the patch) and then when finalizing, we simplify back to =3D=3D, <, and <=3D (and ^).=