Fix SSE4.1/AVX flags not applied on FreeBSD (amd64)#133
Open
Yaraslaut wants to merge 1 commit into
Open
Conversation
The SIMD compile-flag block was guarded by a case-sensitive match on
CMAKE_SYSTEM_PROCESSOR ("x86_64" or "AMD64"). FreeBSD (and other BSDs)
report the processor as lowercase "amd64", so the block was skipped and
-msse4.1 was never applied to convert.cpp. Because the x86 intrinsics in
intrinsics.h are gated on __x86_64__ (always defined by clang on amd64),
convert.cpp still compiled the SSE4.1 intrinsics, failing with:
always_inline function '_mm_cvtepu8_epi32' requires target feature
'sse4.1', but would be inlined into function 'cvtepu8_epi32' that is
compiled without support for 'sse4.1'
Normalize CMAKE_SYSTEM_PROCESSOR to lowercase before comparing, matching
x86_64/amd64 across Linux, Windows, and the BSDs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SIMD compile-flag block was guarded by a case-sensitive match on CMAKE_SYSTEM_PROCESSOR ("x86_64" or "AMD64"). FreeBSD (and other BSDs) report the processor as lowercase "amd64", so the block was skipped and -msse4.1 was never applied to convert.cpp. Because the x86 intrinsics in intrinsics.h are gated on x86_64 (always defined by clang on amd64), convert.cpp still compiled the SSE4.1 intrinsics, failing with:
always_inline function '_mm_cvtepu8_epi32' requires target feature
'sse4.1', but would be inlined into function 'cvtepu8_epi32' that is
compiled without support for 'sse4.1'
Normalize CMAKE_SYSTEM_PROCESSOR to lowercase before comparing, matching x86_64/amd64 across Linux, Windows, and the BSDs.