diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2024-07-26 19:36:21 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2024-07-28 17:24:57 +0100 |
| commit | 4f78f9fbb05145d437540181fda9bcc83d5a53e4 (patch) | |
| tree | 0d7f49f2f98393f8afcf6d2342b3bacc433a0aca /compiler/rustc_span/src | |
| parent | 355efacf0d430331c962a38af39049b76bb6266b (diff) | |
| download | rust-4f78f9fbb05145d437540181fda9bcc83d5a53e4.tar.gz rust-4f78f9fbb05145d437540181fda9bcc83d5a53e4.zip | |
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`.
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 6d58c4877cb..99a68613324 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1701,6 +1701,7 @@ symbols! { saturating_add, saturating_div, saturating_sub, + select_unpredictable, self_in_typedefs, self_struct_ctor, semitransparent, |
