Re: vec_cond_expr adjustments

2012-10-11 Thread Richard Biener
On Thu, Oct 11, 2012 at 1:20 AM, Marc Glisse marc.gli...@inria.fr wrote: On Mon, 8 Oct 2012, Richard Guenther wrote: On Mon, Oct 8, 2012 at 11:34 AM, Marc Glisse marc.gli...@inria.fr wrote: On Mon, 8 Oct 2012, Richard Guenther wrote: VEC_COND_EXPR is more complicated. We could for instance

Re: vec_cond_expr adjustments

2012-10-10 Thread Marc Glisse
On Mon, 8 Oct 2012, Richard Guenther wrote: On Mon, Oct 8, 2012 at 11:34 AM, Marc Glisse marc.gli...@inria.fr wrote: On Mon, 8 Oct 2012, Richard Guenther wrote: VEC_COND_EXPR is more complicated. We could for instance require that it takes as first argument a vector of -1 and 0 (thus 0, !=0

Re: vec_cond_expr adjustments

2012-10-08 Thread Richard Guenther
On Fri, Oct 5, 2012 at 5:01 PM, Marc Glisse marc.gli...@inria.fr wrote: [I am still a little confused, sorry for the long email...] On Tue, 2 Oct 2012, Richard Guenther wrote: + if (TREE_CODE (op0) == VECTOR_CST TREE_CODE (op1) == VECTOR_CST) +{ + int count = VECTOR_CST_NELTS

Re: vec_cond_expr adjustments

2012-10-08 Thread Marc Glisse
On Mon, 8 Oct 2012, Richard Guenther wrote: VEC_COND_EXPR is more complicated. We could for instance require that it takes as first argument a vector of -1 and 0 (thus 0, !=0 and the neon thing are equivalent). Which would leave to decide what the expansion of vec_cond_expr passes to the

Re: vec_cond_expr adjustments

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 11:34 AM, Marc Glisse marc.gli...@inria.fr wrote: On Mon, 8 Oct 2012, Richard Guenther wrote: VEC_COND_EXPR is more complicated. We could for instance require that it takes as first argument a vector of -1 and 0 (thus 0, !=0 and the neon thing are equivalent). Which

Re: vec_cond_expr adjustments

2012-10-05 Thread Marc Glisse
[I am still a little confused, sorry for the long email...] On Tue, 2 Oct 2012, Richard Guenther wrote: + if (TREE_CODE (op0) == VECTOR_CST TREE_CODE (op1) == VECTOR_CST) +{ + int count = VECTOR_CST_NELTS (op0); + tree *elts = XALLOCAVEC (tree, count); + gcc_assert

Re: vec_cond_expr adjustments

2012-10-02 Thread Richard Guenther
On Mon, Oct 1, 2012 at 5:57 PM, Marc Glisse marc.gli...@inria.fr wrote: [merging both threads, thanks for the answers] On Mon, 1 Oct 2012, Richard Guenther wrote: optabs should be fixed instead, an is_gimple_val condition is implicitely val != 0. For vectors, I think it should be val 0

Re: vec_cond_expr adjustments

2012-09-28 Thread Richard Guenther
On Fri, Sep 28, 2012 at 12:42 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, I have been experimenting with generating VEC_COND_EXPR from the front-end, and these are just a couple things I noticed. 1) optabs.c requires that the first argument of vec_cond_expr be a comparison, but

Re: vec_cond_expr adjustments

2012-09-28 Thread Marc Glisse
On Fri, 28 Sep 2012, Richard Guenther wrote: On Fri, Sep 28, 2012 at 12:42 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, I have been experimenting with generating VEC_COND_EXPR from the front-end, and these are just a couple things I noticed. 1) optabs.c requires that the first argument

vec_cond_expr adjustments

2012-09-27 Thread Marc Glisse
Hello, I have been experimenting with generating VEC_COND_EXPR from the front-end, and these are just a couple things I noticed. 1) optabs.c requires that the first argument of vec_cond_expr be a comparison, but verify_gimple_assign_ternary only checks is_gimple_condexpr, like for