Skip to content

Commit

Permalink
Simplify preprocessor logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jul 19, 2020
1 parent b0937a6 commit 4f8082f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libpopcnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#define HAVE_AVX512
#endif

/* Windows: MSVC compatible compilers */
/* MSVC compatible compilers (Windows) */
#if defined(_MSC_VER) && \
defined(HAVE_CPUID)
/* clang-cl (LLVM 10 from 2020) requires /arch:AVX2 or
Expand All @@ -117,15 +117,14 @@
#endif
/* MSVC 2017 or later does not require
* /arch:AVX2 or /arch:AVX512 */
#elif (_MSC_VER >= 1910)
#elif _MSC_VER >= 1910
#define HAVE_AVX2
#define HAVE_AVX512
#endif
#else /* Unix-like OSes */
#else /* Clang (Unix-like OSes) */
#if defined(HAVE_CPUID) && \
CLANG_PREREQ(3, 8) && \
__has_attribute(target) && \
(!defined(_MSC_VER) || defined(__AVX2__)) && \
(!defined(__apple_build_version__) || __apple_build_version__ >= 8000000)
#define HAVE_AVX2
#define HAVE_AVX512
Expand Down

0 comments on commit 4f8082f

Please sign in to comment.