From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B68143858C62; Thu, 9 Feb 2023 15:11:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B68143858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675955503; bh=PZOApRQJZhACDpXjK0Z8nOfdraF2P//KjQHdTN96Gh8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fvsDZynPFVk70VnpNzS3pHDbhwuwx7dfsOaG8cvgmbqAEK93to6jlE4jdmVHIIjRj HcC/2xhV3PstPlkBEBhEYNslTOr6zixhnsGgQsS/yZuGg+i65WhK0AHKhgalllaFbH PTdLeyirS6pTHID/vHqtwy/in5tyXLdtq9tSP6Ik= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyB0cmVlLW9wdGltaXphdGlvbi8xMDg2ODhdIFsxMyBSZWdy?= =?UTF-8?B?ZXNzaW9uXSBlcnJvcjog4oCYYml0X2ZpZWxkX3JlZuKAmSBvZiBub24tbW9k?= =?UTF-8?B?ZS1wcmVjaXNpb24gb3BlcmFuZA==?= Date: Thu, 09 Feb 2023 15:11:43 +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: ice-on-valid-code, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108688 --- Comment #11 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:bcca64d70ce91e29717fb70cff252639df6902be commit r13-5758-gbcca64d70ce91e29717fb70cff252639df6902be Author: Jakub Jelinek Date: Thu Feb 9 16:07:40 2023 +0100 match.pd: Simplify BFR of insert when extracting exactly all inserted b= its [PR108688] On Thu, Feb 09, 2023 at 09:16:17AM +0100, Richard Biener via Gcc-patches wrote: > Hmm. Can we handle the case of the extraction exactly covering the > insertion separately then and simplify to plain @1? I was suggesting that in the PR. Here it is as an incremental patch on top of Andrew's patch. On the newly added testcase the ifcvt-folding difference without/with t= he incremental patch is: --- pr108688.c.171t.ifcvt_ 2023-02-09 10:47:30.169916845 +0100 +++ pr108688.c.171t.ifcvt 2023-02-09 10:48:44.942793453 +0100 @@ -25,6 +25,8 @@ Number of blocks in CFG: 11 Number of blocks to update: 5 ( 45%) +Applying pattern match.pd:7487, gimple-match.cc:243200 +Applying pattern match.pd:3987, gimple-match.cc:75423 Matching expression match.pd:1677, gimple-match.cc:209 Applying pattern match.pd:1733, gimple-match.cc:109481 Matching expression match.pd:2393, gimple-match.cc:852 @@ -70,7 +72,6 @@ void foo () signed char _29; _30; unsigned int ivtmp_33; - _ifc__35; unsigned char _ifc__37; unsigned char _ifc__38; unsigned char _ifc__39; @@ -91,8 +92,7 @@ void foo () _2 =3D () a.0_1; _ifc__38 =3D u.D.2741; _ifc__39 =3D BIT_INSERT_EXPR <_ifc__38, _2, 0 (7 bits)>; - _ifc__35 =3D BIT_FIELD_REF <_ifc__39, 7, 0>; - _4 =3D (signed char) _ifc__35; + _4 =3D (signed char) _2; b.1_5 =3D b; _6 =3D (signed char) b.1_5; _7 =3D _4 ^ _6; 2023-02-09 Jakub Jelinek PR tree-optimization/108688 * match.pd (bit_field_ref [bit_insert]): Simplify BIT_FIELD_REF of BIT_INSERT_EXPR extracting exactly all inserted bits even when without mode precision. Formatting fixes. * gcc.c-torture/compile/pr108688-1.c: Add PR number as comment. * gcc.dg/pr108688.c: New test.=