From eae433ad43975465458c63c5abb8b7d79c14270a Mon Sep 17 00:00:00 2001 From: RealTimeChris <40668522+RealTimeChris@users.noreply.github.com> Date: Fri, 22 Sep 2023 09:07:01 -0400 Subject: [PATCH] Fix: Fixing the AVX2 detection instruction. --- cmake/DetectArchitecture.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/DetectArchitecture.cmake b/cmake/DetectArchitecture.cmake index 1815324630..4c3a2030b5 100644 --- a/cmake/DetectArchitecture.cmake +++ b/cmake/DetectArchitecture.cmake @@ -25,13 +25,13 @@ endfunction() if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(INSTRUCTION_SETS "AVX1?/arch:AVX?__m128i value{}#auto result = _mm_extract_epi32(value, 0)" - "AVX2?/arch:AVX2?__m256i value{}#auto result = _mm256_extract_epi32(value, 0)" + "AVX2?/arch:AVX2?__m256i value{}#auto result = _mm256_add_epi32(__m256i{}, __m256i{})" "AVX512?/arch:AVX512?int32_t result[16]#const _mm512i& value{}#_mm512_store_si512(result, value)" ) else() set(INSTRUCTION_SETS "AVX1?-mavx?__m128i value{}#auto result = _mm_extract_epi32(value, 0)" - "AVX2?-mavx2?__m256i value{}#auto result = _mm256_extract_epi32(value, 0)" + "AVX2?-mavx2?__m256i value{}#auto result = _mm256_add_epi32(__m256i{}, __m256i{})" "AVX512?-mavx512f?int32_t result[16]#const _mm512i& value{}#_mm512_store_si512(result, value)" ) endif()