This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch][i386] Goldmont -march/-mtune options
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "Makhotina, Olga" <olga dot makhotina at intel dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Fri, 27 Apr 2018 15:10:01 +0200
- Subject: Re: [patch][i386] Goldmont -march/-mtune options
- References: <DC8A343E1B673F4AA224650A1F844CCD29E2F4@IRSMSX103.ger.corp.intel.com>
On Fri, Apr 27, 2018 at 10:04 AM, Makhotina, Olga
<olga.makhotina@intel.com> wrote:
> Hi,
>
> This patch implements Goldmont -march/-mtune.
>
> 2018-04-27 Olga Makhotina <olga.makhotina@intel.com>
>
> gcc/
>
> * config.gcc: Support "goldmont".
> * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
> * config/i386/i386-c.c (ix86_target_macros_internal): Handle
> PROCESSOR_GOLDMONT.
> * config/i386/i386.c (m_GOLDMONT): Define.
> (processor_target_table): Add "goldmont".
> (PTA_GOLDMONT): Define.
> (ix86_lea_outperforms): Add TARGET_GOLDMONT.
> (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
> (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
> (fold_builtin_cpu): Add "goldmont".
> (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
> (ix86_option_override_internal): Add "goldmont".
> * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
> (processor_type): Add PROCESSOR_GOLDMONT.
> * config/i386/i386.md: Add CPU "glm".
> * config/i386/glm.md: New file.
> * config/i386/x86-tune.def: Add m_GOLDMONT.
> * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
>
> libgcc/
> * config/i386/cpuinfo.h (processor_types): Add INTEL_GOLDMONT.
> * config/i386/cpuinfo.c (get_intel_cpu): Detect Goldmont.
>
> gcc/testsuite/
>
> * gcc.target/i386/builtin_target.c: Test goldmont.
> * gcc.target/i386/funcspec-56.inc: Tests for arch=goldmont and
> arch=silvermont.
>
> Is it OK?
@@ -3484,6 +3486,9 @@ ix86_option_override_internal (bool main_args_p,
| PTA_AVX512F | PTA_AVX512CD;
const wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE;
const wide_int_bitmask PTA_SILVERMONT = PTA_WESTMERE | PTA_MOVBE | PTA_RDRND;
+ const wide_int_bitmask PTA_GOLDMONT = (PTA_SILVERMONT | PTA_SHA | PTA_XSAVE
+ | PTA_RDSEED | PTA_XSAVEC | PTA_XSAVES | PTA_CLFLUSHOPT | PTA_XSAVEOPT
+ | PTA_FSGSBASE);
const wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW
| PTA_AVX5124FMAPS | PTA_AVX512VPOPCNTDQ;
No need for parenthesis in the above code.
I didn't look at glm.md in details but OK for mainline.
Thanks,
Uros.