[llvm] bb09588 - [Support/BLAKE3] Do a CMake check for the `-mavx512vl` flag before applying it
Argyrios Kyrtzidis via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 22:04:22 PDT 2022
Author: Argyrios Kyrtzidis
Date: 2022-06-20T22:04:14-07:00
New Revision: bb095880f87d6b9c2aadc3aaaf159e25b739f29d
URL: https://github.com/llvm/llvm-project/commit/bb095880f87d6b9c2aadc3aaaf159e25b739f29d
DIFF: https://github.com/llvm/llvm-project/commit/bb095880f87d6b9c2aadc3aaaf159e25b739f29d.diff
LOG: [Support/BLAKE3] Do a CMake check for the `-mavx512vl` flag before applying it
Added:
Modified:
llvm/lib/Support/BLAKE3/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/Support/BLAKE3/CMakeLists.txt b/llvm/lib/Support/BLAKE3/CMakeLists.txt
index 142e8c68d052..df1805918587 100644
--- a/llvm/lib/Support/BLAKE3/CMakeLists.txt
+++ b/llvm/lib/Support/BLAKE3/CMakeLists.txt
@@ -70,10 +70,13 @@ if (CAN_USE_ASSEMBLER)
blake3_avx2_x86-64_unix.S
blake3_avx512_x86-64_unix.S
)
- # Clang-6 needs this flag. We also suppress '-Wunused-command-line-argument'
- # in case the file is included with arm architecture.
- set_source_files_properties(blake3_avx512_x86-64_unix.S
- PROPERTIES COMPILE_OPTIONS "-mavx512vl;-Wno-unused-command-line-argument")
+ check_c_compiler_flag("-mavx512vl" SUPPORTS_avx512vl)
+ if (SUPPORTS_avx512vl)
+ # Clang-6 needs this flag. We also suppress '-Wunused-command-line-argument'
+ # in case the file is included with arm architecture.
+ set_source_files_properties(blake3_avx512_x86-64_unix.S
+ PROPERTIES COMPILE_OPTIONS "-mavx512vl;-Wno-unused-command-line-argument")
+ endif()
endif()
endif()
else()
More information about the llvm-commits
mailing list