Build a nuw inbounds G_PTR_ADD for an in-object pointer offset.
Declared in <llvm/CodeGen/GlobalISel/MachineIRBuilder.h>
MachineInstrBuilder
buildObjectPtrOffset(
DstOp const& Res,
SrcOp const& Op0,
SrcOp const& Op1);
Builds Res = nuw inbounds G_PTR_ADD Op0, Op1. The value of Op0 must be a pointer into or just after an object; adding Op1 must yield a pointer into or just after the same object.
a MachineInstrBuilder for the newly created instruction.
| Name | Description |
|---|---|
| Res | Destination pointer. |
| Op0 | Base object pointer. |
| Op1 | Offset in addressable units. |
Res and Op0 must be generic virtual registers with pointer type.Op1 must be a generic virtual register with scalar type.