This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
On 04/27/2010 04:31 PM, Hans-Peter Nilsson wrote:
> On Tue, 27 Apr 2010, Bernd Schmidt wrote:
>> Okay, let's say you have a sequence
>>
>> (set (reg A) (reg B))
>> (parallel [(set (reg C) (div (reg B) (something)))
>> (clobber (scratch))])
>> (use (reg A))
>>
>> What's to prevent the compiler from replacing the final use of A with a
>> use of B?
>
> That's fine.
>
>> Then, after reload, you get
>
> Because of the "=1" on the clobber (match-input, will-set) and
> reg 2 not being dead, I'd get a copy into a temporary:
>
>> (set (reg 1) (reg 2))
>
> (set (reg 4) (reg 2))
>
>> (parallel [(set (reg 3) (div (reg 4) (something)))
>> (clobber (reg 4))])
>> (use (reg 2))
>
> I really see nothing wrong here and have to wonder where you're
> coming from, or what it is that I (and Bonzini, it seems) are
> missing. Are you somehow not seeing the "=" on the clobber
> constraint?
I see the "1" constraint, which specifies that the scratch must match
the input. I don't think it's at all certain that you'll get a new
register rather than the one which is already there.
If all you want is a new scratch register, use plain "=r", not "=1".
Bernd
- References:
- Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
- Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
- Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
- Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
- Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
- Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688
- Re: Committed, MMIX: fix PR43889, missing earlyclobber exposed by r154688