On Wed, Nov 26, 2014 at 10:20:39PM +0100, Richard Biener wrote:
> Well, if you want to aggressively prune unused bits then you could 
> "back-propagate" the shift count value-range.
> 
> And note that all the frontend shorten-optimizations should move to the 
> middle-end.
> 
> That said, instead of casting to int we could cast to unsigned char...

As long as we don't have > 256 bitsize integers, yes, for the purposes of
GIMPLE.  Though, as with type demotion, then it might be worthwhile to try
to promote it to wider type if the shift instructions operate on wider shift
count modes than QImode.

        Jakub

Reply via email to