public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3323] Remove macro check for __AMX_BF16/INT8/TILE__ in header file.
@ 2021-09-03  5:04 hongtao Liu
  0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2021-09-03  5:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:de6795bbf58c7085933a1f86a88d8193ea72e26b

commit r12-3323-gde6795bbf58c7085933a1f86a88d8193ea72e26b
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);
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-03  5:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03  5:04 [gcc r12-3323] Remove macro check for __AMX_BF16/INT8/TILE__ in header file hongtao Liu

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).