RE: Double word left shift optimisation

2012-07-30 Thread Jon Beniston
> This is interesting. I've quickly tried it out on the SH port. It can be > accomplished with the combine pass, although there are a few things that > should be taken care of: > - an "extendsidi2" pattern is required (so that the extension is not > performed before expand) > ... > One potentia

Re: Double word left shift optimisation

2012-07-27 Thread Segher Boessenkool
Hi Jon, I'd like to try to optimise double word left shifts of sign/zero extended operands if a widening multiply instruction is available. For the following code: long long f(long a, long b) { return (long long)a << b; } I'd like to optimise this to something like: (long long) a * (

Re: Double word left shift optimisation

2012-07-26 Thread Oleg Endo
On Thu, 2012-07-26 at 10:51 -0700, Ian Lance Taylor wrote: > On Thu, Jul 26, 2012 at 8:57 AM, Jon Beniston > wrote: > > > > I'd like to try to optimise double word left shifts of sign/zero extended > > operands if a widening multiply instruction is available. For the following > > code: > > > > l

Re: Double word left shift optimisation

2012-07-26 Thread Ian Lance Taylor
On Thu, Jul 26, 2012 at 8:57 AM, Jon Beniston wrote: > > I'd like to try to optimise double word left shifts of sign/zero extended > operands if a widening multiply instruction is available. For the following > code: > > long long f(long a, long b) > { > return (long long)a << b; > } > > ARM, MI