You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That means that even though AVX and even AVX2 are supported by the processor, no support is flagged, and the optimized implementations are never called.
If I change the guard code to
#if defined(_WIN32) || defined(_WIN64)
AVX detections works on my machine (x64, have not tested x86 yet), but I'm not sure whether these would be the appropriate macros, or whether ARM needs special treatment. Maybe someone else knows, or could test it (I don't have an ARM available).
In my opinion, we need to fix this for master and may consider to target a lower branch (maybe backport only after a while, when PHP 8.4 has been sufficiently tested).
Activity
ndossche commentedon Aug 8, 2024
Adding additional or-checks for _M_IX86 or _M_AMD64 should do the trick.
See https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
Fix phpGH-15292: Dynamic AVX detection is broken for MSVC
Fix phpGH-15292: Dynamic AVX detection is broken for MSVC