summaryrefslogtreecommitdiff
path: root/absl/crc/internal/crc32_x86_arm_combined_simd.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/crc/internal/crc32_x86_arm_combined_simd.h')
-rw-r--r--absl/crc/internal/crc32_x86_arm_combined_simd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/absl/crc/internal/crc32_x86_arm_combined_simd.h b/absl/crc/internal/crc32_x86_arm_combined_simd.h
index 59d71fd4..8f15ded3 100644
--- a/absl/crc/internal/crc32_x86_arm_combined_simd.h
+++ b/absl/crc/internal/crc32_x86_arm_combined_simd.h
@@ -25,12 +25,18 @@
// We define a translation layer for both x86 and ARM for the ease of use and
// most performance gains.
-// We need CRC (part of sse4.2) and PCLMULQDQ instructions.
+// We need CRC (part of SSE 4.2) and PCLMULQDQ instructions.
#if defined(__SSE4_2__) && defined(__PCLMUL__)
#include <x86intrin.h>
#define ABSL_CRC_INTERNAL_HAVE_X86_SIMD
+#elif defined(_MSC_VER) && defined(__AVX__)
+
+// MSVC AVX (/arch:AVX) implies SSE 4.2 and PCLMULQDQ.
+#include <intrin.h>
+#define ABSL_CRC_INTERNAL_HAVE_X86_SIMD
+
#elif defined(__aarch64__) && defined(__LITTLE_ENDIAN__) && \
defined(__ARM_FEATURE_CRC32) && defined(__ARM_NEON)