From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8C76E3858426; Fri, 25 Aug 2023 16:36:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C76E3858426 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692981409; bh=gscH6vNvc6ri7kKvc+RU3b2E/0AOoAcUBQzXNmnqa74=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wd5tlp8XI3VExzCQ+LX4BpAG5Z3Rib4H1JLm2OudFETpaiUk5d3xt4xPjLqiKm6UG ly26brVsjRO2EHQprDVbihIdMYm9xSGemZmx86Tx6uKVpCynyybpKk/u5+k+Vmk2BG IGcRM7YKLxsSfDQMcg3+ky15WWuW4PDFsB7Yi/Xo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106677] Abstraction overhead with std::views::join Date: Fri, 25 Aug 2023 16:36: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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit 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=3D106677 --- Comment #5 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:6df8dcec7196e42ca2eed69e1ae455bae8d0fe93 commit r14-3485-g6df8dcec7196e42ca2eed69e1ae455bae8d0fe93 Author: Andrew Pinski Date: Sat Aug 19 17:56:46 2023 -0700 MATCH: `a | C -> C` when we know that `a & ~C =3D=3D 0` Even though this is handled by other code inside both VRP and CCP, sometimes we want to optimize this outside of VRP and CCP. An example is given in PR 106677 where phiopt will happen after VRP (which removes a cast for a comparison) and then phiopt will optimize the phi to be `a | 1` which can then be optimized to `1` due to this patch. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Note Similar code already exists in simplify_rtx for the RTL level; it was moved from combine to simplify_rtx in r0-72539-gbd1ef757767f6d. gcc/ChangeLog: * match.pd (`a | C -> C`): New pattern.=