Fix #134933: False positive SUPPORT_SSE42_BUILD
When you build Blender with optimization flags, such as `-O1` or higher, [this check](https://projects.blender.org/blender/blender/src/branch/main/build_files/cmake/macros.cmake#L572-L576) always passes, so `SUPPORT_SSE42_BUILD` is set to false positive value even when a CPU doesn't actually support `SSE4.2`. This fix prevents a compiler from throwing away `SSE4.2` instructions. _Best regards!_ Pull Request: https://projects.blender.org/blender/blender/pulls/135685
This commit is contained in:
committed by
Sebastian Parborg
parent
a2ffdb74b4
commit
e5987569d3
@@ -572,7 +572,13 @@ macro(TEST_SSE_SUPPORT
|
||||
check_c_source_runs("
|
||||
#include <nmmintrin.h>
|
||||
#include <emmintrin.h>
|
||||
int main(void) { __m128i v = _mm_setzero_si128(); v = _mm_cmpgt_epi64(v,v); return 0; }"
|
||||
#include <smmintrin.h>
|
||||
int main(void) {
|
||||
__m128i v = _mm_setzero_si128();
|
||||
v = _mm_cmpgt_epi64(v,v);
|
||||
if (_mm_test_all_zeros(v, v)) return 0;
|
||||
return 1;
|
||||
}"
|
||||
SUPPORT_SSE42_BUILD)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user