File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 6666# they make explicit use of the rbp register.
6767CKOPTFLAGS := $(COPTFLAGS ) -O3 -fomit-frame-pointer
6868ifeq ($(CC_VENDOR ) ,gcc)
69+ ifeq ($(shell test $(CC_MAJOR) -ge 15; echo $$?),0)
70+ # gcc 15.1.0 fails to compile SUP kernels if -ftree-slp-vectorize
71+ # is enabled, which is default in -O2 and higher
72+ CKOPTFLAGS += -fno-tree-slp-vectorize
73+ endif
6974 CKVECFLAGS := -mavx2 -mfma -mfpmath=sse -march=haswell
7075 ifeq ($(GCC_OT_4_9_0),yes)
7176 # If gcc is older than 4.9.0, we must use a different label for -march.
Original file line number Diff line number Diff line change 6767CKOPTFLAGS := $(COPTFLAGS ) -O3 -fomit-frame-pointer
6868
6969ifeq ($(CC_VENDOR ) ,gcc)
70+ ifeq ($(shell test $(CC_MAJOR) -ge 15; echo $$?),0)
71+ # gcc 15.1.0 fails to compile SUP kernels if -ftree-slp-vectorize
72+ # is enabled, which is default in -O2 and higher
73+ CKOPTFLAGS += -fno-tree-slp-vectorize
74+ endif
7075 CKVECFLAGS := -mavx512f -mavx512dq -mavx512bw -mavx512vl -mfpmath=sse -march=skylake-avx512
7176else ifeq ($(CC_VENDOR),icc)
7277 CKVECFLAGS := -xCORE-AVX512
Original file line number Diff line number Diff line change @@ -58,8 +58,15 @@ endif()
5858
5959if (MSVC )
6060 set (CKVECFLAGS -mavx2 -mfma -mno-fma4 -mno-tbm -mno-xop -mno-lwp)
61+
6162elseif ("${CMAKE_C_COMPILER_ID} " STREQUAL "GNU" )
63+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0)
64+ # gcc 15.1.0 fails to compile SUP kernels if -ftree-slp-vectorize
65+ # is enabled, which is default in -O2 and higher
66+ list (APPEND CKOPTFLAGS -fno-tree -slp-vectorize)
67+ endif ()
6268 set (CKVECFLAGS -mavx2 -mfpmath=sse -mfma)
69+
6370elseif ("${CMAKE_C_COMPILER_ID} " MATCHES "Clang" )
6471 set (CKVECFLAGS -mavx2 -mfpmath=sse -mfma -mno-fma4 -mno-tbm -mno-xop -mno-lwp)
6572 execute_process (COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string)
@@ -68,6 +75,7 @@ elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
6875 if ("${CLANG_STRING} " MATCHES "(AOCC.LLVM)" )
6976 list (APPEND CKVECFLAGS -mllvm -disable-licm-vrp)
7077 endif ()
78+
7179else ()
7280 message (FATAL_ERROR "gcc or clang are required for this configuration." )
7381endif ()
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ CKLPOPTFLAGS :=
6262
6363ifeq ($(CC_VENDOR ) ,gcc)
6464 CKVECFLAGS := -mavx2 -mfpmath=sse -mfma
65+ ifeq ($(shell test $(CC_MAJOR) -ge 15; echo $$?),0)
66+ # gcc 15.1.0 fails to compile SUP kernels if -ftree-slp-vectorize
67+ # is enabled, which is default in -O2 and higher
68+ CKOPTFLAGS += -fno-tree-slp-vectorize
69+ endif
6570else ifeq ($(CC_VENDOR),clang)
6671 CKVECFLAGS := -mavx2 -mfpmath=sse -mfma -mno-fma4 -mno-tbm -mno-xop -mno-lwp
6772 ifeq ($(strip $(shell $(CC) -v |&head -1 |grep -c 'AOCC.LLVM')),1)
You can’t perform that action at this time.
0 commit comments