Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-09-18 Thread Segher Boessenkool
On Tue, Sep 18, 2018 at 10:52:17AM -0500, Will Schmidt wrote: > On Wed, 2018-09-12 at 08:23 -0500, Segher Boessenkool wrote: > > Hi! > > > > + unsigned int n_elts = VECTOR_CST_NELTS (arg0); > > > + if (TREE_CODE (arg1) != INTEGER_CST > > > + || TREE_INT_CST_LOW (arg1) > (n_elts -1)) > > > +

Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-09-18 Thread Will Schmidt
On Wed, 2018-09-12 at 08:23 -0500, Segher Boessenkool wrote: > Hi! > > + unsigned int n_elts = VECTOR_CST_NELTS (arg0); > > + if (TREE_CODE (arg1) != INTEGER_CST > > + || TREE_INT_CST_LOW (arg1) > (n_elts -1)) > > + return false; > > I think you should check lower bound 0 as well.

Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-09-12 Thread Bill Schmidt
On 9/12/18 8:23 AM, Segher Boessenkool wrote: > Hi! > > Sorry this is all taking so long. > > On Mon, Aug 20, 2018 at 04:44:30PM -0500, Will Schmidt wrote: >> 2018-08-20 Will Schmidt >> >> * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for >>early gimple fol

Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-09-12 Thread Segher Boessenkool
Hi! Sorry this is all taking so long. On Mon, Aug 20, 2018 at 04:44:30PM -0500, Will Schmidt wrote: > 2018-08-20 Will Schmidt > > * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for > early gimple folding of vec_splat(). "early" should indent together wit

Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-08-25 Thread Bill Schmidt
On 8/25/18 1:09 PM, Segher Boessenkool wrote: > Hey, > > On Sat, Aug 25, 2018 at 12:15:16PM -0500, Bill Schmidt wrote: >> On 8/20/18 4:44 PM, Will Schmidt wrote: >>> Enable GIMPLE folding of the vec_splat() intrinsic. (v3). >>> >>> This uses the tree_vec_extract() function out of tree-vect-gen

Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-08-25 Thread Segher Boessenkool
Hey, On Sat, Aug 25, 2018 at 12:15:16PM -0500, Bill Schmidt wrote: > On 8/20/18 4:44 PM, Will Schmidt wrote: > > Enable GIMPLE folding of the vec_splat() intrinsic. (v3). > > > > This uses the tree_vec_extract() function out of tree-vect-generic.c > > to retrieve the splat value, which is a B

Re: [PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-08-25 Thread Bill Schmidt
On 8/20/18 4:44 PM, Will Schmidt wrote: > Hi > Enable GIMPLE folding of the vec_splat() intrinsic. (v3). > > This uses the tree_vec_extract() function out of tree-vect-generic.c > to retrieve the splat value, which is a BIT_FIELD_REF. That function is > made non-static as part of this change

[PATCH, RFC, rs6000, v3] enable early gimple-folding of vec_splat

2018-08-20 Thread Will Schmidt
Hi Enable GIMPLE folding of the vec_splat() intrinsic. (v3). This uses the tree_vec_extract() function out of tree-vect-generic.c to retrieve the splat value, which is a BIT_FIELD_REF. That function is made non-static as part of this change. Testcases are already in-tree. V2 update