File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ set(LLVM_BLAKE3_FILES
4
4
blake3_portable.c
5
5
)
6
6
7
- # Temporary disable assembly until rdar://91050484 is investigated.
8
- set (CAN_USE_ASSEMBLER FALSE )
9
-
10
7
# The BLAKE3 team recommends using the assembly versions, from the README:
11
8
#
12
9
# "For each of the x86 SIMD instruction sets, four versions are available:
@@ -21,9 +18,17 @@ if (MSVC)
21
18
else ()
22
19
check_symbol_exists (__x86_64__ "" IS_X64 )
23
20
check_symbol_exists (__aarch64__ "" IS_ARM64 )
21
+
22
+ if (IS_X64 )
23
+ # Clang-6 needs this flag.
24
+ set_source_files_properties (blake3_avx512_x86-64_windows_gnu.S
25
+ PROPERTIES COMPILE_OPTIONS "-mavx512vl" )
26
+ set_source_files_properties (blake3_avx512_x86-64_unix.S
27
+ PROPERTIES COMPILE_OPTIONS "-mavx512vl" )
28
+ endif ()
24
29
endif ()
25
30
26
- if (IS_X64 AND CAN_USE_ASSEMBLER )
31
+ if (IS_X64 )
27
32
if (MSVC )
28
33
enable_language (ASM_MASM )
29
34
list (APPEND LLVM_BLAKE3_FILES
@@ -55,9 +60,5 @@ if (IS_ARM64)
55
60
)
56
61
endif ()
57
62
58
- if (IS_X64 AND NOT CAN_USE_ASSEMBLER )
59
- add_definitions (-DBLAKE3_NO_AVX512 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_SSE2 )
60
- endif ()
61
-
62
63
add_library (LLVMSupportBlake3 OBJECT EXCLUDE_FROM_ALL ${LLVM_BLAKE3_FILES} )
63
64
llvm_update_compile_flags (LLVMSupportBlake3 )
You can’t perform that action at this time.
0 commit comments