[SuperH] reload issue which prevents bootstrap

Joern Rennecke joern.rennecke@st.com
Thu May 9 14:09:00 GMT 2002


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



More information about the Gcc-patches mailing list