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

--- Comment #133 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Created attachment 58834
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58834&action=edit
a testcase for r0-starvation issue with -mlra

The second one I've found has a bit lengthy testcases for -O2 -mlra.
It seems that LRA fails with r0-starvation for the pseudo code sequence like

  98: r361:SI=sign_extend([r332:SI+0x2])
  607: r178:SI=r361:SI
  101: r360:HI=r178:SI
  606: [r336:SI+r359:SI]=r360:HI

for example, which tries to use R0_REGS for both r361 and r359.
If I remember correctly, a similar issue for mov<mode> was already known to be
problematic with LRA and was handled specifically in
sh.cc:prepare_move_operands.

Reply via email to