diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-12-27 04:28:56 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-12-27 19:02:04 +0800 |
commit | f19ceb2d49afdfa527d2109476a3f1d383c47e1b (patch) | |
tree | ead6c6bd674c038d0a55971a496512124c091c38 /gcc/gcov-io.h | |
parent | 80b8f1e53502a398248bbf10bf59f7d5b0f1c861 (diff) | |
download | gcc-f19ceb2d49afdfa527d2109476a3f1d383c47e1b.zip gcc-f19ceb2d49afdfa527d2109476a3f1d383c47e1b.tar.gz gcc-f19ceb2d49afdfa527d2109476a3f1d383c47e1b.tar.bz2 |
LoongArch: Fix infinite secondary reloading of FCCmode [PR113148]
The GCC internal doc says:
X might be a pseudo-register or a 'subreg' of a pseudo-register,
which could either be in a hard register or in memory. Use
'true_regnum' to find out; it will return -1 if the pseudo is in
memory and the hard register number if it is in a register.
So "MEM_P (x)" is not enough for checking if we are reloading from/to
the memory. This bug has caused reload pass to stall and finally ICE
complaining with "maximum number of generated reload insns per insn
achieved", since r14-6814.
Check if "true_regnum (x)" is -1 besides "MEM_P (x)" to fix the issue.
gcc/ChangeLog:
PR target/113148
* config/loongarch/loongarch.cc (loongarch_secondary_reload):
Check if regno == -1 besides MEM_P (x) for reloading FCCmode
from/to FPR to/from memory.
gcc/testsuite/ChangeLog:
PR target/113148
* gcc.target/loongarch/pr113148.c: New test.
Diffstat (limited to 'gcc/gcov-io.h')
0 files changed, 0 insertions, 0 deletions