From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 098413858439; Fri, 1 Sep 2023 03:23:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 098413858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693538636; bh=1WzjlcBbYBIzLRCqxaICiu+wrxOfoIxciRf5xeCidZU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HUG6Poxy25tKxjv212B+uixZtpe6MxRh+pJ+IOkSEPpVkB/DmZBjxYTNi4pIFxZeA QR+RO4pYMO/Y1D7FbEkyV2dFx9eEccO/CjfRkHXpuyZIMwZU20a1nz7WbonB8ufyS4 DcXZenx7DQfgbzimh6ej7s9FsJ9c3wxrvRdjwyGE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110484] Spec2017 541 after adding the '-flto-fomit-frame-pointer' optimization, after optimizing the rnreg, directly replaced other registers with the $r22 register, so that the value of the $r22 register was destroyed without being saved. Date: Fri, 01 Sep 2023 03:23:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target 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: 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=3D110484 --- Comment #6 from CVS Commits --- The releases/gcc-12 branch has been updated by LuluCheng : https://gcc.gnu.org/g:d60c00492eb5818493560f299f06d1e3d9efcc69 commit r12-9840-gd60c00492eb5818493560f299f06d1e3d9efcc69 Author: Lulu Cheng Date: Thu Jun 29 19:30:59 2023 +0800 LoongArch: Fix bug in loongarch_emit_stack_tie [PR110484]. Which may result in implicit references to $fp when frame_pointer_neede= d is false, causing regs_ever_live[$fp] to be true when $fp is not explicitly used, resulting in $fp being used as the target replacement register in the r= nreg pass. The bug originates from SPEC2017 541.leela_r(-flto). gcc/ChangeLog: PR target/110484 * config/loongarch/loongarch.cc (loongarch_emit_stack_tie): Use= the frame_pointer_needed to determine whether to use the $fp regist= er. Co-authored-by: Guo Jie (cherry picked from commit 1967f21d000e09d3d3190317af7923b578ce02b1)=