diff options
author | Tom Finegan <tomfinegan@google.com> | 2018-06-07 12:35:05 -0700 |
---|---|---|
committer | Tom Finegan <tomfinegan@google.com> | 2018-06-07 16:05:48 -0700 |
commit | 393f7856587d58292febb0a3e82edc405aab4498 (patch) | |
tree | ad45c3a673293403f9112d5d35a43d8398f54026 /build/make/configure.sh | |
parent | e32f0bf2399bfba4cda1f04f56bc2b05a2d34354 (diff) | |
download | libvpx-393f7856587d58292febb0a3e82edc405aab4498.tar libvpx-393f7856587d58292febb0a3e82edc405aab4498.tar.gz libvpx-393f7856587d58292febb0a3e82edc405aab4498.tar.bz2 libvpx-393f7856587d58292febb0a3e82edc405aab4498.zip |
Add avx512 compile test.
Some compiler releases allow the -mavx512f arg without actually
implementing support. Test for this situation, and disable avx512
when it is detected by configure.
BUG=webm:1536
Change-Id: I63952153bb4b24aa9f25267ed47a0fe845d61f8b
Diffstat (limited to 'build/make/configure.sh')
-rw-r--r-- | build/make/configure.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh index 480b2d0ea..e0e9fd1a7 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -1333,6 +1333,15 @@ EOF 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 |