Build and insert Res = G_PTR_ADD Op0, Op1
Declared in <llvm/CodeGen/GlobalISel/MachineIRBuilder.h>
MachineInstrBuilder
buildPtrAdd(
DstOp const& Res,
SrcOp const& Op0,
SrcOp const& Op1,
std::optional<unsigned int> Flags = std::nullopt);
G_PTR_ADD adds Op1 addressible units to the pointer specified by Op0, storing the resulting pointer in Res. Addressible units are typically bytes but this can vary between targets.
a MachineInstrBuilder for the newly created instruction.
| Name | Description |
|---|---|
| Res | Destination operand for the result. |
| Op0 | First source operand. |
| Op1 | Second source operand. |
| Flags | Optional instruction flags to attach. |
Res and Op0 must be generic virtual registers with pointer type.Op1 must be a generic virtual register with scalar type.