From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 476693858D37; Fri, 1 Sep 2023 02:04:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 476693858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693533886; bh=XBG1XZMomAEPeyGbRNgkY2PpJh4ybwE0Bhch5Fe4Kg0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=emIKOIE0EkDM8nudOp2yzOWOH2+RIA2nINVh/1A8YCu7ETJDEM1vSV3gph78WYRKy x4uBWUXe2URrJMLGbwj/jtaume3JorbLXb054B5iRRxljLwG1ABDT6G31zIhtoLuf9 9Igk6gz714Lw6Lj1zzpxrQDrzNoWPlyIw02zAGlg= 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 02:04:44 +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: UNCONFIRMED 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=3D110484 --- Comment #3 from CVS Commits --- The master branch has been updated by LuluCheng : https://gcc.gnu.org/g:1967f21d000e09d3d3190317af7923b578ce02b1 commit r14-3605-g1967f21d000e09d3d3190317af7923b578ce02b1 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 =