Simplify more

This commit is contained in:
Robert Schulze 2023-11-16 15:24:47 +00:00
parent fcce5409f4
commit c51429b1ef
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -150,6 +150,10 @@ elseif (ARCH_AMD64)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mpclmul") set (COMPILER_FLAGS "${COMPILER_FLAGS} -mpclmul")
endif () endif ()
if (ENABLE_BMI)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mbmi")
endif ()
if (ENABLE_POPCNT) if (ENABLE_POPCNT)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mpopcnt") set (COMPILER_FLAGS "${COMPILER_FLAGS} -mpopcnt")
endif () endif ()
@ -160,32 +164,20 @@ elseif (ARCH_AMD64)
if (ENABLE_AVX2) if (ENABLE_AVX2)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mavx2") set (COMPILER_FLAGS "${COMPILER_FLAGS} -mavx2")
if (ENABLE_BMI2)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mbmi2")
endif ()
endif () endif ()
if (ENABLE_AVX512) if (ENABLE_AVX512)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mavx512f -mavx512bw -mavx512vl") set (COMPILER_FLAGS "${COMPILER_FLAGS} -mavx512f -mavx512bw -mavx512vl")
endif () if (ENABLE_AVX512_VBMI)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mavx512vbmi")
if (ENABLE_AVX512 AND ENABLE_AVX512_VBMI) endif ()
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mavx512vbmi")
endif ()
if (ENABLE_BMI)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mbmi")
endif ()
if (ENABLE_AVX2 AND ENABLE_BMI2)
set (COMPILER_FLAGS "${COMPILER_FLAGS} -mbmi2")
endif () endif ()
if (ENABLE_AVX512_FOR_SPEC_OP) if (ENABLE_AVX512_FOR_SPEC_OP)
set (X86_INTRINSICS_FLAGS "") set (X86_INTRINSICS_FLAGS "-mbmi -mavx512f -mavx512bw -mavx512vl -mprefer-vector-width=256")
if (1)
set (X86_INTRINSICS_FLAGS "${X86_INTRINSICS_FLAGS} -mbmi")
endif ()
if (1)
set (X86_INTRINSICS_FLAGS "${X86_INTRINSICS_FLAGS} -mavx512f -mavx512bw -mavx512vl -mprefer-vector-width=256")
endif ()
endif () endif ()
else () else ()