From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A76B03858D35; Sat, 5 Aug 2023 03:34:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A76B03858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691206443; bh=4ZZL8prKn8X9i65AFUzKX5wrTGwWstyrpmEDkRKk25M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=krFTSKfRbOsl0zlRaljQGGTPUgoTu8xVbeNAE0nqMdM96IOThjrFC3x1lIfQRL0Nb qGTf8BYZsoK6d0zV4ko8agF+2V/P8cDNJMpvRmyINj2rBBaHiX413Jty0nShhPWlHV eclbFGpSRpeWsFz6wjXoAVKfK7W2JCDHAaj4IMqY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/88387] Possible code optimization when right shift count >= width of type Date: Sat, 05 Aug 2023 03:34:03 +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: 8.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution target_milestone bug_status 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=3D88387 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Target Milestone|--- |13.0 Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- Starting in GCC 13 we remove the branch fully and assume n >> 222 is always= 0. In ethread: Checking profitability of path (backwards): bb:2 (3 insns) bb:0 Control statement insns: 2 Overall: 1 insns Registering killing_def (path_oracle) _1 Checking profitability of path (backwards):=20 [1] Registering jump thread: (0, 2) incoming edge; (2, 4) nocopy;=20 path: 0->2->4 SUCCESS=