runtime detection for AVX-512

This has nothing to do with my desktop supporting AVX-512.
Definitely not.

There's one very minor interesting change here to work around an odd
interaction between Clang's AVX-512 headers and integer santizer.
The instruction issued is the same... everything boils down to masks
in the end with AVX-512.

We need to manually include some headers for Clang/Win to see the types
we're talking about for a few of these setups.  Clang has "helpful"
guards in immintrin.h for every header it might include, designed to
speed up compilation on Windows but in this case kind of a hindrance:

    #if !defined(_MSC_VER) || __has_feature(modules) || defined(__FOO__)
        #include <foointrin.h>

An alternative is to maybe temporarily define the various __FOO__,
or perhaps temporarily undefine _MSC_VER, but who knows what kind of
knock-on efffects that'd have...

Change-Id: Id188844e0eb2602cad4841e4a7e6e72f18a4fc8a
Auto-Submit: Mike Klein <>
Reviewed-by: Mike Klein <>
Commit-Queue: Mike Klein <>
2 files changed