From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13DDC38582A4; Fri, 4 Aug 2023 07:10:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13DDC38582A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691133034; bh=lD3abVGGVS8/HZi10k4Ud/ebqum9/gTzhAbs9xZa2jw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TcoQoXXjz0pKrXLhGDVNpb/wBGg+LaBDIwou8pxOj6xfgh7CE0ofuu1yOQwNi4ygx Ft9Wn6YNA1lpjPFYIfQuybJFJ91+NnBpt8PwMG/sicnIa+y+I5lAXe2G/toeyk2Rla i1qpBOqRfsTRnK5aLwJFqRC6+kLDwr8Khh5gbtFc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/101955] (signed<<31)>>31 should become -(signed&1) Date: Fri, 04 Aug 2023 07:10:33 +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: 12.0 X-Bugzilla-Keywords: easyhack, 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=3D101955 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:9020da78df2854f14f8b1d38b58a6d3b77a4b731 commit r14-2977-g9020da78df2854f14f8b1d38b58a6d3b77a4b731 Author: Drew Ross Date: Fri Aug 4 09:08:05 2023 +0200 match.pd: Canonicalize (signed x << c) >> c [PR101955] Canonicalizes (signed x << c) >> c into the lowest precision(type) - c bits of x IF those bits have a mode precision or a precision of 1. Also combines this rule with (unsigned x << c) >> c -> = x & ((unsigned)-1 >> c) to prevent duplicate pattern. PR middle-end/101955 * match.pd ((signed x << c) >> c): New canonicalization. * gcc.dg/pr101955.c: New test.=