diff options
| author | bors <bors@rust-lang.org> | 2025-02-20 18:20:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-20 18:20:40 +0000 |
| commit | f04bbc60f8c353ee5ba0677bc583ac4a88b2c180 (patch) | |
| tree | 58ceeca7bb4aa4b15fd92eff69b6e0c2c2e46246 /tests/codegen | |
| parent | 28b83ee59698ae069f5355b8e03f976406f410f5 (diff) | |
| parent | 7add35831955f8fc5ba08dcdb93921cd8de17841 (diff) | |
Auto merge of #136771 - scottmcm:poke-slice-iter-next, r=joboet
Simplify `slice::Iter::next` enough that it inlines Inspired by this zulip conversation: <https://rust-lang.zulipchat.com/#narrow/channel/189540-t-compiler.2Fwg-mir-opt/topic/Feedback.20on.20a.20MIR.20optimization.20idea/near/498579990> ~~Draft for now because it needs #136735 to get the codegen tests to pass.~~
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/slice-iter-nonnull.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/codegen/slice-iter-nonnull.rs b/tests/codegen/slice-iter-nonnull.rs index 98a1b961a64..87907e7ad0a 100644 --- a/tests/codegen/slice-iter-nonnull.rs +++ b/tests/codegen/slice-iter-nonnull.rs @@ -14,11 +14,11 @@ // CHECK-LABEL: @slice_iter_next( #[no_mangle] pub fn slice_iter_next<'a>(it: &mut std::slice::Iter<'a, u32>) -> Option<&'a u32> { - // CHECK: %[[ENDP:.+]] = getelementptr inbounds{{( nuw)?}} i8, ptr %it, {{i32 4|i64 8}} - // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]] + // CHECK: %[[START:.+]] = load ptr, ptr %it, // CHECK-SAME: !nonnull // CHECK-SAME: !noundef - // CHECK: %[[START:.+]] = load ptr, ptr %it, + // CHECK: %[[ENDP:.+]] = getelementptr inbounds{{( nuw)?}} i8, ptr %it, {{i32 4|i64 8}} + // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]] // CHECK-SAME: !nonnull // CHECK-SAME: !noundef // CHECK: icmp eq ptr %[[START]], %[[END]] |
