On Wed, Feb 7, 2018 at 2:02 PM, Shalnov, Sergey <sergey.shal...@intel.com> wrote: > Hi, > This patch is one of the set of patches to fix SKX costs.
Please post the whole series for review. Thanks, Uros. > I think multiplication costs calculation algorithm needs to be adjusted in > gcc/config/i386/i386.c ix86_multiplication_cost() function. > For TARGET_AVX512DQ emulation is not used and single vpmullq instruction > emitted. > I think we have to align costs calculation algorithm with sequence of emitted > instructions. > > I don't see visible regressions for this change. This patch helps to avoid a > regressions with further changes. > > Could you please merge the patch to the main trunk? > > Thank you > Sergey > > 2018-02-06 Sergey Shalnov <sergey.shal...@intel.com> > gcc/ > * config/i386/i386.c (ix86_multiplication_cost): Fix multiplication > cost for TARGET_AVX512DQ since it uses vpmullq instead > emulated sequence > > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index > 70b6775..6f4ec5d 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -40393,6 +40393,10 @@ ix86_multiplication_cost (const struct > processor_costs *cost, > ? cost->mulsd : cost->mulss, true); > else if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT) > { > + /* vpmullq is used in this case. No emulation is needed. */ > + if (TARGET_AVX512DQ) > + return ix86_vec_cost (mode, cost->mulss, true); > + > /* V*QImode is emulated with 7-13 insns. */ > if (mode == V16QImode || mode == V32QImode) > { >