]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Add VPCLMULQDQ crc32 tests to Google benchmarks
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 25 Jan 2024 21:43:33 +0000 (13:43 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 27 Jan 2024 23:27:43 +0000 (00:27 +0100)
test/benchmarks/benchmark_crc32.cc

index 02a9f28eef676af17dc35a70de869b9d73614685..f73c308d8fc2c1217bf8d1e802a52d2054e6d699 100644 (file)
@@ -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