llvm::getIConstantSplatVal

getIConstantSplatVal overloads

Synopses

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

Return the scalar integral splat value of Reg if possible.

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

Return the scalar integral splat value defined by MI if possible.

std::optional<APInt>
getIConstantSplatVal(
    MachineInstr const& MI,
    MachineRegisterInfo const& MRI);
» more...

Return Value

The splat APInt, or std::nullopt.

Parameters

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