]> gcc.gnu.org Git - gcc.git/commit
LoongArch: Fix bug in loongarch_emit_stack_tie [PR110484].
authorLulu Cheng <chenglulu@loongson.cn>
Thu, 29 Jun 2023 11:30:59 +0000 (19:30 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 1 Sep 2023 02:45:07 +0000 (10:45 +0800)
commitd60c00492eb5818493560f299f06d1e3d9efcc69
tree3898e81eb48abd4f27b50fcc05ae0315238b8e81
parent5f2b1ac13c0965403cd0908a05df054fe88f93ef
LoongArch: Fix bug in loongarch_emit_stack_tie [PR110484].

Which may result in implicit references to $fp when frame_pointer_needed 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 rnreg 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 register.

Co-authored-by: Guo Jie <guojie@loongson.cn>
(cherry picked from commit 1967f21d000e09d3d3190317af7923b578ce02b1)
gcc/config/loongarch/loongarch.cc
This page took 0.066366 seconds and 6 git commands to generate.