Commit 5c379929 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Don't abort when calling qfind_first_byte_of_sse42 without compiler support for SSE 4.2

Summary:
If Folly was compiled without support for SSE 4.2, but this function ends up getting called, we'd abort due to the check failing.
To solve this, just don't do the check and fall back to the non-sse version.

This is reasonable because it means that the code calling `qfind_first_byte_of_sse42` only needs to care whether there is CPU support for SSE 4.2, not whether we were able to actually implement the search with SSE 4.2 based on compiler support.

Reviewed By: yfeldblum

Differential Revision: D4096645

fbshipit-source-id: d26a791c09f61595e40c84c47a7a2596b9b69c1e
parent b7e1694c
......@@ -29,7 +29,6 @@ namespace folly {
namespace detail {
size_t qfind_first_byte_of_sse42(const StringPieceLite haystack,
const StringPieceLite needles) {
CHECK(false) << "Function " << __func__ << " only works with SSE42!";
return qfind_first_byte_of_nosse(haystack, needles);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment