[Bug target/122147] [16 Regression] ICE: maximum number of generated reload insns per insn achieved (90) with -O2 -march=rv64gcv

law at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 3 13:47:01 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122147

--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Probably the (subreg (mem ... )) created by combine that causes the problems:

Trying 7 -> 14:
    7: r134:V2QI=[r140:DI]
      REG_DEAD r140:DI
   14: r138:HF=r134:V2QI#0
      REG_DEAD r134:V2QI
Successfully matched this instruction:
(set (reg:HF 138 [ _16 ])
    (subreg:HF (mem/c:V2QI (reg/f:DI 140) [0 MEM <vector(2) char> [(char *
{ref-all})&cc]+0 S2 A8]) 0))
allowing combination of insns 7 and 14
original costs 4 + 12 = 16
replacement cost 12
deferring deletion of insn with uid = 7.
modifying insn i3    14: r138:HF=[r140:DI]#0
      REG_DEAD r140:DI
deferring rescan insn with uid = 14.

At the very least generating (subreg (mem)) is highly suspicious.


More information about the Gcc-bugs mailing list