]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed error with compare256_unaligned_avx2 undefined if unaligned access is disabled.
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 24 Mar 2022 20:01:21 +0000 (13:01 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 27 Mar 2022 17:17:21 +0000 (19:17 +0200)
test/benchmarks/benchmark_compare256.cc
test/test_compare256.cc

index 09a4bbc2a67f6bef6d4a53538f5b3827a0fdc43a..bdfdd6bf975fc1a806d78a4ca324113c98fbb858 100644 (file)
@@ -69,11 +69,10 @@ BENCHMARK_COMPARE256(unaligned_32, compare256_unaligned_32, 1);
 #if defined(UNALIGNED64_OK) && defined(HAVE_BUILTIN_CTZLL)
 BENCHMARK_COMPARE256(unaligned_64, compare256_unaligned_64, 1);
 #endif
-#endif
-
-#ifdef X86_SSE2
+#if defined(X86_SSE2) && defined(HAVE_BUILTIN_CTZ)
 BENCHMARK_COMPARE256(unaligned_sse2, compare256_unaligned_sse2, x86_cpu_has_sse2);
 #endif
 #if defined(X86_AVX2) && defined(HAVE_BUILTIN_CTZ)
 BENCHMARK_COMPARE256(unaligned_avx2, compare256_unaligned_avx2, x86_cpu_has_avx2);
 #endif
+#endif
index 3f0673e2429148a84f37e1b8f8aca665858f18ff..2c2f3aaa87aff55f2fe8672830b066425deebbd1 100644 (file)
@@ -65,11 +65,10 @@ TEST_COMPARE256(unaligned_32, compare256_unaligned_32, 1)
 #if defined(UNALIGNED64_OK) && defined(HAVE_BUILTIN_CTZLL)
 TEST_COMPARE256(unaligned_64, compare256_unaligned_64, 1)
 #endif
-#endif
-
 #if defined(X86_SSE2) && defined(HAVE_BUILTIN_CTZ)
 TEST_COMPARE256(unaligned_sse2, compare256_unaligned_sse2, x86_cpu_has_sse2)
 #endif
 #if defined(X86_AVX2) && defined(HAVE_BUILTIN_CTZ)
 TEST_COMPARE256(unaligned_avx2, compare256_unaligned_avx2, x86_cpu_has_avx2)
 #endif
+#endif