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.
Bernd Schmidt <bernds@codesourcery.com> writes:
> On 01/12/2011 03:31 PM, Richard Sandiford wrote:
>> Bernd Schmidt <bernds@codesourcery.com> writes:
>>> On 01/12/2011 11:29 AM, Ian Bolton wrote:
>>>> Hi Richard,
>>>>
>>>>> This patch fixes a miscompilation of SPEC2006 gromacs with ARM+VFP.
>>>>> Thanks to Dave Gilbert for narrowing down the failure to a particular
>>>>> rtl instruction and a particular group of flags.
>>>>
>>>> Your patch also fixes this:
>>>>
>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166
>>>>
>>>> Thanks to Bernd for debugging this.
>>>
>>> Actually that's a slightly different patch - I had to disable this code
>>> for PRE_MODIFY as well.
>>
>> 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.
Ah, right. In that case I'll defer to your patch.
Richard