Re: combine vec_perm_expr with constructor

2012-09-10 Thread Richard Guenther
On Sat, Sep 8, 2012 at 9:14 AM, Marc Glisse wrote: > On Mon, 3 Sep 2012, Richard Guenther wrote: > >> You do work above and then bail late here. Always do early exists early >> to reduce useless compile-time. > > [...] > >> You need to verify that fold_ternary returns something that is valid >> G

Re: combine vec_perm_expr with constructor

2012-09-08 Thread Marc Glisse
On Mon, 3 Sep 2012, Richard Guenther wrote: You do work above and then bail late here. Always do early exists early to reduce useless compile-time. [...] You need to verify that fold_ternary returns something that is valid GIMPLE. fold () in general happily returns trees that are in the need

Re: combine vec_perm_expr with constructor

2012-09-04 Thread Richard Guenther
On Mon, Sep 3, 2012 at 5:50 PM, Marc Glisse wrote: > On Mon, 3 Sep 2012, Richard Guenther wrote: > >> On Mon, Sep 3, 2012 at 4:00 PM, Marc Glisse wrote: >>> >>> On Mon, 3 Sep 2012, Richard Guenther wrote: >>> You shouldn't need the VECTOR_CST handling - constant propagation should alrea

Re: combine vec_perm_expr with constructor

2012-09-03 Thread Marc Glisse
On Mon, 3 Sep 2012, Richard Guenther wrote: On Mon, Sep 3, 2012 at 4:00 PM, Marc Glisse wrote: On Mon, 3 Sep 2012, Richard Guenther wrote: You shouldn't need the VECTOR_CST handling - constant propagation should already ensure properly simplified code here (and is the more canonical place to

Re: combine vec_perm_expr with constructor

2012-09-03 Thread Richard Guenther
On Mon, Sep 3, 2012 at 4:00 PM, Marc Glisse wrote: > On Mon, 3 Sep 2012, Richard Guenther wrote: > >> You shouldn't need the VECTOR_CST handling - constant propagation should >> already ensure properly simplified code here (and is the more canonical >> place >> to handle this). > > > IIRC, I added

Re: combine vec_perm_expr with constructor

2012-09-03 Thread Marc Glisse
On Mon, 3 Sep 2012, Richard Guenther wrote: You shouldn't need the VECTOR_CST handling - constant propagation should already ensure properly simplified code here (and is the more canonical place to handle this). IIRC, I added VECTOR_CST because of mixed constructor/vector_cst shuffles (and be

Re: combine vec_perm_expr with constructor

2012-09-03 Thread Richard Guenther
On Sat, Aug 25, 2012 at 10:54 PM, Marc Glisse wrote: > Hello, > > this patch (bootstrapped and regtested on x86_64) deals with the same issue > as the one at: > > http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00205.html > > that is combining a shuffle of a constructor into a constructor, but at the

combine vec_perm_expr with constructor

2012-08-25 Thread Marc Glisse
Hello, this patch (bootstrapped and regtested on x86_64) deals with the same issue as the one at: http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00205.html that is combining a shuffle of a constructor into a constructor, but at the tree-ssa level. An advantage is that it works with any size of