From: Uros Bizjak <ubizjak@gmail.com>
To: "Koval, Julia" <julia.koval@intel.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Kirill Yukhin <kirill.yukhin@gmail.com>
Subject: Re: [x86][patch] Add -march=cannonlake.
Date: Wed, 08 Nov 2017 19:51:00 -0000 [thread overview]
Message-ID: <CAFULd4ZjxLNW+jqCDxb8SY-Ap=VgEsLAUCQfqMzCMWwEy5r4dw@mail.gmail.com> (raw)
In-Reply-To: <4E89A029A0F8D443B436A5167BA3C53F42ACC3C3@IRSMSX101.ger.corp.intel.com>
On Wed, Nov 8, 2017 at 9:02 AM, Koval, Julia <julia.koval@intel.com> wrote:
> Attachment got lost.
>
>> -----Original Message-----
>> From: Koval, Julia
>> Sent: Wednesday, November 08, 2017 9:01 AM
>> To: 'GCC Patches' <gcc-patches@gcc.gnu.org>
>> Cc: 'Uros Bizjak' <ubizjak@gmail.com>; 'Kirill Yukhin' <kirill.yukhin@gmail.com>
>> Subject: RE: [x86][patch] Add -march=cannonlake.
>>
>> Hi, this patch adds new option -march=cannonlake. Isasets defined in:
>> https://software.intel.com/sites/default/files/managed/c5/15/architecture-
>> instruction-set-extensions-programming-reference.pdf
>>
>> Ok for trunk?
>>
>> gcc/
>> * config.gcc: Add -march=cannonlake.
>> * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
>> * config/i386/i386-c.c (ix86_target_macros_internal): Handle
>> cannonlake.
>> * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
>> (PTA_CANNONLAKE): New.
>> (processor_target_table): Add cannonlake.
>> (ix86_option_override_internal): Ditto.
>> (fold_builtin_cpu): Ditto.
>> (get_builtin_code_for_version): Handle cannonlake.
>> (M_INTEL_CANNONLAKE): New.
>> * config/i386/i386.h (TARGET_CANNONLAKE,
>> PROCESSOR_CANNONLAKE): New.
>> * doc/invoke.texi: Add -march=cannonlake.
>> gcc/testsuite/
>> * gcc.target/i386/funcspec-56.inc: Handle new march.
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -803,9 +803,11 @@ const char *host_detect_local_cpu (int argc,
const char **argv)
default:
if (arch)
{
+ if (has_avx512vbmi)
+ cpu = "cannonlake";
/* This is unknown family 0x6 CPU. */
/* Assume Knights Landing. */
- if (has_avx512f)
+ else if (has_avx512f)
cpu = "knl";
/* Assume Knights Mill */
else if (has_avx5124vnniw)
You should add correct model numbers under <case
PROCESSOR_PENTIUMPRO>. The above is for the unknown case (which should
not happen), and it should read (note that "knl" is already
misplaced):
default:
/* This is unknown family 0x6 CPU. */
if (arch)
{
/* Assume Cannonlake. */
if (has_avx512vbmi)
cpu = "cannonlake";
/* Assume Knights Mill */
else if (has_avx5124vnniw)
cpu = "knm";
/* Assume Skylake. */
else if (has_clflushopt)
cpu = "skylake";
/* Assume Knights Landing. */
else if (has_avx512f)
cpu = "knl";
/* Assume Broadwell. */
else if (has_adx)
...
@@ -31832,7 +31839,8 @@ fold_builtin_cpu (tree fndecl, tree *args)
M_INTEL_COREI7_HASWELL,
M_INTEL_COREI7_BROADWELL,
M_INTEL_COREI7_SKYLAKE,
- M_INTEL_COREI7_SKYLAKE_AVX512
+ M_INTEL_COREI7_SKYLAKE_AVX512,
+ M_INTEL_CANNONLAKE
};
Please also update libgcc/config/i386/cpuinfo.h, enum processor_features.
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc
b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
index 9ae74cb..ed0748b 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc
+++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
@@ -144,6 +144,7 @@ extern void test_arch_core_avx2 (void)
__attribute__((__target__("arch=core-avx
extern void test_arch_knl (void)
__attribute__((__target__("arch=knl")));
extern void test_arch_knm (void)
__attribute__((__target__("arch=knm")));
extern void test_arch_skylake_avx512 (void)
__attribute__((__target__("arch=skylake-avx512")));
+extern void test_arch_cannonlake (void)
__attribute__((__target__("arch=cannonlake")));
extern void test_arch_k8 (void)
__attribute__((__target__("arch=k8")));
extern void test_arch_k8_sse3 (void)
__attribute__((__target__("arch=k8-sse3")));
extern void test_arch_opteron (void)
__attribute__((__target__("arch=opteron")));
Please also add new architecture to multiversioning testcases, see
gcc/testsuite/g++.dg/ext/mv*.C
Uros.
next prev parent reply other threads:[~2017-11-08 19:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 8:08 Koval, Julia
2017-11-08 19:51 ` Uros Bizjak [this message]
2017-11-11 22:03 ` Koval, Julia
2017-11-12 16:32 ` Uros Bizjak
2017-11-13 10:32 ` Koval, Julia
2017-11-13 11:53 ` Uros Bizjak
-- strict thread matches above, loose matches on Subject: below --
2017-11-08 8:06 Koval, Julia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFULd4ZjxLNW+jqCDxb8SY-Ap=VgEsLAUCQfqMzCMWwEy5r4dw@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=julia.koval@intel.com \
--cc=kirill.yukhin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).