[patch RFC,PR50038]

Joseph S. Myers joseph@codesourcery.com
Tue Oct 4 15:48:00 GMT 2011


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.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list