On Mon, 20 Nov 2017, Warner Losh wrote:
Author: imp
Date: Mon Nov 20 22:41:22 2017
New Revision: 326037
URL: https://svnweb.freebsd.org/changeset/base/326037
Log:
Add -mno-avx2 for clang as well as -mno-avx. We don't want either of
them when asking for no SIMD.
Is this needed. For SSE, -mno-sse implies -mno-sse[2,3,4,...] so
an multiple set of no-sse* flags are not needed (I have only checked this
for sse2). Multiple no-sse* flags are also not used.
Modified: head/share/mk/bsd.cpu.mk
==============================================================================
--- head/share/mk/bsd.cpu.mk Mon Nov 20 22:27:33 2017 (r326036)
+++ head/share/mk/bsd.cpu.mk Mon Nov 20 22:41:22 2017 (r326037)
@@ -393,7 +393,7 @@ CFLAGS += ${_CPUCFLAGS}
# (-mfpmath= is not supported)
#
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS_NO_SIMD.clang= -mno-avx
+CFLAGS_NO_SIMD.clang= -mno-avx -mno-avx2
CFLAGS_NO_SIMD= -mno-mmx -mno-sse
Nearby example of non-use for SSE.
.endif
CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}}
Testing shows that -mavx2 -mno-avx kills all AVX for clang in an example
that only generates AVX instructions (-mavx2 enabls these as a subset).
Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"