This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SuperH] reload issue which prevents bootstrap
- From: Joern Rennecke <joern dot rennecke at st dot com>
- To: NIIBE Yutaka <gniibe at m17n dot org>, gcc-patches at gcc dot gnu dot org
- Cc: joern dot rennecke at superh dot com, gcc at gcc dot gnu dot org,Alexandre Oliva <aoliva at redhat dot com>,Craig Rodrigues <rodrigc at attbi dot com>
- Date: Thu, 09 May 2002 21:53:23 +0100
- Subject: Re: [SuperH] reload issue which prevents bootstrap
- Organization: SuperH UK Ltd.
- References: <200204270010.BAA14107@meolyon.local>
- Reply-to: joern dot rennecke at superh dot com
NIIBE Yutaka <gniibe@m17n.org>:
> Narrowing down the problem, I've found that regclass.c:record_address_regs
> is miscompiled with -O0 (no optimization).
>
> I show you a patch to indicate the problem.
>
> -----------------------------------------------
> *** reload1.c 17 Apr 2002 03:34:26 -0000
> --- reload1.c 22 Apr 2002 07:04:30 -0000
> *************** do_output_reload (chain, rl, j)
> *** 6902,6907 ****
> --- 6902,6908 ----
> rtx pseudo = rl->out_reg;
>
> if (pseudo
> + && optimize
> && GET_CODE (pseudo) == REG
> && ! rtx_equal_p (rl->in_reg, pseudo)
> && REGNO (pseudo) >= FIRST_PSEUDO_REGISTER
I think that is actually the right patch, since delete_output_reload
assumes that we are optimizing. The other calls to
delete_output_reload are all guarded with a test of optimize, and there
is also a comment in delete_output_reload that says that the caller
has checked it.
The input reloads that lie between the output reload could not be trivially
found because they require to compute r14 + 64 into a register first. When
optimizing, this is not a problem, since the input reloads become inherited
before output reloads are considred for deletion.
Of course, you still have to get approval from someone with blanket write
privileges.
> FWIW, this issue exists in 3.0.4 too.
--
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330