build: check for broken AVX512 compiler support
authorLiang Ma <liangma@bytedance.com>
Tue, 20 Jul 2021 13:36:45 +0000 (14:36 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 18:04:24 +0000 (20:04 +0200)
commitba57777d7d25f8fa1f1c951ec56e01b7f1207d9b
tree347204a0974d12b716fbab56cf1a24627e972fb3
parent3f44ec48c733f7d7607877164c9aa0305de9cecd
build: check for broken AVX512 compiler support

GCC 6.3.0 has a known bug which related to _mm512_extracti64x4_epi64.
Please reference https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82887

Some DPDK PMD AVX512 version heavily use _mm512_extracti64x4_epi6,
which cause building failure with debug buildtype.

Therefore, it's helpful to check if compiler work with
_mm512_extracti64x4_epi6.

This patch check the compiler compile result against the test code
snippet. If the checking is failed then disable AVX512.

Bugzilla ID: 717
Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path")
Fixes: 808a17b3c1e6 ("net/ice: add Rx AVX512 offload path")
Fixes: 4b64ccb328c9 ("net/iavf: fix VLAN extraction in AVX512 path")
Cc: stable@dpdk.org
Reported-by: Liang Ma <liangma@liangbit.com>
Signed-off-by: Liang Ma <liangma@bytedance.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
config/x86/meson.build