llvm::isBuildVectorConstantSplat

Return true if the specified instruction is a G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all of the elements are SplatValue or undef.

Synopsis

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

bool
isBuildVectorConstantSplat(
    MachineInstr const& MI,
    MachineRegisterInfo const& MRI,
    APInt const& SplatValue,
    bool AllowUndef);

Parameters

NameDescription
MIRepresentation of each machine instruction.
MRIMachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
SplatValueArbitrary-precision integer.