Trying to track down a register allocation issue
Paul_Koning@Dell.com
Paul_Koning@Dell.com
Mon May 14 16:04:00 GMT 2012
I'm running into an ICE due to what looks like wrong register allocation, and I'm trying to figure out where the problem lies. It shows up with today's GCC (trunk). I haven't yet tried to narrow it down to a particular change.
It shows up in the pdp11 target, -O2. Not clear that this is pdp11 specific.
The ira dump shows this insn:
(insn 72 71 73 8 (set (reg:SI 129 [ D.2729 ])
(mem:SI (post_inc:HI (reg:HI 167 [orig:107 ivtmp.50 ] [107])) [2 MEM[base: D.2843_99, offset: 0B]+0 S4 A16])) ../../../../../newlib-1.18.0/newlib/libc/stdlib/gdtoa-gethex.c:79 11 {movsi}
(expr_list:REG_INC (reg:HI 167 [orig:107 ivtmp.50 ] [107])
(nil)))
The pointer register (167) is used later in the block, and is shown as alive at block end.
The reload dump shows it like this:
(insn 72 248 250 8 (set (reg:SI 2 r2)
(mem:SI (post_inc:HI (reg:HI 2 r2)) [2 MEM[base: D.2843_99, offset: 0B]+0 S4 A16])) ../../../../../newlib-1.18.0/newlib/libc/stdlib/gdtoa-gethex.c:79 11 {movsi}
(expr_list:REG_INC (reg:HI 2 r2)
(nil)))
That causes an ICE in the postreload stage. But in any case, I'm trying to figure out why reload assigned R2 both to reg 129 and to reg 167, when 167 is still alive.
Any suggestions on where to look?
paul
More information about the Gcc
mailing list