From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43F763858407; Mon, 15 Nov 2021 00:52:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43F763858407 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/54571] Missed optimization converting between bit sets Date: Mon, 15 Nov 2021 00:52:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org 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: assigned_to bug_status dependson 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2021 00:52:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54571 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot = gnu.org Status|NEW |ASSIGNED Depends on| |103216 --- Comment #4 from Andrew Pinski --- This is fixed mostly by the patch which fixes PR 103216. We still have stuff like: _1 =3D x_3(D) & 1; _7 =3D _1 !=3D 0; _8 =3D (int) _7; _9 =3D y_4(D) | _8; and: _1 =3D x_3(D) & 2; _7 =3D _1 !=3D 0; _8 =3D (int) _7; _9 =3D y_4(D) | _8; and _1 =3D x_3(D) & 2; _7 =3D _1 !=3D 0; _8 =3D (int) _7; _9 =3D _8 << 1; _10 =3D y_4(D) | _9; Which we produce things like: xorl %eax, %eax andl $2, %edi sete %al orl %esi, %eax Where the sete/xor could be reproduced with shift for an example. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103216 [Bug 103216] missed optimization, phiopt/vrp?=