matchConstantSplat overloads

Synopses

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

Try to match Reg as an integer constant splat of type ConstT.

template<typename ConstT>
std::optional<ConstT>
matchConstantSplat(
    Register Reg,
    MachineRegisterInfo const& MRI);

Match Reg as an APInt constant splat.

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

Match Reg as a sign‐extended int64 constant splat.

template<>
std::optional<int64_t>
matchConstantSplat<long>(
    Register Reg,
    MachineRegisterInfo const& MRI);

Return Value

  • The splat lane value, or nullopt if matching fails.

  • The splat lane APInt, or nullopt if matching fails.

Parameters

Name

Description

Reg

Register that may hold a constant splat.

MRI

Register info used to inspect constants.

Created with MrDocs