public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: hongtao Liu <liuhongt@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8953] Remove macro check for __AMX_BF16/INT8/TILE__ in header file. Date: Fri, 3 Sep 2021 05:06:03 +0000 (GMT) [thread overview] Message-ID: <20210903050603.8E24C3850439@sourceware.org> (raw) https://gcc.gnu.org/g:259945a0a4880b66f93f71eebe70f78c91e02d5e commit r11-8953-g259945a0a4880b66f93f71eebe70f78c91e02d5e Author: liuhongt <hongtao.liu@intel.com> Date: Thu Sep 2 12:49:46 2021 +0800 Remove macro check for __AMX_BF16/INT8/TILE__ in header file. gcc/ChangeLog: PR target/102166 * config/i386/amxbf16intrin.h : Remove macro check for __AMX_BF16__. * config/i386/amxint8intrin.h : Remove macro check for __AMX_INT8__. * config/i386/amxtileintrin.h : Remove macro check for __AMX_TILE__. gcc/testsuite/ChangeLog: PR target/102166 * g++.target/i386/pr102166.C: New test. Diff: --- gcc/config/i386/amxbf16intrin.h | 2 +- gcc/config/i386/amxint8intrin.h | 2 +- gcc/config/i386/amxtileintrin.h | 2 +- gcc/testsuite/g++.target/i386/pr102166.C | 20 ++++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/gcc/config/i386/amxbf16intrin.h b/gcc/config/i386/amxbf16intrin.h index 8c24cdd50a0..1d60e8e609f 100644 --- a/gcc/config/i386/amxbf16intrin.h +++ b/gcc/config/i386/amxbf16intrin.h @@ -34,7 +34,7 @@ #define __DISABLE_AMX_BF16__ #endif /* __AMX_BF16__ */ -#if defined(__x86_64__) && defined(__AMX_BF16__) +#if defined(__x86_64__) #define _tile_dpbf16ps_internal(dst,src1,src2) \ __asm__ volatile\ ("{tdpbf16ps\t%%tmm"#src2", %%tmm"#src1", %%tmm"#dst"|tdpbf16ps\t%%tmm"#dst", %%tmm"#src1", %%tmm"#src2"}" ::) diff --git a/gcc/config/i386/amxint8intrin.h b/gcc/config/i386/amxint8intrin.h index 180c2436278..dbb7b6cc5ad 100644 --- a/gcc/config/i386/amxint8intrin.h +++ b/gcc/config/i386/amxint8intrin.h @@ -34,7 +34,7 @@ #define __DISABLE_AMX_INT8__ #endif /* __AMX_INT8__ */ -#if defined(__x86_64__) && defined(__AMX_INT8__) +#if defined(__x86_64__) #define _tile_int8_dp_internal(name,dst,src1,src2) \ __asm__ volatile \ ("{"#name"\t%%tmm"#src2", %%tmm"#src1", %%tmm"#dst"|"#name"\t%%tmm"#dst", %%tmm"#src1", %%tmm"#src2"}" ::) diff --git a/gcc/config/i386/amxtileintrin.h b/gcc/config/i386/amxtileintrin.h index 16c8b6ef681..75d784ad160 100644 --- a/gcc/config/i386/amxtileintrin.h +++ b/gcc/config/i386/amxtileintrin.h @@ -34,7 +34,7 @@ #define __DISABLE_AMX_TILE__ #endif /* __AMX_TILE__ */ -#if defined(__x86_64__) && defined(__AMX_TILE__) +#if defined(__x86_64__) extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _tile_loadconfig (const void *__config) diff --git a/gcc/testsuite/g++.target/i386/pr102166.C b/gcc/testsuite/g++.target/i386/pr102166.C new file mode 100644 index 00000000000..751cd2c6d26 --- /dev/null +++ b/gcc/testsuite/g++.target/i386/pr102166.C @@ -0,0 +1,20 @@ +/* PR target/102166 */ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O2 -std=c++14" } */ + +#include<immintrin.h> +__attribute__((target("amx-tile"))) void amx() +{ + _tile_loadd(0, 0, 0); + _tile_release(); +} + +__attribute__((target("amx-int8"))) void amxint8() +{ + _tile_dpbssd(0, 1, 2); +} + +__attribute__((target("amx-bf16"))) void amxbf16() +{ + _tile_dpbf16ps (0, 1, 2); +}
reply other threads:[~2021-09-03 5:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210903050603.8E24C3850439@sourceware.org \ --to=liuhongt@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).