diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 92e4b3c23..aa0925669 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -167,6 +167,8 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: arm64 + # MSVC 19.51 miscompiles the float log1p kernel on neon64 + toolset: 14.44 - name: Setup Ninja run: | python3 -m pip install --upgrade pip setuptools wheel diff --git a/cmake/Architecture.cmake b/cmake/Architecture.cmake index e6f3fd948..e7c2dcc03 100644 --- a/cmake/Architecture.cmake +++ b/cmake/Architecture.cmake @@ -92,6 +92,11 @@ function(xsimd_get_arm64_arch_flags_msvc out_list arch arm64_baseline) if(arch MATCHES "sve") message(FATAL_ERROR "SVE not supported on MSVC compilers") elseif(arch MATCHES "neon") + # ARM64EC always has Neon and must stay ABI compatible with x64 code. + if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64EC") + set(${out_list} "" PARENT_SCOPE) + return() + endif() if(arm64_baseline STREQUAL "") set(arm64_baseline "armv8.0") endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index d050aa73f..dc450748f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -29,7 +29,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native") endif() if(NOT CMAKE_CXX_COMPILER_ID MATCHES Clang) # We are using clang-cl - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp-simd") endif() endif()