Add SVE, SVE2, and SVE2_BITPERM as targets

Change-Id: I5231e2eb0a31708a16c853dc83ea48db32e0b0a5
This commit is contained in:
George Wort
2021-05-17 17:13:14 +01:00
committed by Konstantinos Margaritis
parent 2c350e7803
commit 27b1bea462
5 changed files with 95 additions and 7 deletions

View File

@@ -213,6 +213,14 @@ else()
set(TUNE_FLAG native)
endif()
if (BUILD_SVE2_BITPERM)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve2-bitperm")
elseif (BUILD_SVE2)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve2")
elseif (BUILD_SVE)
set(GNUCC_ARCH "${GNUCC_ARCH}+sve")
endif ()
# compiler version checks TODO: test more compilers
if (CMAKE_COMPILER_IS_GNUCXX)
set(GNUCXX_MINVER "4.8.1")
@@ -296,6 +304,9 @@ if (ARCH_IA32 OR ARCH_X86_64)
CHECK_INCLUDE_FILE_CXX(x86intrin.h HAVE_CXX_X86INTRIN_H)
elseif (ARCH_ARM32 OR ARCH_AARCH64)
CHECK_INCLUDE_FILE_CXX(arm_neon.h HAVE_C_ARM_NEON_H)
if (BUILD_SVE OR BUILD_SVE2 OR BUILD_SVE2_BITPERM)
CHECK_INCLUDE_FILE_CXX(arm_sve.h HAVE_C_ARM_SVE_H)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flax-vector-conversions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flax-vector-conversions")
endif()