llvm::MachineIRBuilder::buildMergeLikeInstr

buildMergeLikeInstr overloads

Synopses

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

Build and insert Res = G_MERGE_VALUES Op0, ... or Res = G_BUILD_VECTOR Op0, ... or Res = G_CONCAT_VECTORS Op0, ...

MachineInstrBuilder
buildMergeLikeInstr(
    DstOp const& Res,
    ArrayRef<Register> Ops);
» more...

Build and insert a merge-like instruction from initializer-list sources.

MachineInstrBuilder
buildMergeLikeInstr(
    DstOp const& Res,
    std::initializer_list<SrcOp> Ops);
» more...

Return Value

  • a MachineInstrBuilder for the newly created instruction. The opcode of the new instruction will depend on the types of both the destination and the sources.
  • a MachineInstrBuilder for the newly created instruction.

Parameters

NameDescription
ResDestination operand for the result.
OpsSource operands covering the destination.

Preconditions

  • setBasicBlock or setMI must have been called.
  • The entire register Res (and no more) must be covered by the input registers.
  • The type of all Ops registers must be identical.