From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6E383858C53; Fri, 24 Nov 2023 07:50:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6E383858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700812226; bh=D4RWtbu8FM8/jgdvVNMlDip6dQOzVK3AzrZ0W2XPvKY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AjIqwbMyGqb452fHgqYAMmCxIGqiw5t3folvVQGHpFlBAXoPV+qSrpupqp/A++1Ys i8HYlr9q0cYGTxtQhSg+8SzHCnvIrc2nh3ByOGN//65ojQi5Z5i+JAOXPT7GltxQBm 24e2CCNevDTyJYYLzazJDBNTJoXaDGYNTxq7B/AQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112344] [14 Regression] Wrong code at -O2 on x86_64-pc-linux-gnu Date: Fri, 24 Nov 2023 07:50:25 +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: 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: P1 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=3D112344 --- Comment #12 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:a7d82b45edeed99a850595eee0e59d16c4df7aff commit r14-5813-ga7d82b45edeed99a850595eee0e59d16c4df7aff Author: Richard Biener Date: Thu Nov 23 09:49:59 2023 +0100 tree-optimization/112344 - relax final value-replacement fix The following tries to reduce the number of cases we use an unsigned type for the addition when we know the original signed increment was OK which is when the total unsigned increment computed fits the signed type as well. This fixes the observed testsuite fallout. PR tree-optimization/112344 * tree-chrec.cc (chrec_apply): Only use an unsigned add when the overall increment doesn't fit the signed type.=