From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1FA3B3858C2C; Fri, 26 May 2023 23:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FA3B3858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685144951; bh=WAclLrqLBxg8sCvfFJD/caTlxDDb1/J/UBeI1Q/6cV8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IG32UbZY/T3UgCq9jGw5eI4JK7VcdcXVAo+7zNjxZlB8yZyNwZKhOPCMagLv6+Spl wQC/m/RvmUPRdBC6A35+HkiFuN4QjCJ1MHd+Z1zkRgMtlNky/k8ZcKcnIA8YI9z4Oa SHWoCHHFVTq0CMMkycpYPGgWx0PzJLcVHX2oc9Q0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test) Date: Fri, 26 May 2023 23:49:10 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D109907 --- Comment #26 from Andrew Pinski --- (In reply to Andrew Pinski from comment #25) > Created attachment 55175 [details] > Patch which fixes `signed < 0` >=20 > This patch improves comment #20 . Note this patch does not work for the case of normalizep =3D=3D -1 but I ha= ve a fix for that.=