diff options
| author | Samuel Neves <[email protected]> | 2020-04-12 11:36:10 +0100 |
|---|---|---|
| committer | Samuel Neves <[email protected]> | 2020-04-12 11:38:11 +0100 |
| commit | 7ef795d62effe2f59e7aff6d4bbba81e398d23e3 (patch) | |
| tree | 1d7825715f8ef3803ba0af3cf75280d6fb3fe804 /c/blake3_dispatch.c | |
| parent | 370ba3644ae2b38b91e52033fc7e9ae705920495 (diff) | |
Do not require AVX512DQ
Whereas vinserti64x4 is present on AVX512F, vinserti32x8 requires
AVX512DQ, which we do not test for. At this point there is not
much risk of incompatibility, since Skylake-X chips have all the
requires instruction sets, but let's be precise about this.
Diffstat (limited to 'c/blake3_dispatch.c')
| -rw-r--r-- | c/blake3_dispatch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c/blake3_dispatch.c b/c/blake3_dispatch.c index add8bef..6847725 100644 --- a/c/blake3_dispatch.c +++ b/c/blake3_dispatch.c @@ -182,7 +182,7 @@ void blake3_hash_many(const uint8_t *const *inputs, size_t num_inputs, #if defined(IS_X86) const enum cpu_feature features = get_cpu_features(); #if !defined(BLAKE3_NO_AVX512) - if (features & AVX512F) { + if ((features & (AVX512F|AVX512VL)) == (AVX512F|AVX512VL)) { blake3_hash_many_avx512(inputs, num_inputs, blocks, key, counter, increment_counter, flags, flags_start, flags_end, out); @@ -223,7 +223,7 @@ size_t blake3_simd_degree(void) { #if defined(IS_X86) const enum cpu_feature features = get_cpu_features(); #if !defined(BLAKE3_NO_AVX512) - if (features & AVX512F) { + if ((features & (AVX512F|AVX512VL)) == (AVX512F|AVX512VL)) { return 16; } #endif |
