This should fix incorrect error when call those builtin with
-mavxneconvert and w/o -mavx512bf16 -mavx512vl.
gcc/ChangeLog:
* config/i386/i386-builtins.cc (def_builtin): Handle "shared"
avx512bf16vl-avxneconvert builtins.
gcc/testsuite/ChangeLog:
* gcc.target/i386/avxneconvert-1.c: New test.
avx512vl exist. */
|| (mask2 == OPTION_MASK_ISA2_AVXVNNI)
|| (mask2 == OPTION_MASK_ISA2_AVXIFMA)
+ || (mask2 == (OPTION_MASK_ISA2_AVXNECONVERT
+ | OPTION_MASK_ISA2_AVX512BF16))
|| (lang_hooks.builtin_function
== lang_hooks.builtin_function_ext_scope))
{
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavxneconvert -O2" } */
+
+typedef float v8sf __attribute__((vector_size(32)));
+typedef __bf16 v8bf __attribute__((vector_size(16)));
+
+v8bf
+foo (v8sf a)
+{
+ return __builtin_ia32_cvtneps2bf16_v8sf (a);
+}