On 10/04/2011 08:42 AM, Joseph S. Myers wrote:
> On Tue, 4 Oct 2011, Ilya Tocar wrote:
> 
>> Hi everyone,
>>
>> This patch fixes PR 50038 (redundant zero extensions) by modifying
>> implicit-zee pass
>> to also remove unneeded zero extensions from QImode to SImode.
> 
> Hardcoding particular modes like this in the target-independent parts of 
> the compiler is fundamentally ill-conceived.  Right now it hardcodes the 
> (SImode, DImode) pair.  You're adding hardcoding of (QImode, SImode) as 
> well.  But really it should consider all pairs of (integer mode, wider 
> integer mode), with the machine description (or target hooks) determining 
> which pairs are relevant on a particular target.  Changing it not to 
> hardcode particular modes would be better than adding a second pair.
> 

That along with not hard-coding ZERO_EXTEND.

Both MIPS and Alpha have much the same free operations, but with SIGN_EXTEND.

I remember rejecting one iteration of this pass with this hard-coded, but the
pass was apparently approved by someone else without that being corrected.


r~

Reply via email to