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,
    int64_t SplatValue,
    bool AllowUndef);

Return Value

True if all elements are SplatValue or undef.

Parameters

NameDescription
MIBuild-vector instruction to inspect.
MRIRegister information for the function.
SplatValueExpected splat integer value.
AllowUndefWhether undef elements are permitted.