The patch below disable AVX completely. This is untested and might not
work if I understand
https://bugzilla.redhat.com/show_bug.cgi?id=1659852 correctly


-- 
KU Leuven
Department of Computer Science
Department of Materials Engineering
Celestijnenlaan 200a
3001 Leuven, Belgium
Description: Disable use of AVX
 AVX is not required by x86-64-v2.
Author: Martin Diehl <[email protected]>
Forwarded: not-needed
Last-Update: 2024-06-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/buildflags.mak
+++ b/buildflags.mak
@@ -98,40 +98,6 @@
 
 BASECFLAGS +=-Wall $(WERROR)
 
-#
-# test if compiler supports 32B(AVX2)/64B(AVX512F) move instruction.
-#
-ifeq (${CC},icc)
-	ifeq ($(PSM_DISABLE_AVX2),)
-		MAVX2=-xATOM_SSE4.2 -DPSM_AVX512
-	else
-		MAVX2=-march=core-avx-i
-	endif
-else
-	ifeq ($(PSM_DISABLE_AVX2),)
-		MAVX2=-mavx2
-	else
-		MAVX2=-mavx
-	endif
-endif
-
-ifneq (icc,${CC})
-	ifeq ($(PSM_DISABLE_AVX2),)
-		RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX2 ; echo $$?)
-	else
-		RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX ; echo $$?)
-                anerr := $(warning ***NOTE TO USER**** Disabling AVX2 will harm performance)
-	endif
-
-	ifeq (0,${RET})
-		BASECFLAGS += ${MAVX2}
-	else
-		anerr := $(error Compiler does not support ${MAVX2} )
-	endif
-else
-		BASECFLAGS += ${MAVX2}
-endif
-
 # This support is dynamic at runtime, so is OK to enable as long as compiler can generate
 # the code.
 ifneq (,${PSM_AVX512})

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to