On 07/18/2011 12:15 PM, Georg-Johann Lay wrote:
>> However, what you've done is try very hard to work around reload
>> doing the Right Thing with constant spilling, namely re-generate
>> the constant rather than spill and restore it.  I cannot believe
>> that's the right way to proceed.
> 
> You mean that with a clobber reload will rematerialize the constant
> if there are not enough registers instead of spilling it?
> And with an ordinary move like
>    (set (reg) (const_int))
> reload will not see that it can reaterialize it and spill it to
> the stack?

Well, it certainly didn't use to.

Vlad, do you know what the current state of the register allocator
is wrt this sort of rematerialization?

> Moreover, I wonder why target-independent code does not already
> catch the situation because the pattern to be generated is just
> an ordinary umulqihi3 widening multiplication.

Yes, it is sad that the backends have to work around the fact
that sign/zero_extension of constants is invalid rtl.


r~ 

Reply via email to