PING: PATCH: PR rtl-optimization/38272:
Ian Lance Taylor
iant@google.com
Fri Dec 5 21:41:00 GMT 2008
"H.J. Lu" <hjl.tools@gmail.com> writes:
> IRA exposed a latent reload bug where do_input_reload use a register
> spill for a memory input and the spilled register is diferent from
> the register to be reloaded into. It generates wrong code. A patch is
> posted at:
>
> http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01463.html
>
> Is that OK for mainline?
I don't see that that conditional serves any purpose any more. I
would try simply deleting this block of code entirely:
/* When inheriting a wider reload, we have a MEM in rl->in,
e.g. inheriting a SImode output reload for
(mem:HI (plus:SI (reg:SI 14 fp) (const_int 10))) */
if (optimize && reload_inherited[j] && rl->in
&& MEM_P (rl->in)
&& MEM_P (rl->in_reg)
&& reload_spill_index[j] >= 0
&& TEST_HARD_REG_BIT (reg_reloaded_valid, reload_spill_index[j]))
rl->in = regno_reg_rtx[reg_reloaded_contents[reload_spill_index[j]]];
It would certainly be interesting to hear what it does affect. That
code was introduced before we had any equivalent of the reg_rtx field
in struct reload.
Ian
More information about the Gcc-patches
mailing list