ARROW-6664: [C++] Add CMake option to build without SSE4.2 instructions #5468
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.
This may not 100% fix the issue reported in ARROW-5381, but it will help.
CPUs from Intel's Penryn architecture and prior have SSE4.1 support but not SSE4.2. For example, many Apple computers sold in 2009 have chips with this CPU architecture.
On a Penryn machine (late-2009 MacBook), binaries from our builds contain SSE4.2 instructions. I found that merely opting out of the
-msse4.2
flag fixes everything. There are no issues relating to__builtin_popcountll
on this machine, which according to documentation is suppose to gracefully handle both pre/post SSE4.2 CPUs.Building with SSE4.2 on by default is reasonable to have good performance on computers sold in the last 10 years, but having the compatibility option will expand our spectrum of support.