llvm::isBuildVectorAllZeros

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

Synopsis

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

bool
isBuildVectorAllZeros(
    MachineInstr const& MI,
    MachineRegisterInfo const& MRI,
    bool AllowUndef = false);

Return Value

True if all elements are zero or undef.

Parameters

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