From: Nathan Moinvaziri Date: Thu, 25 Jan 2024 21:43:33 +0000 (-0800) Subject: Add VPCLMULQDQ crc32 tests to Google benchmarks X-Git-Tag: 2.2.0~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59745cdb03f43c799bd9b8c7904c544202521a78;p=thirdparty%2Fzlib-ng.git Add VPCLMULQDQ crc32 tests to Google benchmarks --- diff --git a/test/benchmarks/benchmark_crc32.cc b/test/benchmarks/benchmark_crc32.cc index 02a9f28e..f73c308d 100644 --- a/test/benchmarks/benchmark_crc32.cc +++ b/test/benchmarks/benchmark_crc32.cc @@ -59,11 +59,18 @@ BENCHMARK_CRC32(braid, PREFIX(crc32_braid), 1); #ifdef ARM_ACLE BENCHMARK_CRC32(acle, crc32_acle, test_cpu_features.arm.has_crc32); -#elif defined(POWER8_VSX_CRC32) +#endif +#ifdef POWER8_VSX_CRC32 BENCHMARK_CRC32(power8, crc32_power8, test_cpu_features.power.has_arch_2_07); -#elif defined(S390_CRC32_VX) +#endif +#ifdef S390_CRC32_VX BENCHMARK_CRC32(vx, crc32_s390_vx, test_cpu_features.s390.has_vx); -#elif defined(X86_PCLMULQDQ_CRC) +#endif +#ifdef X86_PCLMULQDQ_CRC /* CRC32 fold does a memory copy while hashing */ BENCHMARK_CRC32(pclmulqdq, crc32_pclmulqdq, test_cpu_features.x86.has_pclmulqdq); #endif +#ifdef X86_VPCLMULQDQ_CRC +/* CRC32 fold does a memory copy while hashing */ +BENCHMARK_CRC32(vpclmulqdq, crc32_vpclmulqdq, (test_cpu_features.x86.has_pclmulqdq && test_cpu_features.x86.has_avx512 && test_cpu_features.x86.has_vpclmulqdq)); +#endif