Re: [PATCH] Optimize vector init constructor

2019-03-04 Thread Richard Biener
On Sun, Mar 3, 2019 at 10:13 PM H.J. Lu wrote: > > On Sun, Mar 03, 2019 at 06:40:09AM -0800, Andrew Pinski wrote: > > ) > > ,On Sun, Mar 3, 2019 at 6:32 AM H.J. Lu wrote: > > > > > > For vector init constructor: > > > > > > --- > > > typedef float __v4sf __attribute__ ((__vector_size__ (16))); >

Re: [PATCH] Optimize vector init constructor

2019-03-03 Thread H.J. Lu
On Sun, Mar 03, 2019 at 06:40:09AM -0800, Andrew Pinski wrote: > ) > ,On Sun, Mar 3, 2019 at 6:32 AM H.J. Lu wrote: > > > > For vector init constructor: > > > > --- > > typedef float __v4sf __attribute__ ((__vector_size__ (16))); > > > > __v4sf > > foo (__v4sf x, float f) > > { > > __v4sf y = {

Re: [PATCH] Optimize vector init constructor

2019-03-03 Thread Andrew Pinski
) ,On Sun, Mar 3, 2019 at 6:32 AM H.J. Lu wrote: > > For vector init constructor: > > --- > typedef float __v4sf __attribute__ ((__vector_size__ (16))); > > __v4sf > foo (__v4sf x, float f) > { > __v4sf y = { f, x[1], x[2], x[3] }; > return y; > } > --- > > we can optimize vector init construc