Re: [PATCH, x86] Improves x86 permutation expand

2014-07-04 Thread Uros Bizjak
On Fri, Jul 4, 2014 at 2:49 PM, Evgeny Stupachenko wrote: > 2014-07-04 Evgeny Stupachenko > > * config/i386/i386.c (expand_vec_perm_pblendv): Disable for AVX. Please mention PR target/61618 above. >>> The following patch should fix 61618 >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?i

Re: [PATCH, x86] Improves x86 permutation expand

2014-07-04 Thread Evgeny Stupachenko
2014-07-04 Evgeny Stupachenko * config/i386/i386.c (expand_vec_perm_pblendv): Disable for AVX. On Fri, Jul 4, 2014 at 3:20 PM, Uros Bizjak wrote: > On Thu, Jul 3, 2014 at 10:57 AM, Evgeny Stupachenko > wrote: >> The following patch should fix 61618 >> https://gcc.gnu.org/bugzilla/s

Re: [PATCH, x86] Improves x86 permutation expand

2014-07-04 Thread Uros Bizjak
On Thu, Jul 3, 2014 at 10:57 AM, Evgeny Stupachenko wrote: > The following patch should fix 61618 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61618 > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index 8046c67..2cffcef 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/

Re: [PATCH, x86] Improves x86 permutation expand

2014-07-03 Thread Evgeny Stupachenko
The following patch should fix 61618 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61618 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8046c67..2cffcef 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -43211,12 +43211,10 @@ expand_vec_perm_pblendv (struct exp

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-10 Thread Evgeny Stupachenko
The stability of the changes are covered in gcc.dg/vect/pr52252-ld.c Test on "pblend" scan I'll add with the patch: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00795.html On Tue, Jun 10, 2014 at 12:19 AM, H.J. Lu wrote: > On Mon, Jun 9, 2014 at 12:49 PM, Richard Henderson wrote: >> On 06/09/20

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-09 Thread H.J. Lu
On Mon, Jun 9, 2014 at 12:49 PM, Richard Henderson wrote: > On 06/09/2014 12:10 PM, Evgeny Stupachenko wrote: >> Nice catch. >> Patch with corresponding changes: > > Looks ok with an appropriate changelog. > It will be nice to include testcases to cover those changes. -- H.J.

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-09 Thread Richard Henderson
On 06/09/2014 12:10 PM, Evgeny Stupachenko wrote: > Nice catch. > Patch with corresponding changes: Looks ok with an appropriate changelog. r~

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-09 Thread Evgeny Stupachenko
Nice catch. Patch with corresponding changes: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8827256..0b80354 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -43185,6 +43185,80 @@ expand_vec_perm_palignr (struct expand_vec_perm_d *d) return ok; } +/* A

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-09 Thread Richard Henderson
On 06/09/2014 03:13 AM, Evgeny Stupachenko wrote: > + /* First we apply one operand permutation to the part where > + elements stay not in their respective lanes. */ > + dcopy = *d; > + if (which == 2) > +dcopy.op0 = dcopy.op1 = d->op1; > + else > +dcopy.op0 = dcopy.op1 = d->op0; >

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-09 Thread Evgeny Stupachenko
Right now we need to cover permutations coming from 3 loads/stores group. My case covers them. I agree that another order of pblend and pshufb covers additional cases. Good point. We can cover this in a separate patch. Asserts are ok if we exclude AVX2 in ISA checks. Is the following patch ok? d

Re: [PATCH, x86] Improves x86 permutation expand

2014-06-05 Thread Richard Henderson
On 06/05/2014 08:29 AM, Evgeny Stupachenko wrote: > + /* Figure out where permutation elements stay not in their > + respective lanes. */ > + for (i = 0, which = 0; i < nelt; ++i) > +{ > + unsigned e = d->perm[i]; > + if (e != i) > + which |= (e < nelt ? 1 : 2); > +}

[PATCH, x86] Improves x86 permutation expand

2014-06-05 Thread Evgeny Stupachenko
Hi, The patch passed bootstrap and make check. No new fails. The patch gives ~10% to test in pr52252 and potentially in pr61403. Is it ok? Thanks, Evgeny ChangeLog: 2014-06-05 Evgeny Stupachenko * config/i386/i386.c (expand_vec_perm_pblendv): New. Permutation expand using