From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B88E3858D28; Thu, 25 May 2023 00:45:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B88E3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684975515; bh=8EkhPrlF0kjPAy0NY7JBmuuBP8//7L1bVT4bpOev9OY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uICwP6+xfml/S48cT6t3vzyeQTXLqP3KnDhtY5kADRBYYcORsC7hG2IkuWJDHc1vv eBrgn9TYTAjCA02SQ8KdbdUnh33wXkvOUFQueDynPbkst2JHva6srOp4WEtp5QiP/r BDSrZdSwXBnwjynSNbClsLiJDLXxU2qqh9VpezI4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109960] [10/11/12/13/14 Regression] missing combining of `(a&1) != 0 || (a&2)!=0` into `(a&3)!=0` Date: Thu, 25 May 2023 00:45:15 +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: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D109960 --- Comment #1 from Andrew Pinski --- We could have a pattern that does: `(a & CST) !=3D 0 ? 1: (bool)a` -> `a & (CST|1) !=3D 0` to fix this I think= .=