This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH x86, PR60451] Expand even/odd permutation using pack insn.


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]