Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-10 Thread Richard Guenther
On Sat, Sep 8, 2012 at 10:17 AM, Marc Glisse wrote: > On Mon, 3 Sep 2012, Richard Guenther wrote: > >> Please do the early outs where you compute the arguments. Thus, right >> after getting op0 in this case or right after computing n for the n != 1 >> check. >> >> I think you need to verify that

Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-08 Thread Marc Glisse
On Mon, 3 Sep 2012, Richard Guenther wrote: Please do the early outs where you compute the arguments. Thus, right after getting op0 in this case or right after computing n for the n != 1 check. I think you need to verify that the type of 'op' is actually the element type of op0. The BIT_FIELD

Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-04 Thread Richard Guenther
On Mon, Sep 3, 2012 at 6:12 PM, Marc Glisse wrote: > On Mon, 3 Sep 2012, Richard Guenther wrote: > > + if (code == VEC_PERM_EXPR) > +{ > + tree p, m, index, tem; > + unsigned nelts; > + m = gimple_assign_rhs3 (def_stmt); > + if (TREE_CODE (m) != VEC

Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-03 Thread Marc Glisse
On Mon, 3 Sep 2012, Richard Guenther wrote: + if (code == VEC_PERM_EXPR) +{ + tree p, m, index, tem; + unsigned nelts; + m = gimple_assign_rhs3 (def_stmt); + if (TREE_CODE (m) != VECTOR_CST) + return false; + nelts = VECTOR_CST_NELTS (m); + idx = TREE_INT

Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-03 Thread Richard Guenther
On Mon, Sep 3, 2012 at 3:39 PM, Marc Glisse wrote: > On Mon, 3 Sep 2012, Richard Guenther wrote: > >> Please do the early outs where you compute the arguments. Thus, right >> after getting op0 in this case or right after computing n for the n != 1 >> check. > > > Ok. > >> I think you need to veri

Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-03 Thread Marc Glisse
On Mon, 3 Sep 2012, Richard Guenther wrote: Please do the early outs where you compute the arguments. Thus, right after getting op0 in this case or right after computing n for the n != 1 check. Ok. I think you need to verify that the type of 'op' is actually the element type of op0. The B

Re: combine BIT_FIELD_REF and VEC_PERM_EXPR

2012-09-03 Thread Richard Guenther
On Sat, Sep 1, 2012 at 8:54 PM, Marc Glisse wrote: > Hello, > > this patch makes it so that instead of taking the k-th element of a shuffle > of V, we directly take the k'-th element of V. > > Note that I am *not* checking that the shuffle is only used once. There can > be some circumstances where