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.
This commit is contained in:
liuhongt 2021-09-02 12:49:46 +08:00
parent 9f7c2bad52
commit de6795bbf5
4 changed files with 23 additions and 3 deletions

View File

@ -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"}" ::)

View File

@ -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"}" ::)

View File

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

View File

@ -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);
}