ref: 9a9ff2d80485486e3de331080a257146724f51dc
parent: 9e4dc99e4be809fd7f07423eac39f9828594197c
parent: 393f7856587d58292febb0a3e82edc405aab4498
author: Tom Finegan <tomfinegan@chromium.org>
date: Fri Jun 8 11:11:13 EDT 2018
Merge "Add avx512 compile test."
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1333,6 +1333,15 @@
else
if [ "$ext" = "avx512" ]; then
check_gcc_machine_options $ext avx512f avx512cd avx512bw avx512dq avx512vl
+
+ # Confirm that the compiler really supports avx512.
+ check_cc -mavx512f <<EOF || RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx512 " && soft_disable avx512
+#include <immintrin.h>
+void f(void) {
+ __m512i x = _mm512_set1_epi16(0);
+ (void)x;
+}
+EOF
else
# use the shortened version for the flag: sse4_1 -> sse4
check_gcc_machine_option ${ext%_*} $ext