llvm::MachineIRBuilder::buildExtract

Build and insert Res0, ... = G_EXTRACT Src, Idx0.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/MachineIRBuilder.h>

MachineInstrBuilder
buildExtract(
    DstOp const& Res,
    SrcOp const& Src,
    uint64_t Index);

Return Value

a MachineInstrBuilder for the newly created instruction.

Parameters

NameDescription
ResDestination operand for the result.
SrcSource operand.
IndexIndex into the source value.

Preconditions

  • setBasicBlock or setMI must have been called.
  • Res and Src must be generic virtual registers.