This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit c2590e6
committed
Auto merge of rust-lang#102535 - scottmcm:optimize-split-at-partition-point, r=thomcc
Tell LLVM that `partition_point` returns a valid fencepost
This was already done for a successful `binary_search`, but this way `partition_point` can get similar optimizations.
Demonstration that nightly can't do this optimization today, and leaves in the panicking path: <https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=e1074cd2faf5f68e49cffd728ded243a>
r? `@thomcc`File tree
2 files changed
+32
-3
lines changed- library/core/src/slice
- src/test/codegen
2 files changed
+32
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2426 | 2426 | | |
2427 | 2427 | | |
2428 | 2428 | | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
2429 | 2433 | | |
2430 | 2434 | | |
2431 | 2435 | | |
2432 | 2436 | | |
2433 | 2437 | | |
2434 | 2438 | | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
2438 | 2443 | | |
2439 | 2444 | | |
2440 | 2445 | | |
| |||
2452 | 2457 | | |
2453 | 2458 | | |
2454 | 2459 | | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
2455 | 2464 | | |
2456 | 2465 | | |
2457 | 2466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments