From: Joost VandeVondele Date: Thu, 12 Sep 2019 19:25:58 +0000 (+0200) Subject: Add sse4 if bmi2 is enabled X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=db00e1625eb46517f61085ffd3bcd28779e71220;ds=inline Add sse4 if bmi2 is enabled The only change done to the Makefile to get a somewhat faster binary as discussed in #2291 is to add -msse4 to the compile options of the bmi2 build. Since all processors supporting bmi2 also support sse4 this can be done easily. It is a useful step to avoid sending around custom and poorly tested builds. The speedup isn't enough to pass [0,4] but it is roughly 1.15Elo and a LOS of 90%: LLR: -2.95 (-2.94,2.94) [0.00,4.00] Total: 93009 W: 20519 L: 20316 D: 52174 Also rewrite the documentation for the user when using `make --help`, so that the order of architectures for x86-64 has the more performant build one on top. Closes https://github.com/official-stockfish/Stockfish/pull/2300 No functional change --- diff --git a/src/Makefile b/src/Makefile index 285d314e..6deb0e27 100644 --- a/src/Makefile +++ b/src/Makefile @@ -328,7 +328,7 @@ endif ifeq ($(pext),yes) CXXFLAGS += -DUSE_PEXT ifeq ($(comp),$(filter $(comp),gcc clang mingw)) - CXXFLAGS += -mbmi2 + CXXFLAGS += -msse4 -mbmi2 endif endif @@ -379,9 +379,9 @@ help: @echo "" @echo "Supported archs:" @echo "" - @echo "x86-64 > x86 64-bit" - @echo "x86-64-modern > x86 64-bit with popcnt support" - @echo "x86-64-bmi2 > x86 64-bit with pext support" + @echo "x86-64-bmi2 > x86 64-bit with pext support (also enables SSE4)" + @echo "x86-64-modern > x86 64-bit with popcnt support (also enables SSE3)" + @echo "x86-64 > x86 64-bit generic" @echo "x86-32 > x86 32-bit with SSE support" @echo "x86-32-old > x86 32-bit fall back for old hardware" @echo "ppc-64 > PPC 64-bit"