-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libwebp] Fix SIMD patch quirks #32985
Conversation
- set(SIMD_ENABLE_FLAGS "/arch:AVX;/arch:SSE2;;;;") | ||
+ set(SIMD_ENABLE_FLAGS ";/arch:SSE2;;;;") # /arch:AVX is too much for SSE4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is based on #21644 / #14568.
IMO this is a pessimistic build-time fix for generating invalid code for non-avx sse4.1 CPUs (#14568). AFAIU the actual implementation is chosen at runtime. So the proper fix would be to choose the the sse4.1 code only if the CPU supports AVX if the compiler is MSVC. Something around these lines:
https://github.com/webmproject/libwebp/blob/dd7364c3cefe0f5c0b3c18c3b1887d353f90fc1f/src/dsp/cpu.c#L158-L167
But I don't want to touch that now. This cmake code path is not used for modern versions of MSVC.
Reverts #21644.
Fixes #14568.
Fixes #32940.