Commit c138c24
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`1 file changed
+12
-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 | | |
| |||
0 commit comments