This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: [4.1/4.2 Regression]: Miscompiled FORTRAN program
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, grigory_zagorodnev at linux dot intel dot com, denis_nagorny at linux dot intel dot com
- Date: Wed, 15 Feb 2006 13:16:53 +0000
- Subject: Re: PATCH: [4.1/4.2 Regression]: Miscompiled FORTRAN program
- References: <43F248FB.8050604@st.com> <20060214214344.GB14852@lucon.org>
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.