google/cpu_features

remove X86_AVX512_4VBMI2 in favour of X86_AVX512_4FMAPS

ajax16384 opened this issue · 4 comments

avx512_4vbmi2 uses same detection bit as avx512_4fmaps

features->avx512_4vbmi2 = IsBitSet(leaf_7.edx, 3);

features->avx512_4fmaps = IsBitSet(leaf_7.edx, 3);

so X86_AVX512_4VBMI2 is redudant and may be completely removed

@ajax16384, according to architecture-instruction-set-extensions May 2021 319433-044 Page 26 there is mention only about AVX512_4FMAPS. I didnt find any info about AVX512_4VBMI2, so probably we can remove AVX512_4VBMI2, but I'd rather keep it because there is possibility that user will try to find AVX512_4VBMI2 and don't know that AVX512_4VBMI2 has the same value with different alias, thus I think these aliases is needed for better user-experiance.

@gchatelet, @Mizux

I'm usually not fond of duplication but I think it makes sense to keep both - at least for now.
I'll update the header file to point out they are the same.
Thx @ajax16384 for reporting.

edit: actually no I misread avx512_4vbmi2 for avx512_vbmi2.

Actually, according to wikipedia, avx512_vbmi2 is a thing and should be detected through features->avx512_4vbmi2 = IsBitSet(leaf_7.ecx, 6);
If so, then it's a bug in the library.

I've added a comment on db9ad9f.