Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-21 Thread Christophe Lyon
On 21 June 2016 at 15:13, Jakub Jelinek wrote: > On Tue, Jun 21, 2016 at 03:10:33PM +0200, Christophe Lyon wrote: >> > Here is a new patch version, which removes the hardcoded dg-do run >> > directives, >> > so that tests use compile or run depending on the result of >> >

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-21 Thread Jakub Jelinek
On Tue, Jun 21, 2016 at 03:10:33PM +0200, Christophe Lyon wrote: > > Here is a new patch version, which removes the hardcoded dg-do run > > directives, > > so that tests use compile or run depending on the result of > > check_vect_support_and_set_flags. > > > > On ARM, this first uses arm_neon_ok

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-21 Thread Christophe Lyon
On 15 June 2016 at 10:45, Christophe Lyon wrote: > On 9 June 2016 at 14:46, Jakub Jelinek wrote: >> On Thu, Jun 09, 2016 at 02:40:43PM +0200, Christophe Lyon wrote: >>> > Bet it depends if this happens before the signal(SIGILL, sig_ill_handler); >>>

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-15 Thread Christophe Lyon
On 9 June 2016 at 14:46, Jakub Jelinek wrote: > On Thu, Jun 09, 2016 at 02:40:43PM +0200, Christophe Lyon wrote: >> > Bet it depends if this happens before the signal(SIGILL, sig_ill_handler); >> > call or after it. If before, then I guess you'd better rewrite the >> > long

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-09 Thread Jakub Jelinek
On Thu, Jun 09, 2016 at 02:40:43PM +0200, Christophe Lyon wrote: > > Bet it depends if this happens before the signal(SIGILL, sig_ill_handler); > > call or after it. If before, then I guess you'd better rewrite the > > long long a = 0, b = 1; > > asm ("vorr %P0, %P1, %P2" > > :

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-09 Thread Christophe Lyon
On 9 June 2016 at 14:31, Jakub Jelinek wrote: > On Thu, Jun 09, 2016 at 02:18:44PM +0200, Christophe Lyon wrote: >> On 8 June 2016 at 16:50, Jakub Jelinek wrote: >> > On Wed, Jun 08, 2016 at 04:44:00PM +0200, Christophe Lyon wrote: >> >> I've tried the

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-09 Thread Jakub Jelinek
On Thu, Jun 09, 2016 at 02:18:44PM +0200, Christophe Lyon wrote: > On 8 June 2016 at 16:50, Jakub Jelinek wrote: > > On Wed, Jun 08, 2016 at 04:44:00PM +0200, Christophe Lyon wrote: > >> I've tried the attached patch (which does only dg-options -> > >> dg-additional-options). >

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-09 Thread Christophe Lyon
On 8 June 2016 at 16:50, Jakub Jelinek wrote: > On Wed, Jun 08, 2016 at 04:44:00PM +0200, Christophe Lyon wrote: >> I've tried the attached patch (which does only dg-options -> >> dg-additional-options). >> For GCC, it's better, except that on arm-none-eabi qemu complains about

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-08 Thread Jakub Jelinek
On Wed, Jun 08, 2016 at 04:44:00PM +0200, Christophe Lyon wrote: > I've tried the attached patch (which does only dg-options -> > dg-additional-options). > For GCC, it's better, except that on arm-none-eabi qemu complains about > an illegal instruction when asked to use arm926 and GCC is

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-08 Thread Christophe Lyon
On 8 June 2016 at 12:33, Richard Biener wrote: > On Wed, 8 Jun 2016, Jakub Jelinek wrote: > >> On Wed, Jun 08, 2016 at 12:26:17PM +0200, Richard Biener wrote: >> > > So: should I change dg-options into dg-additional-options for all the >> > > tests for consistency, or only on

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-08 Thread Richard Biener
On Wed, 8 Jun 2016, Jakub Jelinek wrote: > On Wed, Jun 08, 2016 at 12:26:17PM +0200, Richard Biener wrote: > > > So: should I change dg-options into dg-additional-options for all the > > > tests for consistency, or only on the 3 ones where it makes them pass? > > > (pr71259.c,

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-08 Thread Jakub Jelinek
On Wed, Jun 08, 2016 at 12:26:17PM +0200, Richard Biener wrote: > > So: should I change dg-options into dg-additional-options for all the > > tests for consistency, or only on the 3 ones where it makes them pass? > > (pr71259.c, vect-shift-2-big-array.c, vect-shift-2.c) > > I think all tests

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-08 Thread Richard Biener
On Wed, 8 Jun 2016, Christophe Lyon wrote: > On 7 June 2016 at 11:28, Jakub Jelinek wrote: > > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: > >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 > >> > 17:05:37.693475438 +0200 > >> > +++

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-08 Thread Christophe Lyon
On 7 June 2016 at 11:28, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 >> > 17:05:37.693475438 +0200 >> > +++ gcc/testsuite/gcc.dg/vect/pr71259.c 2016-06-03

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 02:43:37PM +0200, Christophe Lyon wrote: > > No, why? This test doesn't test whether the function has been vectorized. > > It only tests whether it works. > > And the check_vect () is supposed to exit early if some extra flags were > > passed by vect.exp (like e.g. on

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Christophe Lyon
On 7 June 2016 at 11:42, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 10:36:25AM +0100, Ramana Radhakrishnan wrote: >> On Tue, Jun 7, 2016 at 10:28 AM, Jakub Jelinek wrote: >> > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: >> >> > ---

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 10:36:25AM +0100, Ramana Radhakrishnan wrote: > On Tue, Jun 7, 2016 at 10:28 AM, Jakub Jelinek wrote: > > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: > >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 > >> >

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Ramana Radhakrishnan
On Tue, Jun 7, 2016 at 10:28 AM, Jakub Jelinek wrote: > On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: >> > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 >> > 17:05:37.693475438 +0200 >> > +++ gcc/testsuite/gcc.dg/vect/pr71259.c 2016-06-03

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Jakub Jelinek
On Tue, Jun 07, 2016 at 11:23:01AM +0200, Christophe Lyon wrote: > > --- gcc/testsuite/gcc.dg/vect/pr71259.c.jj 2016-06-03 > > 17:05:37.693475438 +0200 > > +++ gcc/testsuite/gcc.dg/vect/pr71259.c 2016-06-03 17:05:32.418544731 +0200 > > @@ -0,0 +1,28 @@ > > +/* PR tree-optimization/71259 */ >

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Christophe Lyon
Hi Jakub, On 3 June 2016 at 19:33, Jakub Jelinek wrote: > On Tue, Jan 12, 2016 at 05:21:37PM +0300, Ilya Enkovich wrote: >> > --- gcc/tree-vect-slp.c.jj 2016-01-08 21:45:57.0 +0100 >> > +++ gcc/tree-vect-slp.c 2016-01-11 12:07:19.633366712 +0100 >> > @@ -2999,12

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-07 Thread Richard Biener
On Mon, 6 Jun 2016, Jakub Jelinek wrote: > On Mon, Jun 06, 2016 at 10:05:57AM +0200, Richard Biener wrote: > > So this ends up generating { a ? -1 : 0, b ? -1 : 0, ... }. That > > Yes, that is already what we do now for loop vectorization. > > > might be less optimal than doing { a, b, ... } ?

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-06 Thread Jakub Jelinek
On Mon, Jun 06, 2016 at 10:05:57AM +0200, Richard Biener wrote: > So this ends up generating { a ? -1 : 0, b ? -1 : 0, ... }. That Yes, that is already what we do now for loop vectorization. > might be less optimal than doing { a, b, ... } ? { -1, -1 ... } : { 0, 0, > .. } Well, it would need

Re: [PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-06 Thread Richard Biener
On Fri, 3 Jun 2016, Jakub Jelinek wrote: > On Tue, Jan 12, 2016 at 05:21:37PM +0300, Ilya Enkovich wrote: > > > --- gcc/tree-vect-slp.c.jj 2016-01-08 21:45:57.0 +0100 > > > +++ gcc/tree-vect-slp.c 2016-01-11 12:07:19.633366712 +0100 > > > @@ -2999,12 +2999,9 @@

[PATCH] Fix SLP wrong-code with VECTOR_BOOLEAN_TYPE_P (PR tree-optimization/71259)

2016-06-03 Thread Jakub Jelinek
On Tue, Jan 12, 2016 at 05:21:37PM +0300, Ilya Enkovich wrote: > > --- gcc/tree-vect-slp.c.jj 2016-01-08 21:45:57.0 +0100 > > +++ gcc/tree-vect-slp.c 2016-01-11 12:07:19.633366712 +0100 > > @@ -2999,12 +2999,9 @@ vect_get_constant_vectors (tree op, slp_ > > gimple