Skip to content

Commit 4f8082f

Browse files
committed
Simplify preprocessor logic
1 parent b0937a6 commit 4f8082f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: libpopcnt.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
#define HAVE_AVX512
103103
#endif
104104

105-
/* Windows: MSVC compatible compilers */
105+
/* MSVC compatible compilers (Windows) */
106106
#if defined(_MSC_VER) && \
107107
defined(HAVE_CPUID)
108108
/* clang-cl (LLVM 10 from 2020) requires /arch:AVX2 or
@@ -117,15 +117,14 @@
117117
#endif
118118
/* MSVC 2017 or later does not require
119119
* /arch:AVX2 or /arch:AVX512 */
120-
#elif (_MSC_VER >= 1910)
120+
#elif _MSC_VER >= 1910
121121
#define HAVE_AVX2
122122
#define HAVE_AVX512
123123
#endif
124-
#else /* Unix-like OSes */
124+
#else /* Clang (Unix-like OSes) */
125125
#if defined(HAVE_CPUID) && \
126126
CLANG_PREREQ(3, 8) && \
127127
__has_attribute(target) && \
128-
(!defined(_MSC_VER) || defined(__AVX2__)) && \
129128
(!defined(__apple_build_version__) || __apple_build_version__ >= 8000000)
130129
#define HAVE_AVX2
131130
#define HAVE_AVX512

0 commit comments

Comments
 (0)