https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108484
Bug ID: 108484 Summary: [13 Regression] ICE building glibc for ia64 in cselib_subst_to_values, at cselib.cc:2148 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org CC: aoliva at gcc dot gnu.org Target Milestone: --- Target: ia64*-*-* Created attachment 54319 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54319&action=edit preprocessed source Compile the attached file (from glibc) with -g -O2 for ia64-linux-gnu. This produces the following ICE: during RTL pass: mach In file included from ../sysdeps/ia64/unwind-resume.c:18: ../sysdeps/generic/unwind-resume.c: In function '_Unwind_Resume': ../sysdeps/generic/unwind-resume.c:38:1: internal compiler error: in cselib_subst_to_values, at cselib.cc:2148 0x5fd409 cselib_subst_to_values(rtx_def*, machine_mode) /scratch/jmyers/glibc/many13/src/gcc/gcc/cselib.cc:2148 0x98c873 cselib_subst_to_values(rtx_def*, machine_mode) /scratch/jmyers/glibc/many13/src/gcc/gcc/cselib.cc:2193 0x98f761 cselib_subst_to_values_from_insn(rtx_def*, machine_mode, rtx_insn*) /scratch/jmyers/glibc/many13/src/gcc/gcc/cselib.cc:2264 0x18172aa add_insn_mem_dependence /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-deps.cc:1741 0x181b230 sched_analyze_2 /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-deps.cc:2688 0x181b267 sched_analyze_2 /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-deps.cc:2806 0x181b9eb sched_analyze_insn /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-deps.cc:2960 0x181ddb0 deps_analyze_insn(deps_desc*, rtx_insn*) /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-deps.cc:3683 0x181e40e sched_analyze(deps_desc*, rtx_insn*, rtx_insn*) /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-deps.cc:3836 0x1821870 schedule_ebb(rtx_insn*, rtx_insn*, bool) /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-ebb.cc:505 0x1821da2 schedule_ebbs() /scratch/jmyers/glibc/many13/src/gcc/gcc/sched-ebb.cc:655 0x11b3346 ia64_reorg /scratch/jmyers/glibc/many13/src/gcc/gcc/config/ia64/ia64.cc:9862 0xdb527d execute /scratch/jmyers/glibc/many13/src/gcc/gcc/reorg.cc:3927 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. Introduced by g:3c99493bf39a7fef9213e6f5af94b78bb15fcfdc commit 3c99493bf39a7fef9213e6f5af94b78bb15fcfdc Author: Alexandre Oliva <ol...@adacore.com> Date: Thu Jan 19 01:09:15 2023 -0300 [PR106746] drop cselib addr lookup in debug insn mem The testcase used to get scheduled differently depending on the presence of debug insns with MEMs. It's not clear to me why those MEMs affected scheduling, but the cselib pre-canonicalization of the MEM address is not used at all when analyzing debug insns, so the memory allocation and lookup are pure waste. Somehow, avoiding that waste fixes the problem, or makes it go latent. for gcc/ChangeLog PR debug/106746 * sched-deps.cc (sched_analyze_2): Skip cselib address lookup within debug insns. for gcc/testsuite/ChangeLog PR debug/106746 * gcc.target/i386/pr106746.c: New.