llvm::MIPatternMatch::matchConstant<APInt>

Match Reg as an APInt integer constant.

Synopsis

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

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

Return Value

The constant APInt, or nullopt if matching fails.

Parameters

NameDescription
RegRegister that may hold an integer constant.
MRIRegister info used to inspect constants.