https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109504
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, until then we could perhaps do something like:
--- gcc/config/i386/avx512fp16intrin.h.jj 2023-01-16 11:52:15.946736083
+0100
+++ gcc/config/i386/avx512fp16intrin.h 2023-04-14 10:13:30.054297659 +0200
@@ -28,6 +28,8 @@
#ifndef __AVX512FP16INTRIN_H_INCLUDED
#define __AVX512FP16INTRIN_H_INCLUDED
+#ifdef __FLT16_DIG__
+
#ifndef __AVX512FP16__
#pragma GCC push_options
#pragma GCC target("avx512fp16")
@@ -7216,4 +7218,6 @@ _mm512_set1_pch (_Float16 _Complex __A)
#pragma GCC pop_options
#endif /* __DISABLE_AVX512FP16__ */
+#endif
+
#endif /* __AVX512FP16INTRIN_H_INCLUDED */
--- gcc/config/i386/avx512fp16vlintrin.h.jj 2023-01-16 11:52:15.946736083
+0100
+++ gcc/config/i386/avx512fp16vlintrin.h 2023-04-14 10:13:54.152946427
+0200
@@ -28,6 +28,8 @@
#ifndef __AVX512FP16VLINTRIN_H_INCLUDED
#define __AVX512FP16VLINTRIN_H_INCLUDED
+#ifdef __FLT16_DIG__
+
#if !defined(__AVX512VL__) || !defined(__AVX512FP16__)
#pragma GCC push_options
#pragma GCC target("avx512fp16,avx512vl")
@@ -3359,4 +3361,6 @@ _mm_set1_pch (_Float16 _Complex __A)
#pragma GCC pop_options
#endif /* __DISABLE_AVX512FP16VL__ */
+#endif
+
#endif /* __AVX512FP16VLINTRIN_H_INCLUDED */
--- gcc/config/i386/avxneconvertintrin.h.jj 2023-01-16 11:52:15.949736039
+0100
+++ gcc/config/i386/avxneconvertintrin.h 2023-04-14 10:14:51.280113813
+0200
@@ -48,6 +48,7 @@ _mm256_bcstnebf16_ps (const void *__P)
return (__m256) __builtin_ia32_vbcstnebf162ps256 ((const __bf16 *) __P);
}
+#ifdef __FLT16_DIG__
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_bcstnesh_ps (const void *__P)
@@ -61,6 +62,7 @@ _mm256_bcstnesh_ps (const void *__P)
{
return (__m256) __builtin_ia32_vbcstnesh2ps256 ((const _Float16 *) __P);
}
+#endif
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
i.e. if _Float16 type isn't usable, just hide all the _Float16 related stuff
from the headers.
But don't we need the same thing for __bf16 too? There I'm afraid aren't
macros for that.