Re: [PATCH, x86] Fix pblendv expand.

2014-12-10 Thread Uros Bizjak
On Wed, Dec 10, 2014 at 12:03 PM, Jakub Jelinek wrote: > On Wed, Dec 10, 2014 at 02:37:13AM +0300, Evgeny Stupachenko wrote: >> 2014-12-10 Evgeny Stupachenko > > I went ahead and filed a PR, so we have something to refer to in the > ChangeLog and name the testcases. Thanks! >> --- a/gcc/confi

Re: [PATCH, x86] Fix pblendv expand.

2014-12-10 Thread Jakub Jelinek
On Wed, Dec 10, 2014 at 02:37:13AM +0300, Evgeny Stupachenko wrote: > 2014-12-10 Evgeny Stupachenko I went ahead and filed a PR, so we have something to refer to in the ChangeLog and name the testcases. > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -47546,6 +47546,7 @@ exp

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
On Wed, Dec 10, 2014 at 12:54 AM, Jakub Jelinek wrote: > On Wed, Dec 10, 2014 at 12:33:52AM +0300, Evgeny Stupachenko wrote: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/i386/blend.c >> @@ -0,0 +1,61 @@ >> +/* Test correctness of size 3 store groups permutation. */ >> +/* { dg-do run } */ >

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Jakub Jelinek
On Wed, Dec 10, 2014 at 12:33:52AM +0300, Evgeny Stupachenko wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/blend.c > @@ -0,0 +1,61 @@ > +/* Test correctness of size 3 store groups permutation. */ > +/* { dg-do run } */ > +/* { dg-options "-O3" } */ > + > +#define N 50 > + > +enum nu

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
I've added the reproducer to the patch. is it ok? ChangeLog: 2014-12-10 Evgeny Stupachenko gcc/testsuite * gcc.target/i386/blend.c: New. gcc/ * config/i386/i386.c (expand_vec_perm_pblendv): Gen new rtx for expand_vec_perm_1 target. diff --git a/gcc/config/i386/i386.

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
I mean that there are a lot of people tracking spec2006 stability and therefore the issue should be on track in future. And that I can create the test case, but it would be as big as several GCC functions. Will work on reducing the test case. On Tue, Dec 9, 2014 at 7:20 PM, Richard Henderson wro

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Jakub Jelinek
On Tue, Dec 09, 2014 at 06:59:27PM +0300, Evgeny Stupachenko wrote: > I've tried to get smaller reproducer, however currently it is > complicated as several functions in GCC. Just add a gcc_assert where you are changing the code, testing for what you want to avoid. Then just delta reduce it or cre

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Richard Henderson
On 12/09/2014 07:59 AM, Evgeny Stupachenko wrote: > However patch is fixing spec2006 benchmark. Shouldn't that be enough > for regression testing? > No. Spec is not free. r~

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
I've tried to get smaller reproducer, however currently it is complicated as several functions in GCC. However patch is fixing spec2006 benchmark. Shouldn't that be enough for regression testing? Thanks, Evgeny On Tue, Dec 9, 2014 at 4:29 PM, Evgeny Stupachenko wrote: > The case comes from spec2

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Evgeny Stupachenko
The case comes from spec2006 403.gcc (or old GCC itself). for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i) { vd->e[i].mode = VOIDmode; vd->e[i].oldest_regno = i; vd->e[i].next_regno = INVALID_REGNUM; } It is vectorized and only then completely peeled. Only after peeling all

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Uros Bizjak
On Tue, Dec 9, 2014 at 9:57 AM, Uros Bizjak wrote: >> The patch fix pblendv expand. >> The bug was uncovered when permutation operands are constants. >> In this case we init target register for expand_vec_perm_1 with >> constant and then rewrite the target with constant for >> expand_vec_perm_pbl

Re: [PATCH, x86] Fix pblendv expand.

2014-12-09 Thread Uros Bizjak
On Tue, Dec 9, 2014 at 12:33 AM, Evgeny Stupachenko wrote: > The patch fix pblendv expand. > The bug was uncovered when permutation operands are constants. > In this case we init target register for expand_vec_perm_1 with > constant and then rewrite the target with constant for > expand_vec_perm_

[PATCH, x86] Fix pblendv expand.

2014-12-08 Thread Evgeny Stupachenko
Hi, The patch fix pblendv expand. The bug was uncovered when permutation operands are constants. In this case we init target register for expand_vec_perm_1 with constant and then rewrite the target with constant for expand_vec_perm_pblend. The patch fixes 403.gcc execution, compiled with -Ofast -