Force LLVM to use CMOV for binary search
Since https://reviews.llvm.org/D118118, LLVM will no longer turn CMOVs into branches if it comes from a `select` marked with an `unpredictable` metadata attribute. This PR introduces `core::intrinsics::select_unpredictable` which emits such a `select` and uses it in the implementation of `binary_search_by`.
This commit is contained in:
@@ -1701,6 +1701,7 @@ symbols! {
|
||||
saturating_add,
|
||||
saturating_div,
|
||||
saturating_sub,
|
||||
select_unpredictable,
|
||||
self_in_typedefs,
|
||||
self_struct_ctor,
|
||||
semitransparent,
|
||||
|
||||
Reference in New Issue
Block a user