This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Oct 2014 16:32:33 +0400
- Subject: Re: [PATCH i386 AVX512] [80/n] Extend expand_sse2_mulvxdi3.
- Authentication-results: sourceware.org; auth=none
- References: <20141016115551 dot GA51430 at msticlxl57 dot ims dot intel dot com> <CAFULd4Ysg3GS1-wpNS0jna+Y0bSFMvNx8YtRCX9G9AgnrZuk1w at mail dot gmail dot com>
Hello UroÅ,
On 16 Oct 14:29, Uros Bizjak wrote:
> > + 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 ?
Right, copy-and-paste :(
>
> > + }
> > + }
> > + 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.
Done.
Updated patch in the bottom. Is it ok?
--
Thanks, K
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c3202c4..415e330 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -45667,7 +45667,22 @@ 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)
+ {
+ rtx (*gen) (rtx, rtx, rtx);
+
+ if (mode == V8DImode)
+ gen = gen_avx512dq_mulv8di3;
+ else if (TARGET_AVX512VL)
+ {
+ if (mode == V4DImode)
+ gen = gen_avx512dq_mulv4di3;
+ else if (mode == V2DImode)
+ gen = gen_avx512dq_mulv2di3;
+ }
+ emit_insn (gen (op0, op1, op2));
+ }
+ else if (TARGET_XOP && mode == V2DImode)
{
/* op1: A,B,C,D, op2: E,F,G,H */
op1 = gen_lowpart (V4SImode, op1);