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


H. J. Lu wrote:




/* 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.


This code makes sure that when there is an unused auto-inc output reload for the
same register as a clobber, the reload for the unused output is not written.
With your change, no output reload for auto-inc will be written if the reloaded
value is a hard register, since the auto-inc is now mistaken for a clobber.



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