Rework setting of -mfma to only apply it where necessary
This commit is contained in:
parent
49bbf330ca
commit
30f23be0f9
|
@ -124,9 +124,9 @@ if (NOT DYNAMIC_ARCH)
|
||||||
if (HAVE_AVX)
|
if (HAVE_AVX)
|
||||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx")
|
set (CCOMMON_OPT "${CCOMMON_OPT} -mavx")
|
||||||
endif ()
|
endif ()
|
||||||
if (HAVE_FMA3)
|
# if (HAVE_FMA3)
|
||||||
set (CCOMMON_OPT "${CCOMMON_OPT} -mfma")
|
#set (CCOMMON_OPT "${CCOMMON_OPT} -mfma")
|
||||||
endif ()
|
#endif ()
|
||||||
if (HAVE_SSE)
|
if (HAVE_SSE)
|
||||||
set (CCOMMON_OPT "${CCOMMON_OPT} -msse")
|
set (CCOMMON_OPT "${CCOMMON_OPT} -msse")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -186,11 +186,11 @@ if (DEFINED TARGET)
|
||||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
|
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if (DEFINED HAVE_FMA3)
|
# if (DEFINED HAVE_FMA3)
|
||||||
if (NOT NO_AVX2)
|
# if (NOT NO_AVX2)
|
||||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mfma")
|
# set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mfma")
|
||||||
endif()
|
# endif()
|
||||||
endif()
|
# endif()
|
||||||
if (DEFINED HAVE_SSE)
|
if (DEFINED HAVE_SSE)
|
||||||
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse")
|
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -msse")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -311,7 +311,15 @@ function(GenerateNamedObjects sources_in)
|
||||||
configure_file(${new_source_file}.tmp ${new_source_file} COPYONLY)
|
configure_file(${new_source_file}.tmp ${new_source_file} COPYONLY)
|
||||||
file(REMOVE ${new_source_file}.tmp)
|
file(REMOVE ${new_source_file}.tmp)
|
||||||
list(APPEND SRC_LIST_OUT ${new_source_file})
|
list(APPEND SRC_LIST_OUT ${new_source_file})
|
||||||
|
message (STATUS ${new_source_file})
|
||||||
|
if (DEFINED HAVE_FMA3)
|
||||||
|
if ( ${new_source_file} MATCHES "(s|d?)rot_k.c")
|
||||||
|
set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
|
||||||
|
endif ()
|
||||||
|
if ( ${new_source_file} MATCHES "dgemv_t_k.c")
|
||||||
|
set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue