This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH x86, PR60451] Expand even/odd permutation using pack insn.
- From: Richard Henderson <rth at redhat dot com>
- To: Evgeny Stupachenko <evstupac at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Thu, 20 Nov 2014 15:30:25 +0100
- Subject: Re: [PATCH x86, PR60451] Expand even/odd permutation using pack insn.
- Authentication-results: sourceware.org; auth=none
- References: <CAOvf_xzkGVO6t_TWkLA=bqrf4JGpYW+0aNgGUm6Ababa5NjFig at mail dot gmail dot com>
On 11/20/2014 12:36 PM, Evgeny Stupachenko wrote:
> + /* Required for "pack". */
> + if (!TARGET_SSE4_2 || d->one_operand_p)
> + return false;
Why the SSE4_2 check here when...
> +
> + /* Only V8HI, V16QI, V16HI and V32QI modes are more profitable than general
> + shuffles. */
> + if (d->vmode == V8HImode)
> + {
> + c = 0xffff;
> + s = 16;
> + half_mode = V4SImode;
> + gen_and = gen_andv4si3;
> + gen_pack = gen_sse4_1_packusdw;
... it's SSE4_1 here,
> + gen_shift = gen_lshrv4si3;
> + }
> + else if (d->vmode == V16QImode)
> + {
> + c = 0xff;
> + s = 8;
> + half_mode = V8HImode;
> + gen_and = gen_andv8hi3;
> + gen_pack = gen_sse2_packuswb;
... and SSE2 here?
r~