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 i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.


On Thu, Oct 16, 2014 at 1:55 PM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hello,
> This patch extends expand_sse2_mulvxdi3.
>
> Bootstrapped.
> AVX-512* tests on top of patch-set all pass
> under simulator.
>
> Is it ok for trunk?
>
> gcc/
>         * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Extend
>         expand_sse2_mulvxdi3.
>
> --
> Thanks, K
>
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index 1ee947a..945bc8d 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -45667,7 +45667,19 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
>    enum machine_mode mode = GET_MODE (op0);
>    rtx t1, t2, t3, t4, t5, t6;
>
> -  if (TARGET_XOP && mode == V2DImode)
> +  if (TARGET_AVX512DQ)
> +    {
> +      if (mode == V8DImode)
> +       emit_insn (gen_avx512dq_mulv8di3 (op0, op1, op2));
> +      else if (TARGET_AVX512VL)
> +       {
> +         if (mode == V4DImode)
> +           emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));
> +         else if (mode == V2DImode)
> +           emit_insn (gen_avx512dq_mulv4di3 (op0, op1, op2));

Should this be v2di ?

> +       }
> +    }
> +  else if (TARGET_XOP && mode == V2DImode)
>      {
>        /* op1: A,B,C,D, op2: E,F,G,H */
>        op1 = gen_lowpart (V4SImode, op1);

Please use function pointers in the added part.

Thanks,
Uros.


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