On Fri, Oct 2, 2015 at 5:25 PM, Kirill Yukhin <kirill.yuk...@gmail.com> wrote: > Hello, > Patch in the bottom adds missing AVX-512VBMI,IFMA > features to libgcc/config/i386/cpuinfo.c and, built-in expansion > and test. > > Comitted to main trunk as obvious.
The test now execute FAILs for me: FAIL: gcc.target/i386/builtin_target.c execution test I have family 6, model 94 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap > gcc/ > * config/i386/i386.c (processor_features): Add F_AVX512VBMI, > F_AVX512IFMA. > (isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA. > libgcc/ > * config/i386/cpuinfo.c (processor_features): Add > FEATURE_AVX512VBMI and FEATURE_AVX512VBMI. > testsuite/ > * gcc.target/i386/builtin_target.c: Handle "avx512ifma" > and "avx512vbmi". > > -- > Thanks, K > > commit 39d9d882ed654e8b40095a24cb05baf661b81f3f > Author: Kirill Yukhin <kirill.yuk...@intel.com> > Date: Fri Oct 2 18:08:33 2015 +0300 > > AVX-512. Add missing features to cpuinfo.c > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index 1ccc33e..1719175 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -36591,6 +36591,8 @@ fold_builtin_cpu (tree fndecl, tree *args) > F_AVX512CD, > F_AVX512ER, > F_AVX512PF, > + F_AVX512VBMI, > + F_AVX512IFMA, > F_MAX > }; > > @@ -36699,6 +36701,8 @@ fold_builtin_cpu (tree fndecl, tree *args) > {"avx512cd",F_AVX512CD}, > {"avx512er",F_AVX512ER}, > {"avx512pf",F_AVX512PF}, > + {"avx512vbmi",F_AVX512VBMI}, > + {"avx512ifma",F_AVX512IFMA}, > }; > > tree __processor_model_type = build_processor_model_struct (); > diff --git a/gcc/testsuite/gcc.target/i386/builtin_target.c > b/gcc/testsuite/gcc.target/i386/builtin_target.c > index aff4559..a9a8753 100644 > --- a/gcc/testsuite/gcc.target/i386/builtin_target.c > +++ b/gcc/testsuite/gcc.target/i386/builtin_target.c > @@ -200,6 +200,10 @@ check_features (unsigned int ecx, unsigned int edx, > assert (__builtin_cpu_supports ("avx512bw")); > if (ebx & bit_AVX512DQ) > assert (__builtin_cpu_supports ("avx512dq")); > + if (ebx & bit_AVX512IFMA) > + assert (__builtin_cpu_supports ("avx512ifma")); > + if (ebx & bit_AVX512VBMI) > + assert (__builtin_cpu_supports ("avx512vbmi")); > } > } > > diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c > index ddb49e3..40ed84c 100644 > --- a/libgcc/config/i386/cpuinfo.c > +++ b/libgcc/config/i386/cpuinfo.c > @@ -110,7 +110,9 @@ enum processor_features > FEATURE_AVX512DQ, > FEATURE_AVX512CD, > FEATURE_AVX512ER, > - FEATURE_AVX512PF > + FEATURE_AVX512PF, > + FEATURE_AVX512VBMI, > + FEATURE_AVX512IFMA > }; > > struct __processor_model > @@ -336,6 +338,10 @@ get_available_features (unsigned int ecx, unsigned int > edx, > features |= (1 << FEATURE_AVX512PF); > if (ebx & bit_AVX512ER) > features |= (1 << FEATURE_AVX512ER); > + if (ebx & bit_AVX512IFMA) > + features |= (1 << FEATURE_AVX512IFMA); > + if (ecx & bit_AVX512VBMI) > + features |= (1 << FEATURE_AVX512VBMI); > } > > unsigned int ext_level;