This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix reload inheritance of post-modified addresses.
On 01/12/2011 03:36 PM, Bernd Schmidt wrote:
> On 01/12/2011 03:31 PM, Richard Sandiford wrote:
>>
>> Ah. :-) What went wrong with PRE_MODIFY? That big comment was trying to
>> justify why PRE_MODIFY was actually OK...
>
> One problem was that inc_for_reload returned the wrong insn. It
> generated a sequence
> r1 = r1 + 280
> r3 = r1
>
> with r1 being the reload reg for the inner pseudo, r3 the reload reg for
> the PRE_MODIFY. It returns the add insn, causing us to set
> spill_reg_store for R3 to an insn that sets R1. If that's fixed, the
> other problem is that spill_reg_stored_to is set incorrectly. Presumably
> it should be set to R3 here, but rather than add more interdependencies
> I decided it would be best just to skip this code for PRE_MODIFY as well.
BTW, I think we should be running pass_auto_inc_dec after reload and
just delete all of that code.
Bernd