[Bug target/65249] unable to find a register to spill in class 'R0_REGS' when compiling protobuf on sh4
olegendo at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Feb 28 22:46:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65249
--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 34902
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34902&action=edit
Various R0 pre-alloc splits
I've tried compiling CSiBE with the two split patterns in comment #5 ...
It's a can of worms. I'm dumping my current state as a patch here, maybe it's
helpful in some way. I ended up adding one r0 split pattern after another, but
probably some are still missing.
bzip2 (haven't tried anything else so far) fails with:
internal compiler error: in spill_failure, at reload1.c:2143
error: this is the insn:
(insn 8965 8964 8966 70 (set (mem:SI (plus:SI (reg:SI 0 r0)
(reg:SI 945 [ D.5064 ])) [1 MEM[base: _692, index: _1412,
offset: 0B]+0 S4 A32])
(reg:SI 7 r7 [orig:592 D.5066 ] [592])) bzip2-1.0.2/blocksort.c:564 252
{movsi_ie}
(expr_list:REG_DEAD (reg:SI 7 r7 [orig:592 D.5066 ] [592])
(expr_list:REG_DEAD (reg:SI 0 r0)
(nil))))
Probably reload can't resolve adjacent insns which have r0 constraints. I
haven't checked the details though.
Regardless of that, I think the cmpeqsi_t hunk in sh.md and the
sh_disp_addr_displacement huink in predicates.md should be applied on trunk.
More information about the Gcc-bugs
mailing list