Skip to content

Commit

Permalink
clang >= 18 requires evex512 to use AVX512
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed May 9, 2024
1 parent ed43018 commit 666b752
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/aegis128x4/aegis128x4_avx512.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# ifdef HAVE_VAESINTRIN_H

# ifdef __clang__
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
apply_to = function)
# if __clang_major__ >= 18
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
apply_to = function)
# else
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
apply_to = function)
# endif
# elif defined(__GNUC__)
# pragma GCC target("vaes,avx512f")
# endif
Expand Down
7 changes: 6 additions & 1 deletion src/aegis256x4/aegis256x4_avx512.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
# ifdef HAVE_VAESINTRIN_H

# ifdef __clang__
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
# if __clang_major__ >= 18
# pragma clang attribute push(__attribute__((target("vaes,avx512f,evex512"))), \
apply_to = function)
# else
# pragma clang attribute push(__attribute__((target("vaes,avx512f"))), \
apply_to = function)
# endif
# elif defined(__GNUC__)
# pragma GCC target("vaes,avx512f")
# endif
Expand Down

0 comments on commit 666b752

Please sign in to comment.