From 53761206bac258f7942f35ff63cd4d0df4948765 Mon Sep 17 00:00:00 2001 From: Aleksandr Karpinskii Date: Sat, 6 Jul 2024 15:40:30 +0400 Subject: [PATCH] Add __SSE4_2__ for MSCC --- src/libImaging/ImagingSIMD.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libImaging/ImagingSIMD.h b/src/libImaging/ImagingSIMD.h index 3d80c79d8ec..ed259cebea2 100644 --- a/src/libImaging/ImagingSIMD.h +++ b/src/libImaging/ImagingSIMD.h @@ -2,8 +2,13 @@ This macro is set only on x86 and means SSE2 and above including AVX2. */ #if defined(_M_X64) || _M_IX86_FP == 2 #define __SSE2__ + /* However, Microsoft compiler set __AVX2__ if /arch:AVX2 option is set */ + #ifdef __AVX2__ + #define __SSE4_2__ + #endif #endif +/* For better readability */ #ifdef __SSE4_2__ #define __SSE4__ #endif