Apple Clang 4.2 on Mac OS X 10.7 Lion does support avx2, but it has
issues with some of the asm syntax used, in particular jc and some mov
syntax.
So we add an additional check for a short assembly snippet.
The test for avx512 could result in false-positives because the
_mm256_setr_epi64x intrinsic requires only AVX, not AVX512. Specifically what
is needed here is AVX512VL.
In addition, not passing the -mavx* args to the asm compilation failed the
build on macOS High Sierra and below (Apple LLVM version 10.0.0,
clang-1000.11.45.5)