From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6135F3858432; Tue, 26 Mar 2024 15:05:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6135F3858432 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711465533; bh=KbRkRFAp8u7wr9i/kEaJ11k2qQ7rHhVM+okJCb8n5PA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EYGAlxPGaY/lxhgcoMnQsiV8VnGyU27BRA1/Q/Qo1e23gzy+DvBYcjJtQ2rSwL7df 5il0k+s75gWs0IqdahWqzkzXoqUVWbWSOmSuyHmrvI6ld79CUHN3z5cE27KbDrwQUQ KvLo5sP1Q/we9b2t/iVBP3UAnzh827veTaMITu0A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110838] [14 Regression] wrong code on x365-3.5, -O3, sign extraction Date: Tue, 26 Mar 2024 15:05:32 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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=3D110838 --- Comment #14 from GCC Commits --- The releases/gcc-12 branch has been updated by Andre Simoes Dias Vieira : https://gcc.gnu.org/g:d0eed43ff39a0bad4a02f8af7a4795e06aea6f80 commit r12-10294-gd0eed43ff39a0bad4a02f8af7a4795e06aea6f80 Author: Richard Biener Date: Fri Aug 4 11:24:49 2023 +0200 tree-optimization/110838 - less aggressively fold out-of-bound shifts The following adjusts the shift simplification patterns to avoid touching out-of-bound shift value arithmetic right shifts of possibly negative values. While simplifying those to zero isn't wrong it's violating the principle of least surprise. PR tree-optimization/110838 * match.pd (([rl]shift @0 out-of-bounds) -> zero): Restrict the arithmetic right-shift case to non-negative operands. (cherry picked from commit 04aa0edcace22a7815cfc57575f1f7b1f166ac10)=