https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88282
Tamar Christina <tnfchris at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW CC| |vmakarov at gcc dot gnu.org Assignee|tnfchris at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> --- This is caused by the change in r266385 for PR87718. That causes the cost model to go completely off the rail and also changes the register classes. Previously out costs were 0 in most cases, now we have large numbers like 65540004. ``` r93 costs: GENERAL_REGS:0 FP_LO_REGS:10000 FP_REGS:10000 POINTER_AND_FP_REGS:10000 MEM:8000 r92 costs: GENERAL_REGS:0 FP_LO_REGS:10000 FP_REGS:10000 POINTER_AND_FP_REGS:10000 MEM:8000 ``` was before and now ``` r93 costs: GENERAL_REGS:65540004 FP_LO_REGS:65544004 FP_REGS:65544004 POINTER_AND_FP_REGS:65544004 MEM:8000 r92 costs: TAILCALL_ADDR_REGS:131074004 GENERAL_REGS:131074004 FP_LO_REGS:131074004 FP_REGS:131074004 POINTER_AND_FP_REGS:131074004 MEM:8000 ``` The reason this crashes with stack clash enabled is because the alloca code emits a probe at SP. The costing now makes it think it has to spill the hard register Creating newreg=98 from oldreg=92, assigning class GENERAL_REGS to r98 16: sp:DI=r98:DI REG_DEAD r92:DI REG_ARGS_SIZE 0 Inserting insn reload before: 27: r98:DI=r92:DI it can't do it so it crashes in reload.