The following patch solves a latent reload bug (in reload inheritance)
triggered by IRA. It is a second version (less pessimistic in reload
inheritance optimization) of the patch
The problem is described on
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37514
The patch invalidates reg_last_reload_reg set in previous insns for
INC/DEC if reg_last_reload_reg set is not set for the current insn for
some reasons (e.g. the hard register is used in other insn reloads
besides reload for INC/DEC).
The patch was tested on SH (with -m4 -ml -O3 -fomit-frame-pointer) and
successfully bootstrapped on itanium (another port using INC/DEC
heavily).
Ok to commit?
2008-11-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/37514
* reload1.c (reload_as_needed): Invalidate reg_last_reload
from previous insns.