RE: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-20 Thread Cui, Lili
> -Original Message-
> From: Uros Bizjak [mailto:ubiz...@gmail.com]
> Sent: Friday, August 16, 2019 11:07 PM
> To: H.J. Lu 
> Cc: Cui, Lili ; Jeff Law ; GCC Patches
> ; Zhang, Annita ; Xiao,
> Wei3 ; Liu, Hongtao ; Wang,
> Hongyu ; Castillo, Jason M
> 
> Subject: Re: Add TIGERLAKE and COOPERLAKE to GCC
> 
> On Fri, Aug 16, 2019 at 5:01 PM H.J. Lu  wrote:
> >
> > On Fri, Aug 16, 2019 at 5:53 AM Uros Bizjak  wrote:
> > >
> > > On Fri, Aug 16, 2019 at 6:10 AM Cui, Lili  wrote:
> > > >
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: H.J. Lu [mailto:hjl.to...@gmail.com]
> > > > > Sent: Friday, August 16, 2019 6:02 AM
> > > > > To: Jeff Law 
> > > > > Cc: Cui, Lili ; Uros Bizjak
> > > > > ; GCC Patches ;
> > > > > Zhang, Annita ; Xiao, Wei3
> > > > > ; Liu, Hongtao ;
> > > > > Wang, Hongyu ; Castillo, Jason M
> > > > > 
> > > > > Subject: Re: Add TIGERLAKE and COOPERLAKE to GCC
> > > > >
> > > > > On Wed, Aug 14, 2019 at 11:04 AM Jeff Law  wrote:
> > > > > >
> > > > > > On 8/14/19 1:38 AM, Cui, Lili wrote:
> > > > > > > Resend this mail for GCC Patches rejected my message, thanks.
> > > > > > >
> > > > > > > -Original Message-
> > > > > > >
> > > > > > > Hi Uros and all:
> > > > > > >
> > > > > > > This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> > > > > > > TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA
> > > > > MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> > > > > > > COOPERLAKE is based on CASCADELAKE and plus new ISA
> AVX512BF16.
> > > > > > >
> > > > > > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> > > > > > >
> > > > > > > Changelog:
> > > > > > > gcc/
> > > > > > >   * common/config/i386/i386-common.c
> > > > > > >   (processor_names): Add tigerlake and cooperlake.
> > > > > > >   (processor_alias_table): Add tigerlake and cooperlake.
> > > > > > >   * config.gcc: Add -march=tigerlake and cooperlake.
> > > > > > >   * config/i386/driver-i386.c
> > > > > > >(host_detect_local_cpu): Detect tigerlake and cooperlake.
> > > > > > >   * config/i386/i386-builtins.c
> > > > > > >   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and
> > > > > M_INTEL_COREI7_COOPERLAKE.
> > > > > > >   (arch_names_table): Add tigerlake and cooperlake.
> > > > > > >   (get_builtin_code_for_version) : Handle
> > > > > > > PROCESSOR_TIGERLAKE and
> > > > > PROCESSOR_COOPERLAKE.
> > > > > > >   * config/i386/i386-c.c
> > > > > > >   (ix86_target_macros_internal): Handle tigerlake and
> cooperlake.
> > > > > > >   (ix86_target_macros_internal): Handle
> > > > > OPTION_MASK_ISA_AVX512VP2INTERSECT.
> > > > > > >   * config/i386/i386-options.c
> > > > > > >   (m_TIGERLAKE)  : Define.
> > > > > > >   (m_COOPERLAKE) : Ditto.
> > > > > > >   (m_CORE_AVX512): Ditto.
> > > > > > >   (processor_cost_table): Add cascadelake.
> > > > > > >   (ix86_target_string)  : Handle -mavx512vp2intersect.
> > > > > > >   (ix86_valid_target_attribute_inner_p) : Handle
> avx512vp2intersect.
> > > > > > >   (ix86_option_override_internal): Hadle PTA_SHSTK,
> PTA_MOVDIRI,
> > > > > > >PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
> > > > > > >   * config/i386/i386.h
> > > > > > >   (ix86_size_cost) : Define TARGET_TIGERLAKE and
> > > > > TARGET_COOPERLAKE.
> > > > > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > > > > PROCESSOR_COOPERLAKE.
> > > > > > >   (PTA_SHSTK) : Define.
> > > > > > >   (PTA_MOVDIRI): Ditto.
> > > > > > >   (PTA_MOVDIR64B): Ditto.
> > > > > > >   (PTA_COOPERLAKE) : Ditto.
> > > > > >

Re: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-16 Thread Uros Bizjak
On Fri, Aug 16, 2019 at 5:01 PM H.J. Lu  wrote:
>
> On Fri, Aug 16, 2019 at 5:53 AM Uros Bizjak  wrote:
> >
> > On Fri, Aug 16, 2019 at 6:10 AM Cui, Lili  wrote:
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: H.J. Lu [mailto:hjl.to...@gmail.com]
> > > > Sent: Friday, August 16, 2019 6:02 AM
> > > > To: Jeff Law 
> > > > Cc: Cui, Lili ; Uros Bizjak ; GCC
> > > > Patches ; Zhang, Annita
> > > > ; Xiao, Wei3 ; Liu, Hongtao
> > > > ; Wang, Hongyu ;
> > > > Castillo, Jason M 
> > > > Subject: Re: Add TIGERLAKE and COOPERLAKE to GCC
> > > >
> > > > On Wed, Aug 14, 2019 at 11:04 AM Jeff Law  wrote:
> > > > >
> > > > > On 8/14/19 1:38 AM, Cui, Lili wrote:
> > > > > > Resend this mail for GCC Patches rejected my message, thanks.
> > > > > >
> > > > > > -Original Message-
> > > > > >
> > > > > > Hi Uros and all:
> > > > > >
> > > > > > This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> > > > > > TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA
> > > > MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> > > > > > COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
> > > > > >
> > > > > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> > > > > >
> > > > > > Changelog:
> > > > > > gcc/
> > > > > >   * common/config/i386/i386-common.c
> > > > > >   (processor_names): Add tigerlake and cooperlake.
> > > > > >   (processor_alias_table): Add tigerlake and cooperlake.
> > > > > >   * config.gcc: Add -march=tigerlake and cooperlake.
> > > > > >   * config/i386/driver-i386.c
> > > > > >(host_detect_local_cpu): Detect tigerlake and cooperlake.
> > > > > >   * config/i386/i386-builtins.c
> > > > > >   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and
> > > > M_INTEL_COREI7_COOPERLAKE.
> > > > > >   (arch_names_table): Add tigerlake and cooperlake.
> > > > > >   (get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE 
> > > > > > and
> > > > PROCESSOR_COOPERLAKE.
> > > > > >   * config/i386/i386-c.c
> > > > > >   (ix86_target_macros_internal): Handle tigerlake and 
> > > > > > cooperlake.
> > > > > >   (ix86_target_macros_internal): Handle
> > > > OPTION_MASK_ISA_AVX512VP2INTERSECT.
> > > > > >   * config/i386/i386-options.c
> > > > > >   (m_TIGERLAKE)  : Define.
> > > > > >   (m_COOPERLAKE) : Ditto.
> > > > > >   (m_CORE_AVX512): Ditto.
> > > > > >   (processor_cost_table): Add cascadelake.
> > > > > >   (ix86_target_string)  : Handle -mavx512vp2intersect.
> > > > > >   (ix86_valid_target_attribute_inner_p) : Handle 
> > > > > > avx512vp2intersect.
> > > > > >   (ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
> > > > > >PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
> > > > > >   * config/i386/i386.h
> > > > > >   (ix86_size_cost) : Define TARGET_TIGERLAKE and
> > > > TARGET_COOPERLAKE.
> > > > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > > > PROCESSOR_COOPERLAKE.
> > > > > >   (PTA_SHSTK) : Define.
> > > > > >   (PTA_MOVDIRI): Ditto.
> > > > > >   (PTA_MOVDIR64B): Ditto.
> > > > > >   (PTA_COOPERLAKE) : Ditto.
> > > > > >   (PTA_TIGERLAKE)  : Ditto.
> > > > > >   (TARGET_AVX512VP2INTERSECT) : Ditto.
> > > > > >   (TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
> > > > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > > > PROCESSOR_COOPERLAKE.
> > > > > >   * doc/extend.texi: Add tigerlake and cooperlake.
> > > > > >
> > > > > > gcc/testsuite/
> > > > > >   * gcc.target/i386/funcspec-56.inc: Handle new march.
> > > > > >   * g++.target/i386/mv16.C: Handle new march
> > > > > >
> > > > &g

Re: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-16 Thread H.J. Lu
On Fri, Aug 16, 2019 at 5:53 AM Uros Bizjak  wrote:
>
> On Fri, Aug 16, 2019 at 6:10 AM Cui, Lili  wrote:
> >
> >
> >
> > > -Original Message-
> > > From: H.J. Lu [mailto:hjl.to...@gmail.com]
> > > Sent: Friday, August 16, 2019 6:02 AM
> > > To: Jeff Law 
> > > Cc: Cui, Lili ; Uros Bizjak ; GCC
> > > Patches ; Zhang, Annita
> > > ; Xiao, Wei3 ; Liu, Hongtao
> > > ; Wang, Hongyu ;
> > > Castillo, Jason M 
> > > Subject: Re: Add TIGERLAKE and COOPERLAKE to GCC
> > >
> > > On Wed, Aug 14, 2019 at 11:04 AM Jeff Law  wrote:
> > > >
> > > > On 8/14/19 1:38 AM, Cui, Lili wrote:
> > > > > Resend this mail for GCC Patches rejected my message, thanks.
> > > > >
> > > > > -Original Message-
> > > > >
> > > > > Hi Uros and all:
> > > > >
> > > > > This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> > > > > TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA
> > > MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> > > > > COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
> > > > >
> > > > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> > > > >
> > > > > Changelog:
> > > > > gcc/
> > > > >   * common/config/i386/i386-common.c
> > > > >   (processor_names): Add tigerlake and cooperlake.
> > > > >   (processor_alias_table): Add tigerlake and cooperlake.
> > > > >   * config.gcc: Add -march=tigerlake and cooperlake.
> > > > >   * config/i386/driver-i386.c
> > > > >(host_detect_local_cpu): Detect tigerlake and cooperlake.
> > > > >   * config/i386/i386-builtins.c
> > > > >   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and
> > > M_INTEL_COREI7_COOPERLAKE.
> > > > >   (arch_names_table): Add tigerlake and cooperlake.
> > > > >   (get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE and
> > > PROCESSOR_COOPERLAKE.
> > > > >   * config/i386/i386-c.c
> > > > >   (ix86_target_macros_internal): Handle tigerlake and cooperlake.
> > > > >   (ix86_target_macros_internal): Handle
> > > OPTION_MASK_ISA_AVX512VP2INTERSECT.
> > > > >   * config/i386/i386-options.c
> > > > >   (m_TIGERLAKE)  : Define.
> > > > >   (m_COOPERLAKE) : Ditto.
> > > > >   (m_CORE_AVX512): Ditto.
> > > > >   (processor_cost_table): Add cascadelake.
> > > > >   (ix86_target_string)  : Handle -mavx512vp2intersect.
> > > > >   (ix86_valid_target_attribute_inner_p) : Handle 
> > > > > avx512vp2intersect.
> > > > >   (ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
> > > > >PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
> > > > >   * config/i386/i386.h
> > > > >   (ix86_size_cost) : Define TARGET_TIGERLAKE and
> > > TARGET_COOPERLAKE.
> > > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > > PROCESSOR_COOPERLAKE.
> > > > >   (PTA_SHSTK) : Define.
> > > > >   (PTA_MOVDIRI): Ditto.
> > > > >   (PTA_MOVDIR64B): Ditto.
> > > > >   (PTA_COOPERLAKE) : Ditto.
> > > > >   (PTA_TIGERLAKE)  : Ditto.
> > > > >   (TARGET_AVX512VP2INTERSECT) : Ditto.
> > > > >   (TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
> > > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > > PROCESSOR_COOPERLAKE.
> > > > >   * doc/extend.texi: Add tigerlake and cooperlake.
> > > > >
> > > > > gcc/testsuite/
> > > > >   * gcc.target/i386/funcspec-56.inc: Handle new march.
> > > > >   * g++.target/i386/mv16.C: Handle new march
> > > > >
> > > > > libgcc/
> > > > >   * config/i386/cpuinfo.h: Add INTEL_COREI7_TIGERLAKE and
> > > INTEL_COREI7_COOPERLAKE.
> > > > >
> > > > ENOPATCH
> > > >
> > > > Note that HJ's reworking of the cost tables may require this patch to
> > > > change for the trunk.
> > > >
> > >
> > > Yes, I have checked in my patch.  Please rebase.
> >
> > Done, there is no conflict , thanks.
>
> @@ -86

Re: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-16 Thread Uros Bizjak
On Fri, Aug 16, 2019 at 6:10 AM Cui, Lili  wrote:
>
>
>
> > -Original Message-
> > From: H.J. Lu [mailto:hjl.to...@gmail.com]
> > Sent: Friday, August 16, 2019 6:02 AM
> > To: Jeff Law 
> > Cc: Cui, Lili ; Uros Bizjak ; GCC
> > Patches ; Zhang, Annita
> > ; Xiao, Wei3 ; Liu, Hongtao
> > ; Wang, Hongyu ;
> > Castillo, Jason M 
> > Subject: Re: Add TIGERLAKE and COOPERLAKE to GCC
> >
> > On Wed, Aug 14, 2019 at 11:04 AM Jeff Law  wrote:
> > >
> > > On 8/14/19 1:38 AM, Cui, Lili wrote:
> > > > Resend this mail for GCC Patches rejected my message, thanks.
> > > >
> > > > -Original Message-
> > > >
> > > > Hi Uros and all:
> > > >
> > > > This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> > > > TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA
> > MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> > > > COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
> > > >
> > > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> > > >
> > > > Changelog:
> > > > gcc/
> > > >   * common/config/i386/i386-common.c
> > > >   (processor_names): Add tigerlake and cooperlake.
> > > >   (processor_alias_table): Add tigerlake and cooperlake.
> > > >   * config.gcc: Add -march=tigerlake and cooperlake.
> > > >   * config/i386/driver-i386.c
> > > >(host_detect_local_cpu): Detect tigerlake and cooperlake.
> > > >   * config/i386/i386-builtins.c
> > > >   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and
> > M_INTEL_COREI7_COOPERLAKE.
> > > >   (arch_names_table): Add tigerlake and cooperlake.
> > > >   (get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE and
> > PROCESSOR_COOPERLAKE.
> > > >   * config/i386/i386-c.c
> > > >   (ix86_target_macros_internal): Handle tigerlake and cooperlake.
> > > >   (ix86_target_macros_internal): Handle
> > OPTION_MASK_ISA_AVX512VP2INTERSECT.
> > > >   * config/i386/i386-options.c
> > > >   (m_TIGERLAKE)  : Define.
> > > >   (m_COOPERLAKE) : Ditto.
> > > >   (m_CORE_AVX512): Ditto.
> > > >   (processor_cost_table): Add cascadelake.
> > > >   (ix86_target_string)  : Handle -mavx512vp2intersect.
> > > >   (ix86_valid_target_attribute_inner_p) : Handle avx512vp2intersect.
> > > >   (ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
> > > >PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
> > > >   * config/i386/i386.h
> > > >   (ix86_size_cost) : Define TARGET_TIGERLAKE and
> > TARGET_COOPERLAKE.
> > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > PROCESSOR_COOPERLAKE.
> > > >   (PTA_SHSTK) : Define.
> > > >   (PTA_MOVDIRI): Ditto.
> > > >   (PTA_MOVDIR64B): Ditto.
> > > >   (PTA_COOPERLAKE) : Ditto.
> > > >   (PTA_TIGERLAKE)  : Ditto.
> > > >   (TARGET_AVX512VP2INTERSECT) : Ditto.
> > > >   (TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
> > > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> > PROCESSOR_COOPERLAKE.
> > > >   * doc/extend.texi: Add tigerlake and cooperlake.
> > > >
> > > > gcc/testsuite/
> > > >   * gcc.target/i386/funcspec-56.inc: Handle new march.
> > > >   * g++.target/i386/mv16.C: Handle new march
> > > >
> > > > libgcc/
> > > >   * config/i386/cpuinfo.h: Add INTEL_COREI7_TIGERLAKE and
> > INTEL_COREI7_COOPERLAKE.
> > > >
> > > ENOPATCH
> > >
> > > Note that HJ's reworking of the cost tables may require this patch to
> > > change for the trunk.
> > >
> >
> > Yes, I have checked in my patch.  Please rebase.
>
> Done, there is no conflict , thanks.

@@ -863,36 +863,45 @@ const char *host_detect_local_cpu (int argc,
const char **argv)
   if (arch)
 {
   /* This is unknown family 0x6 CPU.  */
-  /* Assume Ice Lake Server.  */
-  if (has_wbnoinvd)
- cpu = "icelake-server";
-  /* Assume Ice Lake.  */
-  else if (has_gfni)
- cpu = "icelake-client";
-  /* Assume Cannon Lake.  */
-  else if (has_avx512vbmi)
- cpu = "cannonlake";
-  /* Assume Knights Mill.  */
-  else if (has_avx5124vnniw)
- cpu = "knm";
-  /* Assum

RE: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-15 Thread Cui, Lili


> -Original Message-
> From: H.J. Lu [mailto:hjl.to...@gmail.com]
> Sent: Friday, August 16, 2019 6:02 AM
> To: Jeff Law 
> Cc: Cui, Lili ; Uros Bizjak ; GCC
> Patches ; Zhang, Annita
> ; Xiao, Wei3 ; Liu, Hongtao
> ; Wang, Hongyu ;
> Castillo, Jason M 
> Subject: Re: Add TIGERLAKE and COOPERLAKE to GCC
> 
> On Wed, Aug 14, 2019 at 11:04 AM Jeff Law  wrote:
> >
> > On 8/14/19 1:38 AM, Cui, Lili wrote:
> > > Resend this mail for GCC Patches rejected my message, thanks.
> > >
> > > -Original Message-
> > >
> > > Hi Uros and all:
> > >
> > > This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> > > TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA
> MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> > > COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
> > >
> > > Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> > >
> > > Changelog:
> > > gcc/
> > >   * common/config/i386/i386-common.c
> > >   (processor_names): Add tigerlake and cooperlake.
> > >   (processor_alias_table): Add tigerlake and cooperlake.
> > >   * config.gcc: Add -march=tigerlake and cooperlake.
> > >   * config/i386/driver-i386.c
> > >(host_detect_local_cpu): Detect tigerlake and cooperlake.
> > >   * config/i386/i386-builtins.c
> > >   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and
> M_INTEL_COREI7_COOPERLAKE.
> > >   (arch_names_table): Add tigerlake and cooperlake.
> > >   (get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE and
> PROCESSOR_COOPERLAKE.
> > >   * config/i386/i386-c.c
> > >   (ix86_target_macros_internal): Handle tigerlake and cooperlake.
> > >   (ix86_target_macros_internal): Handle
> OPTION_MASK_ISA_AVX512VP2INTERSECT.
> > >   * config/i386/i386-options.c
> > >   (m_TIGERLAKE)  : Define.
> > >   (m_COOPERLAKE) : Ditto.
> > >   (m_CORE_AVX512): Ditto.
> > >   (processor_cost_table): Add cascadelake.
> > >   (ix86_target_string)  : Handle -mavx512vp2intersect.
> > >   (ix86_valid_target_attribute_inner_p) : Handle avx512vp2intersect.
> > >   (ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
> > >PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
> > >   * config/i386/i386.h
> > >   (ix86_size_cost) : Define TARGET_TIGERLAKE and
> TARGET_COOPERLAKE.
> > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> PROCESSOR_COOPERLAKE.
> > >   (PTA_SHSTK) : Define.
> > >   (PTA_MOVDIRI): Ditto.
> > >   (PTA_MOVDIR64B): Ditto.
> > >   (PTA_COOPERLAKE) : Ditto.
> > >   (PTA_TIGERLAKE)  : Ditto.
> > >   (TARGET_AVX512VP2INTERSECT) : Ditto.
> > >   (TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
> > >   (processor_type) : Add PROCESSOR_TIGERLAKE and
> PROCESSOR_COOPERLAKE.
> > >   * doc/extend.texi: Add tigerlake and cooperlake.
> > >
> > > gcc/testsuite/
> > >   * gcc.target/i386/funcspec-56.inc: Handle new march.
> > >   * g++.target/i386/mv16.C: Handle new march
> > >
> > > libgcc/
> > >   * config/i386/cpuinfo.h: Add INTEL_COREI7_TIGERLAKE and
> INTEL_COREI7_COOPERLAKE.
> > >
> > ENOPATCH
> >
> > Note that HJ's reworking of the cost tables may require this patch to
> > change for the trunk.
> >
> 
> Yes, I have checked in my patch.  Please rebase.

Done, there is no conflict , thanks.


Lili.


0001-add-tigerlake-and-cooperlake-to-gcc.patch
Description: 0001-add-tigerlake-and-cooperlake-to-gcc.patch


Re: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-15 Thread H.J. Lu
On Wed, Aug 14, 2019 at 11:04 AM Jeff Law  wrote:
>
> On 8/14/19 1:38 AM, Cui, Lili wrote:
> > Resend this mail for GCC Patches rejected my message, thanks.
> >
> > -Original Message-
> >
> > Hi Uros and all:
> >
> > This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> > TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA 
> > MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> > COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
> >
> > Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> >
> > Changelog:
> > gcc/
> >   * common/config/i386/i386-common.c
> >   (processor_names): Add tigerlake and cooperlake.
> >   (processor_alias_table): Add tigerlake and cooperlake.
> >   * config.gcc: Add -march=tigerlake and cooperlake.
> >   * config/i386/driver-i386.c
> >(host_detect_local_cpu): Detect tigerlake and cooperlake.
> >   * config/i386/i386-builtins.c
> >   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and 
> > M_INTEL_COREI7_COOPERLAKE.
> >   (arch_names_table): Add tigerlake and cooperlake.
> >   (get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE and 
> > PROCESSOR_COOPERLAKE.
> >   * config/i386/i386-c.c
> >   (ix86_target_macros_internal): Handle tigerlake and cooperlake.
> >   (ix86_target_macros_internal): Handle 
> > OPTION_MASK_ISA_AVX512VP2INTERSECT.
> >   * config/i386/i386-options.c
> >   (m_TIGERLAKE)  : Define.
> >   (m_COOPERLAKE) : Ditto.
> >   (m_CORE_AVX512): Ditto.
> >   (processor_cost_table): Add cascadelake.
> >   (ix86_target_string)  : Handle -mavx512vp2intersect.
> >   (ix86_valid_target_attribute_inner_p) : Handle avx512vp2intersect.
> >   (ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
> >PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
> >   * config/i386/i386.h
> >   (ix86_size_cost) : Define TARGET_TIGERLAKE and TARGET_COOPERLAKE.
> >   (processor_type) : Add PROCESSOR_TIGERLAKE and PROCESSOR_COOPERLAKE.
> >   (PTA_SHSTK) : Define.
> >   (PTA_MOVDIRI): Ditto.
> >   (PTA_MOVDIR64B): Ditto.
> >   (PTA_COOPERLAKE) : Ditto.
> >   (PTA_TIGERLAKE)  : Ditto.
> >   (TARGET_AVX512VP2INTERSECT) : Ditto.
> >   (TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
> >   (processor_type) : Add PROCESSOR_TIGERLAKE and PROCESSOR_COOPERLAKE.
> >   * doc/extend.texi: Add tigerlake and cooperlake.
> >
> > gcc/testsuite/
> >   * gcc.target/i386/funcspec-56.inc: Handle new march.
> >   * g++.target/i386/mv16.C: Handle new march
> >
> > libgcc/
> >   * config/i386/cpuinfo.h: Add INTEL_COREI7_TIGERLAKE and 
> > INTEL_COREI7_COOPERLAKE.
> >
> ENOPATCH
>
> Note that HJ's reworking of the cost tables may require this patch to
> change for the trunk.
>

Yes, I have checked in my patch.  Please rebase.

Thanks.

-- 
H.J.


Re: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-14 Thread Jeff Law
On 8/14/19 1:38 AM, Cui, Lili wrote:
> Resend this mail for GCC Patches rejected my message, thanks.
> 
> -Original Message-
> 
> Hi Uros and all:
> 
> This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
> TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA 
> MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
> COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
>  
> Bootstrap is ok, and no regressions for i386/x86-64 testsuite.
> 
> Changelog:
> gcc/
>   * common/config/i386/i386-common.c
>   (processor_names): Add tigerlake and cooperlake.
>   (processor_alias_table): Add tigerlake and cooperlake.
>   * config.gcc: Add -march=tigerlake and cooperlake.
>   * config/i386/driver-i386.c
>(host_detect_local_cpu): Detect tigerlake and cooperlake.
>   * config/i386/i386-builtins.c
>   (processor_model) : Add M_INTEL_COREI7_TIGERLAKE and 
> M_INTEL_COREI7_COOPERLAKE.
>   (arch_names_table): Add tigerlake and cooperlake.
>   (get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE and 
> PROCESSOR_COOPERLAKE.
>   * config/i386/i386-c.c
>   (ix86_target_macros_internal): Handle tigerlake and cooperlake.
>   (ix86_target_macros_internal): Handle 
> OPTION_MASK_ISA_AVX512VP2INTERSECT.
>   * config/i386/i386-options.c
>   (m_TIGERLAKE)  : Define.
>   (m_COOPERLAKE) : Ditto.
>   (m_CORE_AVX512): Ditto.
>   (processor_cost_table): Add cascadelake.
>   (ix86_target_string)  : Handle -mavx512vp2intersect.
>   (ix86_valid_target_attribute_inner_p) : Handle avx512vp2intersect.
>   (ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
>PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
>   * config/i386/i386.h
>   (ix86_size_cost) : Define TARGET_TIGERLAKE and TARGET_COOPERLAKE.
>   (processor_type) : Add PROCESSOR_TIGERLAKE and PROCESSOR_COOPERLAKE.
>   (PTA_SHSTK) : Define.
>   (PTA_MOVDIRI): Ditto.
>   (PTA_MOVDIR64B): Ditto.
>   (PTA_COOPERLAKE) : Ditto.
>   (PTA_TIGERLAKE)  : Ditto.
>   (TARGET_AVX512VP2INTERSECT) : Ditto.
>   (TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
>   (processor_type) : Add PROCESSOR_TIGERLAKE and PROCESSOR_COOPERLAKE.
>   * doc/extend.texi: Add tigerlake and cooperlake.
> 
> gcc/testsuite/
>   * gcc.target/i386/funcspec-56.inc: Handle new march.
>   * g++.target/i386/mv16.C: Handle new march
> 
> libgcc/
>   * config/i386/cpuinfo.h: Add INTEL_COREI7_TIGERLAKE and 
> INTEL_COREI7_COOPERLAKE.
> 
ENOPATCH

Note that HJ's reworking of the cost tables may require this patch to
change for the trunk.

Jeff


RE: Add TIGERLAKE and COOPERLAKE to GCC

2019-08-14 Thread Cui, Lili
Resend this mail for GCC Patches rejected my message, thanks.

-Original Message-

Hi Uros and all:

This patch is about to add TIGERLAKE and COOPERLAKE to GCC.
TIGERLAKE is based on ICELAKE_CLIENT and plus new ISA 
MOVEDIRI/MOVDIR64B/AVX512VP2INTERSECT.
COOPERLAKE is based on CASCADELAKE and plus new ISA AVX512BF16.
 
Bootstrap is ok, and no regressions for i386/x86-64 testsuite.

Changelog:
gcc/
* common/config/i386/i386-common.c
(processor_names): Add tigerlake and cooperlake.
(processor_alias_table): Add tigerlake and cooperlake.
* config.gcc: Add -march=tigerlake and cooperlake.
* config/i386/driver-i386.c
 (host_detect_local_cpu): Detect tigerlake and cooperlake.
* config/i386/i386-builtins.c
(processor_model) : Add M_INTEL_COREI7_TIGERLAKE and 
M_INTEL_COREI7_COOPERLAKE.
(arch_names_table): Add tigerlake and cooperlake.
(get_builtin_code_for_version) : Handle PROCESSOR_TIGERLAKE and 
PROCESSOR_COOPERLAKE.
* config/i386/i386-c.c
(ix86_target_macros_internal): Handle tigerlake and cooperlake.
(ix86_target_macros_internal): Handle 
OPTION_MASK_ISA_AVX512VP2INTERSECT.
* config/i386/i386-options.c
(m_TIGERLAKE)  : Define.
(m_COOPERLAKE) : Ditto.
(m_CORE_AVX512): Ditto.
(processor_cost_table): Add cascadelake.
(ix86_target_string)  : Handle -mavx512vp2intersect.
(ix86_valid_target_attribute_inner_p) : Handle avx512vp2intersect.
(ix86_option_override_internal): Hadle PTA_SHSTK, PTA_MOVDIRI,
 PTA_MOVDIR64B, PTA_AVX512VP2INTERSECT.
* config/i386/i386.h
(ix86_size_cost) : Define TARGET_TIGERLAKE and TARGET_COOPERLAKE.
(processor_type) : Add PROCESSOR_TIGERLAKE and PROCESSOR_COOPERLAKE.
(PTA_SHSTK) : Define.
(PTA_MOVDIRI): Ditto.
(PTA_MOVDIR64B): Ditto.
(PTA_COOPERLAKE) : Ditto.
(PTA_TIGERLAKE)  : Ditto.
(TARGET_AVX512VP2INTERSECT) : Ditto.
(TARGET_AVX512VP2INTERSECT_P(x)) : Ditto.
(processor_type) : Add PROCESSOR_TIGERLAKE and PROCESSOR_COOPERLAKE.
* doc/extend.texi: Add tigerlake and cooperlake.

gcc/testsuite/
* gcc.target/i386/funcspec-56.inc: Handle new march.
* g++.target/i386/mv16.C: Handle new march

libgcc/
* config/i386/cpuinfo.h: Add INTEL_COREI7_TIGERLAKE and 
INTEL_COREI7_COOPERLAKE.