From 5c3799297109076c31ee801f00312cfaa0bbc605 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 28 Oct 2016 14:20:34 -0700 Subject: [PATCH] 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 --- folly/detail/RangeSse42.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/folly/detail/RangeSse42.cpp b/folly/detail/RangeSse42.cpp index 09e37781..79dfe74e 100644 --- a/folly/detail/RangeSse42.cpp +++ b/folly/detail/RangeSse42.cpp @@ -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); } } -- 2.34.1