llvm::isBuildVectorConstantSplat

Return true if the specified register is defined by 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(
    Register const Reg,
    MachineRegisterInfo const& MRI,
    int64_t SplatValue,
    bool AllowUndef);

Return Value

True if all elements are SplatValue or undef.

Parameters

NameDescription
RegVirtual register defined by a build vector.
MRIRegister information for the function.
SplatValueExpected splat integer value.
AllowUndefWhether undef elements are permitted.