Re: [PATCH] Extend shift permutations on power of 2 cases

2014-11-28 Thread Richard Biener
On Fri, Nov 28, 2014 at 12:33 PM, Evgeny Stupachenko wrote: > Hi, > > After fixing PR60451 (pack scheme instead of pshufb) general power of > 2 permutations become more profitable. > So I'd like to revert the changes keeping algorithm live or implement > new hook to use best algorithm/size for par

Re: [PATCH] Extend shift permutations on power of 2 cases

2014-11-28 Thread Evgeny Stupachenko
Hi, After fixing PR60451 (pack scheme instead of pshufb) general power of 2 permutations become more profitable. So I'd like to revert the changes keeping algorithm live or implement new hook to use best algorithm/size for particular -mtune. Below is reverting patch. Bootstrap and make check pass

Re: [PATCH] Extend shift permutations on power of 2 cases

2014-11-12 Thread Uros Bizjak
On Wed, Nov 12, 2014 at 2:15 PM, Evgeny Stupachenko wrote: > To avoid misunderstanding. > I haven't yet committed this obvious fix. > Is it ok? If it is obvious, then it doesn't need an approval. So, OK. Thanks, Uros.

Re: [PATCH] Extend shift permutations on power of 2 cases

2014-11-12 Thread Evgeny Stupachenko
To avoid misunderstanding. I haven't yet committed this obvious fix. Is it ok? On Wed, Nov 12, 2014 at 2:15 PM, Evgeny Stupachenko wrote: > Committed r217359. > However, it appeared that AVX2 uses vperm2i128 for the shift here > (instead of palignr for SSSE3/AVX). To handle AVX2 case we need to >

Re: [PATCH] Extend shift permutations on power of 2 cases

2014-11-12 Thread Evgeny Stupachenko
Committed r217359. However, it appeared that AVX2 uses vperm2i128 for the shift here (instead of palignr for SSSE3/AVX). To handle AVX2 case we need to modify test case: diff --git a/gcc/testsuite/gcc.target/i386/pr52252-atom-1.c b/gcc/testsuite/gcc.target/i386/pr52252-atom-1.c index 1fbd258..020e

Re: [PATCH] Extend shift permutations on power of 2 cases

2014-11-11 Thread Richard Biener
On Tue, Nov 11, 2014 at 3:21 PM, Evgeny Stupachenko wrote: > Hi, > > The patch extends shift permutations technique on power of 2 cases > (previously even/odd transformations was used unconditionally). > Basically the patch just add loop for load group of length 2, like it > is done in "vect_permu

[PATCH] Extend shift permutations on power of 2 cases

2014-11-11 Thread Evgeny Stupachenko
Hi, The patch extends shift permutations technique on power of 2 cases (previously even/odd transformations was used unconditionally). Basically the patch just add loop for load group of length 2, like it is done in "vect_permute_load_chain" function. For Silvermont it reduces insn sequence for l