https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113098
Bug ID: 113098 Summary: [14 Regression] LRA ICE building glibc for mips Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- Target: mips*-*-* Created attachment 56912 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56912&action=edit preprocessed source Compile the attached code, from glibc, with -mabi=32 -O2 for MIPS (I used a mips64-linux-gnu compiler configured --with-mips-plt --with-nan=2008 --with-arch-64=mips64r2 --with-arch-32=mips32r2; the --with-arch-32 part may well be required to reproduce the issue). offtime.c: In function '__offtime': offtime.c:86:1: error: unable to find a register to spill offtime.c:86:1: error: this is the insn: (insn 1015 3973 3974 24 (parallel [ (set (reg:SI 2971) (plus:SI (mult:SI (reg:SI 2367) (reg:SI 898)) (reg:SI 2972))) (clobber (reg:SI 2881 [2814])) (clobber (reg:SI 2815)) ]) "offtime.c":67:84 42 {*mul_acc_si} (expr_list:REG_UNUSED (reg:SI 2815) (expr_list:REG_UNUSED (reg:SI 2881 [2814]) (expr_list:REG_DEAD (reg:SI 2972) (expr_list:REG_DEAD (reg:SI 2367) (expr_list:REG_DEAD (reg:SI 898) (nil))))))) during RTL pass: reload offtime.c:86:1: internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1862 0x6f3f05 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /scratch/jmyers/glibc/many14/src/gcc/gcc/rtl-error.cc:108 0xd53048 lra_split_hard_reg_for() /scratch/jmyers/glibc/many14/src/gcc/gcc/lra-assigns.cc:1862 0xd4c9c9 lra(_IO_FILE*, int) /scratch/jmyers/glibc/many14/src/gcc/gcc/lra.cc:2518 0xd00d97 do_reload /scratch/jmyers/glibc/many14/src/gcc/gcc/ira.cc:5973 0xd00d97 execute /scratch/jmyers/glibc/many14/src/gcc/gcc/ira.cc:6161 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ICE introduced by commit 989e67f827b74b76e58abe137ce12d948af2290c Author: Vladimir N. Makarov <vmaka...@redhat.com> Date: Mon Dec 18 17:12:23 2023 -0500 [PR112918][LRA]: Fixing IRA ICE on m68k Some GCC tests on m68K port of LRA is failed on `maximum number of generated reload insns per insn achieved`. The problem is in that for subreg reload LRA can not narrow reg class more from ALL_REGS to GENERAL_REGS and then to data regs or address regs. The patch permits narowing reg class from reload insns if this results in succesful matching of reg operand.