diff options
| author | Nikita Popov <npopov@redhat.com> | 2025-02-19 11:06:11 +0100 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2025-02-19 11:32:32 +0100 |
| commit | 31cc4c074d9df22110daa59d8f5486ae02bac3bd (patch) | |
| tree | 87805ff6b65f543402be362593e39acb64927554 /tests/codegen/ptr-arithmetic.rs | |
| parent | 5e9d8a7d55fbf1771d1b83ff2f15bdc75c9216d8 (diff) | |
| download | rust-31cc4c074d9df22110daa59d8f5486ae02bac3bd.tar.gz rust-31cc4c074d9df22110daa59d8f5486ae02bac3bd.zip | |
Emit getelementptr inbounds nuw for pointer::add()
Diffstat (limited to 'tests/codegen/ptr-arithmetic.rs')
| -rw-r--r-- | tests/codegen/ptr-arithmetic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen/ptr-arithmetic.rs b/tests/codegen/ptr-arithmetic.rs index ecb44b30f5c..fc4441ef448 100644 --- a/tests/codegen/ptr-arithmetic.rs +++ b/tests/codegen/ptr-arithmetic.rs @@ -6,7 +6,7 @@ // CHECK-SAME: [[WORD:i[0-9]+]] noundef %n) #[no_mangle] pub unsafe fn i32_add(p: *const i32, n: usize) -> *const i32 { - // CHECK: %[[TEMP:.+]] = getelementptr inbounds i32, ptr %p, [[WORD]] %n + // CHECK: %[[TEMP:.+]] = getelementptr inbounds{{( nuw)?}} i32, ptr %p, [[WORD]] %n // CHECK: ret ptr %[[TEMP]] p.add(n) } |
