From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C16033858434; Thu, 18 May 2023 01:43:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C16033858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684374182; bh=K/5AvI/WPW4MZhJ8f6zpUhOrS51TCxM1Kn8U8e++6PI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OnZ6Qg5yAWGdfEX30sliJLkTTCBufv0mI1mTW7bCnANTqVCUGALKCneCP7+cETlDk YGEJKlwqTn/u1S0stfm6XId5IM5rX4FW3ycBbBwYriD7doJNLVNEBDurt1Ndoef0nP y3+ZZQmd1AmYlgluJ6Cxhq6hdICD9Okc/H22Uv+g= From: "richard.yao at alumni dot stonybrook.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109901] Optimization opportunity: ((((a) > (b)) - ((a) < (b))) < 0) -> ((a) < (b)) Date: Thu, 18 May 2023 01:43:02 +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: enhancement X-Bugzilla-Who: richard.yao at alumni dot stonybrook.edu 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=3D109901 --- Comment #6 from Richard Yao = --- (In reply to Andrew Pinski from comment #1) > bool0 - bool1 =3D=3D 1 -> bool0 & !bool1 -> bool0 < bool1 > bool0 - bool1 > 0 -> bool0 & !bool1 -> bool0 < bool1 That should be: bool0 - bool1 =3D=3D 1 -> bool0 & !bool1 -> bool0 > bool1 bool0 - bool1 > 0 -> bool0 & !bool1 -> bool0 > bool1=