llvm::getIConstantSplatVal

Return the scalar integral splat value of Reg if possible.

Synopsis

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

std::optional<APInt>
getIConstantSplatVal(
    Register const Reg,
    MachineRegisterInfo const& MRI);

Return Value

The splat APInt, or std::nullopt.

Parameters

NameDescription
RegVirtual register that may define a splat constant.
MRIRegister information for the function.