diff --git a/CMakeLists.txt b/CMakeLists.txt index 85750f45302..595d90c8513 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,10 +475,8 @@ else() check_cxx_source_compiles("#include \nint main() { __m256 _s, _a, _b; _s = _mm256_fmadd_ps(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_FMA) set(CMAKE_REQUIRED_FLAGS "/arch:AVX -mxop") - check_cxx_source_compiles("#include \nint main() { __m128 _s, _a, _b; _s = _mm_maddd_epi16(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_XOP_0) - check_cxx_source_compiles("#include \nint main() { __m128 _s, _a, _b; _s = _mm_maddd_epi16(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_XOP_1) + check_cxx_source_compiles("#include \nint main() { __m128 _s, _a, _b; _s = _mm_maddd_epi16(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_XOP) - check_cxx_compiler_flag("/arch:AVX -mxop" NCNN_COMPILER_SUPPORT_X86_XOP) check_cxx_compiler_flag("/arch:AVX -mf16c" NCNN_COMPILER_SUPPORT_X86_F16C) check_cxx_compiler_flag("/arch:AVX2 -mfma -mf16c" NCNN_COMPILER_SUPPORT_X86_AVX2) check_cxx_compiler_flag("/arch:AVX512 -mfma -mf16c -mavx512cd -mavx512bw -mavx512dq -mavx512vl" NCNN_COMPILER_SUPPORT_X86_AVX512) diff --git a/src/layer/x86/x86_usability.h b/src/layer/x86/x86_usability.h index c838eb0c723..033d37b1428 100644 --- a/src/layer/x86/x86_usability.h +++ b/src/layer/x86/x86_usability.h @@ -25,7 +25,7 @@ #if __AVX__ #include #if __XOP__ -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) #include #else #include