Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #124699 - scottmcm:split_at_unchecked_should_use_unch…
…ecked, r=Nilstrieb Use `unchecked_sub` in `split_at` LLVM currently isn't figuring it out on its own, even in the checked version where it hypothetically could. Before: <https://rust.godbolt.org/z/PEY38YrKs> ```llvm bb1: ; preds = %start %4 = getelementptr inbounds float, ptr %x.0, i64 %n %5 = sub i64 %x.1, %n ``` After: ```llvm bb1: ; preds = %start %4 = getelementptr inbounds float, ptr %x.0, i64 %n %5 = sub nuw i64 %x.1, %n ``` This is not using the wrapper because there's already a ubcheck covering it, so I don't want this to get a second one once #121571 lands. --- This is basically the same as #108763, since `split_at` is essentially doing two `get_unchecked`s.
- Loading branch information