Skip to content

Commit 666b752

Browse files
committed
clang >= 18 requires evex512 to use AVX512
1 parent ed43018 commit 666b752

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/aegis128x4/aegis128x4_avx512.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
# ifdef HAVE_VAESINTRIN_H
1414

1515
# ifdef __clang__
16-
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
17-
apply_to = function)
16+
# if __clang_major__ >= 18
17+
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
18+
apply_to = function)
19+
# else
20+
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
21+
apply_to = function)
22+
# endif
1823
# elif defined(__GNUC__)
1924
# pragma GCC target("vaes,avx512f")
2025
# endif

src/aegis256x4/aegis256x4_avx512.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
# ifdef HAVE_VAESINTRIN_H
1414

1515
# ifdef __clang__
16-
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
16+
# if __clang_major__ >= 18
17+
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
1718
apply_to = function)
19+
# else
20+
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
21+
apply_to = function)
22+
# endif
1823
# elif defined(__GNUC__)
1924
# pragma GCC target("vaes,avx512f")
2025
# endif

0 commit comments

Comments
 (0)