Skip to content

Commit 187402f

Browse files
committed
test xop
1 parent 719d2d6 commit 187402f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ else()
474474
set(CMAKE_REQUIRED_FLAGS "/arch:AVX -mfma -mf16c")
475475
check_cxx_source_compiles("#include <immintrin.h>\nint main() { __m256 _s, _a, _b; _s = _mm256_fmadd_ps(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_FMA)
476476

477+
set(CMAKE_REQUIRED_FLAGS "/arch:AVX -mxop")
478+
check_cxx_source_compiles("#include <ammintrin.h>\nint main() { __m128 _s, _a, _b; _s = _mm_maddd_epi16(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_XOP_0)
479+
check_cxx_source_compiles("#include <x86intrin.h>\nint main() { __m128 _s, _a, _b; _s = _mm_maddd_epi16(_a, _b, _s); return 0; }" NCNN_COMPILER_SUPPORT_X86_XOP_1)
480+
477481
check_cxx_compiler_flag("/arch:AVX -mxop" NCNN_COMPILER_SUPPORT_X86_XOP)
478482
check_cxx_compiler_flag("/arch:AVX -mf16c" NCNN_COMPILER_SUPPORT_X86_F16C)
479483
check_cxx_compiler_flag("/arch:AVX2 -mfma -mf16c" NCNN_COMPILER_SUPPORT_X86_AVX2)

0 commit comments

Comments
 (0)