This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reload inheritance patch for PRE/POST INC/DEC
- To: Toshiyasu Morita <tm at netcom dot com>
- Subject: Re: Reload inheritance patch for PRE/POST INC/DEC
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 28 Apr 2000 13:39:38 -0600
- cc: gcc-patches at gcc dot gnu dot org, amylaar at cygnus dot com
- Reply-To: law at cygnus dot com
In message <200001250143.RAA05540@netcom.com>you write:
>
> This is my proposed patch for the bug I found in message:
>
> http://gcc.gnu.org/ml/gcc-bugs/2000-01/msg00582.html
>
> It required an additional patch to rtlanal.c because my toolchain is
> generating weird RTXes with a clobber of nil when compiling mulsi3:
>
> (insn:HI 35 33 37 (parallel[
> (set (reg:SF 26 fr2)
> (mem/s:SF (plus:SI (reg/v:SI 8 r8)
> (reg:SI 1 r1))))
> (use (reg/v:PSI 48 fpscr))
> (clobber (scratch:SI))
> ] ) 157 {movsf_ie} (insn_list 30 (nil))
> (expr_list:REG_DEAD (reg:SI 1 r1)
> (expr_list:REG_UNUSED (scratch:SI )
> (nil))))
>
> Anyway, the patch is included below.
>
> Toshi
>
>
> Mon Jan 24 17:14:31 PST 2000 Toshiyasu Morita (toshi.morita@sega.com)
>
> * reload1.c (choose_reload_regs): Disallow reload inheritance if
> the insns has side effects.
> * rtlanal.c (side_effects_p): Handle null rtx pointers.
This seems wrong to me.
What I think should have happened is we should have wiped
reg_last_reload_reg clean since pseudo 4099 and hard register r9 no longer
have the same value after the auto-increment.
There appears to be code to do this in reload_as_needed:
#ifdef AUTO_INC_DEC
/* Likewise for regs altered by auto-increment in this insn.
REG_INC notes have been changed by reloading:
find_reloads_address_1 records substitutions for them,
which have been performed by subst_reloads above. */
But it's impossible to tell since you didn't actually post a testcase or
the precise revision of the compiler, so we can't do any real co-investigation
of the problem with you.
jeff