Emit getelementptr inbounds nuw for pointer::add()
This commit is contained in:
parent
5e9d8a7d55
commit
31cc4c074d
7 changed files with 55 additions and 15 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue