From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2781 invoked by alias); 6 Oct 2015 07:10:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2765 invoked by uid 89); 6 Oct 2015 07:10:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f173.google.com Received: from mail-qk0-f173.google.com (HELO mail-qk0-f173.google.com) (209.85.220.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 06 Oct 2015 07:10:22 +0000 Received: by qkbi190 with SMTP id i190so60880207qkb.1 for ; Tue, 06 Oct 2015 00:10:20 -0700 (PDT) X-Received: by 10.55.31.232 with SMTP id n101mr29861451qkh.107.1444115420675; Tue, 06 Oct 2015 00:10:20 -0700 (PDT) Received: from msticlxl57.ims.intel.com (jfdmzpr02-ext.jf.intel.com. [134.134.137.71]) by smtp.gmail.com with ESMTPSA id e6sm13243571qga.14.2015.10.06.00.10.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Oct 2015 00:10:19 -0700 (PDT) Date: Tue, 06 Oct 2015 07:10:00 -0000 From: Kirill Yukhin To: Uros Bizjak Cc: Jakub Jelinek , GCC Patches Subject: Re: [PATCH, i386] Introduce switch for Skylake Server CPU. Message-ID: <20151006070951.GC62312@msticlxl57.ims.intel.com> References: <20150921141442.GD49423@msticlxl57.ims.intel.com> <20150921142728.GB1847@tucnak.redhat.com> <20150921165719.GA14053@msticlxl57.ims.intel.com> <20150922093120.GA10287@msticlxl57.ims.intel.com> <20151002161215.GF5228@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00496.txt.bz2 Hello Uroš, I've merged two patches together and rebased it on top of gcc-5-branch. The only change I made compared to trunk version is scheduling set to CPU_NEHALEM since CPU_HASWELL is not supported in gcc-5. Bootstrapped. Is it ok for gcc-5-branch? gcc/ * config.gcc: Support "skylake-avx512". * config/i386/i386-c.c (ix86_target_macros_internal): Handle PROCESSOR_SKYLAKE_AVX512. * config/i386/i386.c (m_SKYLAKE_AVX512): Define. (processor_target_table): Add "skylake-avx512". (PTA_SKYLAKE): Define. (ix86_option_override_internal): Add "skylake-avx512". (fold_builtin_cpu): Handle "skylake-avx512". * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define. (processor_type): Add PROCESSOR_SKYLAKE_AVX512. * doc/invoke.texi (skylake-avx512): New. libgcc/ * libgcc/config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512", AES, PCLMUL, AVX-512VL, AVX-512BW, AVX-512DQ, AVX-512PF, AVX-512ER, AVX-512CD. gcc/testsuite/ * gcc.target/i386/builtin_target.c: Add check for "skylake-avx512", "aes" and "pclmul". * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw, avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512. -- Thanks, K diff --git a/gcc/config.gcc b/gcc/config.gcc index c835734..207fc65 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -589,8 +589,8 @@ pentium4 pentium4m pentiumpro prescott" x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \ bdver3 bdver4 btver1 btver2 k8 k8-sse3 opteron opteron-sse3 nocona \ core2 corei7 corei7-avx core-avx-i core-avx2 atom slm nehalem westmere \ -sandybridge ivybridge haswell broadwell bonnell silvermont knl x86-64 \ -native" +sandybridge ivybridge haswell broadwell bonnell silvermont knl \ +skylake-avx512 x86-64 native" # Additional x86 processors supported by --with-cpu=. Each processor # MUST be separated by exactly one space. diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index f3f90df..4f20e14 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -185,6 +185,10 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag, def_or_undef (parse_in, "__knl"); def_or_undef (parse_in, "__knl__"); break; + case PROCESSOR_SKYLAKE_AVX512: + def_or_undef (parse_in, "__skylake_avx512"); + def_or_undef (parse_in, "__skylake_avx512__"); + break; /* use PROCESSOR_max to not set/unset the arch macro. */ case PROCESSOR_max: break; @@ -294,6 +298,9 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag, case PROCESSOR_KNL: def_or_undef (parse_in, "__tune_knl__"); break; + case PROCESSOR_SKYLAKE_AVX512: + def_or_undef (parse_in, "__tune_skylake_avx512__"); + break; case PROCESSOR_INTEL: case PROCESSOR_GENERIC: break; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9b17256..43e6f91 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2054,6 +2054,7 @@ const struct processor_costs *ix86_cost = &pentium_cost; #define m_BONNELL (1<