From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 457723857BB2; Mon, 31 Jul 2023 07:08:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 457723857BB2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690787327; bh=Wnlu7BXg03sZ+OUi9ugyqv/pF0yHVKB9DKD2+xW+nnY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GiVgG4NhgDd1wuDKLdlGuHm8ip6qIaGYTPtPtAWgomZUOLOGeZH2B54+CDoPkvFm2 pBnT9IsZ0xERYNniu6GV1WXKqBcslvXTpp+Ag8oxasies8vRrKxc95GrhMbZGHi5ov tsz3xFndZrO+ktn0MynjzuWmtvRkQ4An5ZI4sStg= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106164] (a > b) & (a >= b) does not get optimized until reassoc1 Date: Mon, 31 Jul 2023 07:08:47 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenther at suse dot de 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=3D106164 --- Comment #11 from rguenther at suse dot de --- On Sat, 29 Jul 2023, pinskia at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106164 >=20 > --- Comment #6 from Andrew Pinski --- > I think I have a better patch. >=20 > There are patterns for: > Convert (X OP1 CST1) || (X OP2 CST2). >=20 > externding them easily to support: > Convert (X OP1 Y) || (X OP2 Y). > is a few lines. > Don't even need to call combine_comparisons either. >=20 > Once I test it I will submit the patch. Note moving the non-BIT_FIELD_REF parts of fold_truth_andor_1 to match.pd was still on the list of things to do.=