diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-04 18:36:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-04 18:36:38 +0200 |
| commit | a5cc1f663f197ffd1372148a232ab53c4afca557 (patch) | |
| tree | 8816e25bc1efbd07c3575cbb717e5cdf23e935d6 /compiler/rustc_interface/src/interface.rs | |
| parent | 9af1e8ce42e6a058bd4f36be587d2d9966adb452 (diff) | |
| parent | f1de4c16ee3dae0599efa64d6ebe601efbe23769 (diff) | |
| download | rust-a5cc1f663f197ffd1372148a232ab53c4afca557.tar.gz rust-a5cc1f663f197ffd1372148a232ab53c4afca557.zip | |
Rollup merge of #124699 - scottmcm:split_at_unchecked_should_use_unchecked, 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.
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
0 files changed, 0 insertions, 0 deletions
