Hi I think we should explicitly define march to be x86-64 (which is the default in Linux) and documented here: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
We can then also remove -msse2 which is enabled by default. piotr@ip-172-31-30-23:0:~/qemu (master)+$ echo "" | gcc -v -E - 2>&1 | grep cc1 /usr/lib/gcc/x86_64-linux-gnu/5/cc1 -E -quiet -v -imultiarch x86_64-linux-gnu - -mtune=generic -march=x86-64 -fstack-protector-strong -Wformat -Wformat-security As we can see in mkldnn build, march=native could be used which won't run in all the processors: 3rdparty/mkldnn/cmake/platform.cmake elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) set(DEF_ARCH_OPT_FLAGS "-march=native -mtune=native") endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) A further discussion topic would be to benchmark and use AVX instructions present in more modern cores which might provide additional peformance gains, but are not x86-64 generic, as older CPUs from AMD, Intel and VIA don't have it.