Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-20 Thread H.J. Lu
On Tue, Jun 7, 2011 at 1:50 PM, H.J. Lu wrote: > On Wed, Jun 1, 2011 at 2:23 AM, Ira Rosen wrote: >> Hi, >> >> The vectorizer expects widening multiplication pattern to be: >> >>     type a_t, b_t; >>     TYPE a_T, b_T, prod_T; >> >>     a_T = (TYPE) a_t; >>     b_T = (TYPE) b_t; >>     prod_T =

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-07 Thread H.J. Lu
On Wed, Jun 1, 2011 at 2:23 AM, Ira Rosen wrote: > Hi, > > The vectorizer expects widening multiplication pattern to be: > >     type a_t, b_t; >     TYPE a_T, b_T, prod_T; > >     a_T = (TYPE) a_t; >     b_T = (TYPE) b_t; >     prod_T = a_T * b_T; > > where type 'TYPE' is double the size of type

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-06 Thread Richard Guenther
On Mon, Jun 6, 2011 at 3:04 PM, Richard Sandiford wrote: > Richard Guenther writes: >> Thanks.  I would hope that we eventually can get rid of the >> pattern recognizer ... at least for SSE there is also always >> a scalar variant instruction for each vectorized one. > > AFAIK, that isn't true fo

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-06 Thread Richard Sandiford
Richard Guenther writes: > Thanks. I would hope that we eventually can get rid of the > pattern recognizer ... at least for SSE there is also always > a scalar variant instruction for each vectorized one. AFAIK, that isn't true for ARM and NEON. E.g. I don't know of a single instruction that do

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-02 Thread Richard Guenther
On Thu, Jun 2, 2011 at 1:08 PM, Ira Rosen wrote: > On 2 June 2011 12:59, Richard Guenther wrote: >> On Thu, Jun 2, 2011 at 10:46 AM, Ira Rosen wrote: >>> On 1 June 2011 15:14, Richard Guenther wrote: On Wed, Jun 1, 2011 at 1:37 PM, Ira Rosen wrote: > On 1 June 2011 12:42, Richard Guen

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-02 Thread Ira Rosen
On 2 June 2011 12:59, Richard Guenther wrote: > On Thu, Jun 2, 2011 at 10:46 AM, Ira Rosen wrote: >> On 1 June 2011 15:14, Richard Guenther wrote: >>> On Wed, Jun 1, 2011 at 1:37 PM, Ira Rosen wrote: On 1 June 2011 12:42, Richard Guenther wrote: > Did you think about moving pass_

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-02 Thread Richard Guenther
On Thu, Jun 2, 2011 at 10:46 AM, Ira Rosen wrote: > On 1 June 2011 15:14, Richard Guenther wrote: >> On Wed, Jun 1, 2011 at 1:37 PM, Ira Rosen wrote: >>> On 1 June 2011 12:42, Richard Guenther wrote: >>> Did you think about moving pass_optimize_widening_mul before loop optimizations?

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-02 Thread Ira Rosen
On 1 June 2011 15:14, Richard Guenther wrote: > On Wed, Jun 1, 2011 at 1:37 PM, Ira Rosen wrote: >> On 1 June 2011 12:42, Richard Guenther wrote: >> >>> Did you think about moving pass_optimize_widening_mul before >>> loop optimizations?  Does that pass catch the cases you are >>> teaching the p

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-01 Thread Richard Guenther
On Wed, Jun 1, 2011 at 1:37 PM, Ira Rosen wrote: > On 1 June 2011 12:42, Richard Guenther wrote: > >> Did you think about moving pass_optimize_widening_mul before >> loop optimizations?  Does that pass catch the cases you are >> teaching the pattern recognizer?  I think we should try to expose >>

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-01 Thread Ira Rosen
On 1 June 2011 12:42, Richard Guenther wrote: > Did you think about moving pass_optimize_widening_mul before > loop optimizations?  Does that pass catch the cases you are > teaching the pattern recognizer?  I think we should try to expose > these more complicated instructions to loop optimizers.

Re: [patch] Improve detection of widening multiplication in the vectorizer

2011-06-01 Thread Richard Guenther
On Wed, Jun 1, 2011 at 11:23 AM, Ira Rosen wrote: > Hi, > > The vectorizer expects widening multiplication pattern to be: > >     type a_t, b_t; >     TYPE a_T, b_T, prod_T; > >     a_T = (TYPE) a_t; >     b_T = (TYPE) b_t; >     prod_T = a_T * b_T; > > where type 'TYPE' is double the size of type

[patch] Improve detection of widening multiplication in the vectorizer

2011-06-01 Thread Ira Rosen
Hi, The vectorizer expects widening multiplication pattern to be: type a_t, b_t; TYPE a_T, b_T, prod_T; a_T = (TYPE) a_t; b_T = (TYPE) b_t; prod_T = a_T * b_T; where type 'TYPE' is double the size of type 'type'. This works fine when the types are signed. For the unsign