This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: [4.1/4.2 Regression]: Miscompiled FORTRAN program


On Tue, Feb 14, 2006 at 09:17:47PM +0000, Joern RENNECKE wrote:

> >2006-02-13  Denis Nagorny <denis_nagorny@linux.intel.com>
> >
> >        PR rtl-optimization/25603
> >        * reload.c (reg_inc_found_and_valid_p): New.
> >	(regno_clobbered_p): Handle REG_INC as 25603 workaround.
> 
> You have to check every use of regno_clobbered_p to verify your change
> will be appropriate.  E.g. The followingh code in
> reload1.c:emit_output_reload_insns is bound to break with your patch,
> when a hard register not suitable for auto-increment is reloaded
> into another register because the value is needed as an auto-increment
> address in a MEM which is SET_SRC (single_set (insn)):
> 
> 
>     /* Don't output the last reload if OLD is not the dest of
>         INSN and is in the src and is clobbered by INSN.  */
>      if (! flag_expensive_optimizations
>          || !REG_P (old)
>          || !(set = single_set (insn))
>          || rtx_equal_p (old, SET_DEST (set))
>          || !reg_mentioned_p (old, SET_SRC (set))
>          || !((REGNO (old) < FIRST_PSEUDO_REGISTER)
>               && regno_clobbered_p (REGNO (old), insn, rl->mode, 0)))
>        gen_reload (old, reloadreg, rl->opnum,
>                    rl->when_needed);

Joern, can you explain it a little in detail why Denis' patch will
break it? Denis and I aren't very familiar with this area of gcc.

Thanks.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]