Re: [wide-int] Add is_sign_extended optimisation

2013-10-21 Thread Richard Biener
On Sun, 20 Oct 2013, Richard Sandiford wrote: > Another follow-up to yesterday's patch. This one implements Richard's > suggestion of having an is_sign_extended trait to optimise cases where > excess upper bits are known to be signs rather than undefined. > > The uses so far are: > > * make to_

[wide-int] Add is_sign_extended optimisation

2013-10-20 Thread Richard Sandiford
Another follow-up to yesterday's patch. This one implements Richard's suggestion of having an is_sign_extended trait to optimise cases where excess upper bits are known to be signs rather than undefined. The uses so far are: * make to_shwi () equivalent to slow () * turn eq_p into a simple loop