]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
kru: don't expect obsolete Clang < 12 for optimized implementation
authorDaniel Salzman <daniel.salzman@nic.cz>
Sat, 18 Oct 2025 17:05:02 +0000 (19:05 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Mon, 20 Oct 2025 08:30:41 +0000 (10:30 +0200)
src/knot/modules/rrl/kru-avx2.c

index 7c4128a3557d48c9382e5231feff65ab27d7a0e0..e414cb9e64d599f52ee20941bdfff027a9122f6a 100644 (file)
@@ -3,17 +3,14 @@
  *  For more information, see <https://www.knot-dns.cz/>
  */
 
-// Checked with clang 5 (2017) and gcc 6 (2016).
+// Checked with clang 12 (2021) and gcc 6 (2016).
 // For other cases we'll rather keep just the generic implementation.
-#if defined(__x86_64__) && (__clang_major__ >= 5 || __GNUC__ >= 6) && !defined(__APPLE__)
+#if defined(__x86_64__) && (__clang_major__ >= 12 || __GNUC__ >= 6) && !defined(__APPLE__)
 
 // This file has code for new-ish x86 (2015+ usually, Atom 2021+) - AES + AVX2
-#if __clang_major__ >= 12
+#ifdef __clang__
        #pragma clang attribute push (__attribute__((target("arch=x86-64-v3,aes"))), \
                                                        apply_to = function)
-#elif __clang__
-       #pragma clang attribute push (__attribute__((target("avx2,aes"))), \
-                                                       apply_to = function)
 #else
        #pragma GCC push_options
        #if __GNUC__ >= 11