LLVM 20.0.0git
Classes | Functions
llvm::MIPatternMatch Namespace Reference

Classes

struct  And
 Matching combinators. More...
 
struct  And< Pred, Preds... >
 
struct  BinaryOp_match
 
struct  BinaryOpc_match
 
struct  bind_helper
 
struct  bind_helper< const ConstantFP * >
 
struct  bind_helper< LLT >
 
struct  bind_helper< MachineInstr * >
 
struct  bind_ty
 
struct  CheckType
 
struct  CompareOp_match
 
struct  ConstantMatch
 
struct  GCstAndRegMatch
 
struct  GFCstAndRegMatch
 
struct  GFCstOrSplatGFCstMatch
 
struct  ICstOrSplatMatch
 
struct  ImplicitDefMatch
 
struct  OneNonDBGUse_match
 
struct  OneUse_match
 
struct  operand_type_match
 
struct  Or
 
struct  Or< Pred, Preds... >
 
struct  SpecificConstantMatch
 Matcher for a specific constant value. More...
 
struct  SpecificConstantOrSplatMatch
 Matcher for a specific constant or constant splat. More...
 
struct  SpecificConstantSplatMatch
 Matcher for a specific constant splat. More...
 
struct  SpecificRegisterMatch
 } More...
 
struct  TernaryOp_match
 
struct  UnaryOp_match
 

Functions

template<typename Reg , typename Pattern >
bool mi_match (Reg R, const MachineRegisterInfo &MRI, Pattern &&P)
 
template<typename Pattern >
bool mi_match (MachineInstr &MI, const MachineRegisterInfo &MRI, Pattern &&P)
 
template<typename SubPat >
OneUse_match< SubPat > m_OneUse (const SubPat &SP)
 
template<typename SubPat >
OneNonDBGUse_match< SubPat > m_OneNonDBGUse (const SubPat &SP)
 
template<typename ConstT >
std::optional< ConstT > matchConstant (Register, const MachineRegisterInfo &)
 
template<>
std::optional< APIntmatchConstant (Register Reg, const MachineRegisterInfo &MRI)
 
template<>
std::optional< int64_t > matchConstant (Register Reg, const MachineRegisterInfo &MRI)
 
ConstantMatch< APIntm_ICst (APInt &Cst)
 
ConstantMatch< int64_t > m_ICst (int64_t &Cst)
 
template<typename ConstT >
std::optional< ConstT > matchConstantSplat (Register, const MachineRegisterInfo &)
 
template<>
std::optional< APIntmatchConstantSplat (Register Reg, const MachineRegisterInfo &MRI)
 
template<>
std::optional< int64_t > matchConstantSplat (Register Reg, const MachineRegisterInfo &MRI)
 
ICstOrSplatMatch< APIntm_ICstOrSplat (APInt &Cst)
 
ICstOrSplatMatch< int64_t > m_ICstOrSplat (int64_t &Cst)
 
GCstAndRegMatch m_GCst (std::optional< ValueAndVReg > &ValReg)
 
GFCstAndRegMatch m_GFCst (std::optional< FPValueAndVReg > &FPValReg)
 
GFCstOrSplatGFCstMatch m_GFCstOrSplat (std::optional< FPValueAndVReg > &FPValReg)
 
SpecificConstantMatch m_SpecificICst (int64_t RequestedValue)
 Matches a constant equal to RequestedValue.
 
SpecificConstantSplatMatch m_SpecificICstSplat (int64_t RequestedValue)
 Matches a constant splat of RequestedValue.
 
SpecificConstantOrSplatMatch m_SpecificICstOrSplat (int64_t RequestedValue)
 Matches a RequestedValue constant or a constant splat of RequestedValue.
 
SpecificConstantMatch m_ZeroInt ()
 { Convenience matchers for specific integer values.
 
SpecificConstantMatch m_AllOnesInt ()
 
SpecificRegisterMatch m_SpecificReg (Register RequestedReg)
 Matches a register only if it is equal to RequestedReg.
 
operand_type_match m_Reg ()
 
template<typename... Preds>
And< Preds... > m_all_of (Preds &&... preds)
 
template<typename... Preds>
Or< Preds... > m_any_of (Preds &&... preds)
 
bind_ty< Registerm_Reg (Register &R)
 
bind_ty< MachineInstr * > m_MInstr (MachineInstr *&MI)
 
bind_ty< LLTm_Type (LLT Ty)
 
bind_ty< CmpInst::Predicatem_Pred (CmpInst::Predicate &P)
 
operand_type_match m_Pred ()
 
ImplicitDefMatch m_GImplicitDef ()
 
bind_ty< const ConstantFP * > m_GFCst (const ConstantFP *&C)
 
template<typename LHS , typename RHS >
BinaryOpc_match< LHS, RHS, false > m_BinOp (unsigned Opcode, const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOpc_match< LHS, RHS, truem_CommutativeBinOp (unsigned Opcode, const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_ADD, truem_GAdd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_BUILD_VECTOR, false > m_GBuildVector (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_BUILD_VECTOR_TRUNC, false > m_GBuildVectorTrunc (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_PTR_ADD, false > m_GPtrAdd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SUB > m_GSub (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_MUL, truem_GMul (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FADD, truem_GFAdd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FMUL, truem_GFMul (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FSUB, false > m_GFSub (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_AND, truem_GAnd (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_XOR, truem_GXor (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, truem_GOr (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SHL, false > m_GShl (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_LSHR, false > m_GLShr (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_ASHR, false > m_GAShr (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMAX, false > m_GSMax (const LHS &L, const RHS &R)
 
template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMIN, false > m_GSMin (const LHS &L, const RHS &R)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_ANYEXT > m_GAnyExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_SEXT > m_GSExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_ZEXT > m_GZExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FPEXT > m_GFPExt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_TRUNC > m_GTrunc (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_BITCAST > m_GBitcast (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_PTRTOINT > m_GPtrToInt (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_INTTOPTR > m_GIntToPtr (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FPTRUNC > m_GFPTrunc (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FABS > m_GFabs (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FNEG > m_GFNeg (const SrcTy &Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::COPY > m_Copy (SrcTy &&Src)
 
template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FSQRT > m_GFSqrt (const SrcTy &Src)
 
template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP > m_GICmp (const Pred &P, const LHS &L, const RHS &R)
 
template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP > m_GFCmp (const Pred &P, const LHS &L, const RHS &R)
 
template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP, truem_c_GICmp (const Pred &P, const LHS &L, const RHS &R)
 G_ICMP matcher that also matches commuted compares.
 
template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP, truem_c_GFCmp (const Pred &P, const LHS &L, const RHS &R)
 G_FCMP matcher that also matches commuted compares.
 
CheckType m_SpecificType (LLT Ty)
 
template<typename Src0Ty , typename Src1Ty , typename Src2Ty >
TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_INSERT_VECTOR_ELT > m_GInsertVecElt (const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)
 
template<typename Src0Ty , typename Src1Ty , typename Src2Ty >
TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_SELECT > m_GISelect (const Src0Ty &Src0, const Src1Ty &Src1, const Src2Ty &Src2)
 
template<typename SrcTy >
BinaryOp_match< SpecificConstantMatch, SrcTy, TargetOpcode::G_SUB > m_Neg (const SrcTy &&Src)
 Matches a register negated by a G_SUB.
 
template<typename SrcTy >
BinaryOp_match< SrcTy, SpecificConstantMatch, TargetOpcode::G_XOR, truem_Not (const SrcTy &&Src)
 Matches a register not-ed by a G_XOR.
 

Function Documentation

◆ m_all_of()

template<typename... Preds>
And< Preds... > llvm::MIPatternMatch::m_all_of ( Preds &&...  preds)

◆ m_AllOnesInt()

SpecificConstantMatch llvm::MIPatternMatch::m_AllOnesInt ( )
inline

Definition at line 239 of file MIPatternMatch.h.

Referenced by BitOp3_Op(), and m_Not().

◆ m_any_of()

template<typename... Preds>
Or< Preds... > llvm::MIPatternMatch::m_any_of ( Preds &&...  preds)

◆ m_BinOp()

template<typename LHS , typename RHS >
BinaryOpc_match< LHS, RHS, false > llvm::MIPatternMatch::m_BinOp ( unsigned  Opcode,
const LHS L,
const RHS R 
)
inline

Definition at line 438 of file MIPatternMatch.h.

◆ m_c_GFCmp()

template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP, true > llvm::MIPatternMatch::m_c_GFCmp ( const Pred &  P,
const LHS L,
const RHS R 
)
inline

G_FCMP matcher that also matches commuted compares.

E.g.

m_c_GFCmp(m_Pred(...), m_FAdd(...), m_GFMul(...))

Could match both of:

fcmp ogt (fadd x, y) (fmul a, b) fcmp olt (fmul a, b) (fadd x, y)

Definition at line 710 of file MIPatternMatch.h.

References P.

◆ m_c_GICmp()

template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP, true > llvm::MIPatternMatch::m_c_GICmp ( const Pred &  P,
const LHS L,
const RHS R 
)
inline

G_ICMP matcher that also matches commuted compares.

E.g.

m_c_GICmp(m_Pred(...), m_GAdd(...), m_GSub(...))

Could match both of:

icmp ugt (add x, y) (sub a, b) icmp ult (sub a, b) (add x, y)

Definition at line 695 of file MIPatternMatch.h.

References P.

Referenced by llvm::CombinerHelper::matchRedundantBinOpInEquality().

◆ m_CommutativeBinOp()

template<typename LHS , typename RHS >
BinaryOpc_match< LHS, RHS, true > llvm::MIPatternMatch::m_CommutativeBinOp ( unsigned  Opcode,
const LHS L,
const RHS R 
)
inline

Definition at line 445 of file MIPatternMatch.h.

◆ m_Copy()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::COPY > llvm::MIPatternMatch::m_Copy ( SrcTy &&  Src)
inline

Definition at line 630 of file MIPatternMatch.h.

Referenced by llvm::AMDGPU::getBaseWithConstantOffset().

◆ m_GAdd()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_ADD, true > llvm::MIPatternMatch::m_GAdd ( const LHS L,
const RHS R 
)
inline

◆ m_GAnd()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_AND, true > llvm::MIPatternMatch::m_GAnd ( const LHS L,
const RHS R 
)
inline

◆ m_GAnyExt()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_ANYEXT > llvm::MIPatternMatch::m_GAnyExt ( const SrcTy &  Src)
inline

Definition at line 571 of file MIPatternMatch.h.

Referenced by llvm::CombinerHelper::matchCombineShlOfExtend().

◆ m_GAShr()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_ASHR, false > llvm::MIPatternMatch::m_GAShr ( const LHS L,
const RHS R 
)
inline

◆ m_GBitcast()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_BITCAST > llvm::MIPatternMatch::m_GBitcast ( const SrcTy &  Src)
inline

◆ m_GBuildVector()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_BUILD_VECTOR, false > llvm::MIPatternMatch::m_GBuildVector ( const LHS L,
const RHS R 
)
inline

◆ m_GBuildVectorTrunc()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_BUILD_VECTOR_TRUNC, false > llvm::MIPatternMatch::m_GBuildVectorTrunc ( const LHS L,
const RHS R 
)
inline

◆ m_GCst()

GCstAndRegMatch llvm::MIPatternMatch::m_GCst ( std::optional< ValueAndVReg > &  ValReg)
inline

◆ m_GFabs()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FABS > llvm::MIPatternMatch::m_GFabs ( const SrcTy &  Src)
inline

Definition at line 620 of file MIPatternMatch.h.

Referenced by selectWMMAModsNegAbs().

◆ m_GFAdd()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FADD, true > llvm::MIPatternMatch::m_GFAdd ( const LHS L,
const RHS R 
)
inline

Definition at line 488 of file MIPatternMatch.h.

Referenced by llvm::CombinerHelper::matchRedundantNegOperands().

◆ m_GFCmp()

template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_FCMP > llvm::MIPatternMatch::m_GFCmp ( const Pred &  P,
const LHS L,
const RHS R 
)
inline

Definition at line 680 of file MIPatternMatch.h.

References P.

◆ m_GFCst() [1/2]

bind_ty< const ConstantFP * > llvm::MIPatternMatch::m_GFCst ( const ConstantFP *&  C)
inline

Definition at line 387 of file MIPatternMatch.h.

References llvm::CallingConv::C.

◆ m_GFCst() [2/2]

GFCstAndRegMatch llvm::MIPatternMatch::m_GFCst ( std::optional< FPValueAndVReg > &  FPValReg)
inline

Definition at line 165 of file MIPatternMatch.h.

◆ m_GFCstOrSplat()

GFCstOrSplatGFCstMatch llvm::MIPatternMatch::m_GFCstOrSplat ( std::optional< FPValueAndVReg > &  FPValReg)
inline

◆ m_GFMul()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FMUL, true > llvm::MIPatternMatch::m_GFMul ( const LHS L,
const RHS R 
)
inline

Definition at line 494 of file MIPatternMatch.h.

◆ m_GFNeg()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FNEG > llvm::MIPatternMatch::m_GFNeg ( const SrcTy &  Src)
inline

◆ m_GFPExt()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FPEXT > llvm::MIPatternMatch::m_GFPExt ( const SrcTy &  Src)
inline

◆ m_GFPTrunc()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FPTRUNC > llvm::MIPatternMatch::m_GFPTrunc ( const SrcTy &  Src)
inline

Definition at line 615 of file MIPatternMatch.h.

◆ m_GFSqrt()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_FSQRT > llvm::MIPatternMatch::m_GFSqrt ( const SrcTy &  Src)
inline

Definition at line 635 of file MIPatternMatch.h.

◆ m_GFSub()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_FSUB, false > llvm::MIPatternMatch::m_GFSub ( const LHS L,
const RHS R 
)
inline

Definition at line 500 of file MIPatternMatch.h.

Referenced by llvm::CombinerHelper::matchRedundantNegOperands().

◆ m_GICmp()

template<typename Pred , typename LHS , typename RHS >
CompareOp_match< Pred, LHS, RHS, TargetOpcode::G_ICMP > llvm::MIPatternMatch::m_GICmp ( const Pred &  P,
const LHS L,
const RHS R 
)
inline

Definition at line 674 of file MIPatternMatch.h.

References P.

Referenced by getOperandsForBranch().

◆ m_GImplicitDef()

ImplicitDefMatch llvm::MIPatternMatch::m_GImplicitDef ( )
inline

◆ m_GInsertVecElt()

template<typename Src0Ty , typename Src1Ty , typename Src2Ty >
TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_INSERT_VECTOR_ELT > llvm::MIPatternMatch::m_GInsertVecElt ( const Src0Ty &  Src0,
const Src1Ty &  Src1,
const Src2Ty &  Src2 
)
inline

Definition at line 750 of file MIPatternMatch.h.

Referenced by llvm::CombinerHelper::matchCombineInsertVecElts().

◆ m_GIntToPtr()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_INTTOPTR > llvm::MIPatternMatch::m_GIntToPtr ( const SrcTy &  Src)
inline

◆ m_GISelect()

template<typename Src0Ty , typename Src1Ty , typename Src2Ty >
TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, TargetOpcode::G_SELECT > llvm::MIPatternMatch::m_GISelect ( const Src0Ty &  Src0,
const Src1Ty &  Src1,
const Src2Ty &  Src2 
)
inline

Definition at line 757 of file MIPatternMatch.h.

◆ m_GLShr()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_LSHR, false > llvm::MIPatternMatch::m_GLShr ( const LHS L,
const RHS R 
)
inline

◆ m_GMul()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_MUL, true > llvm::MIPatternMatch::m_GMul ( const LHS L,
const RHS R 
)
inline

Definition at line 482 of file MIPatternMatch.h.

◆ m_GOr()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, true > llvm::MIPatternMatch::m_GOr ( const LHS L,
const RHS R 
)
inline

◆ m_GPtrAdd()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_PTR_ADD, false > llvm::MIPatternMatch::m_GPtrAdd ( const LHS L,
const RHS R 
)
inline

◆ m_GPtrToInt()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_PTRTOINT > llvm::MIPatternMatch::m_GPtrToInt ( const SrcTy &  Src)
inline

◆ m_GSExt()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_SEXT > llvm::MIPatternMatch::m_GSExt ( const SrcTy &  Src)
inline

Definition at line 576 of file MIPatternMatch.h.

Referenced by llvm::CombinerHelper::matchCombineShlOfExtend().

◆ m_GShl()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SHL, false > llvm::MIPatternMatch::m_GShl ( const LHS L,
const RHS R 
)
inline

◆ m_GSMax()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMAX, false > llvm::MIPatternMatch::m_GSMax ( const LHS L,
const RHS R 
)
inline

Definition at line 542 of file MIPatternMatch.h.

◆ m_GSMin()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMIN, false > llvm::MIPatternMatch::m_GSMin ( const LHS L,
const RHS R 
)
inline

Definition at line 548 of file MIPatternMatch.h.

◆ m_GSub()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_SUB > llvm::MIPatternMatch::m_GSub ( const LHS L,
const RHS R 
)
inline

◆ m_GTrunc()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_TRUNC > llvm::MIPatternMatch::m_GTrunc ( const SrcTy &  Src)
inline

◆ m_GXor()

template<typename LHS , typename RHS >
BinaryOp_match< LHS, RHS, TargetOpcode::G_XOR, true > llvm::MIPatternMatch::m_GXor ( const LHS L,
const RHS R 
)
inline

◆ m_GZExt()

template<typename SrcTy >
UnaryOp_match< SrcTy, TargetOpcode::G_ZEXT > llvm::MIPatternMatch::m_GZExt ( const SrcTy &  Src)
inline

◆ m_ICst() [1/2]

ConstantMatch< APInt > llvm::MIPatternMatch::m_ICst ( APInt Cst)
inline

◆ m_ICst() [2/2]

ConstantMatch< int64_t > llvm::MIPatternMatch::m_ICst ( int64_t &  Cst)
inline

Definition at line 96 of file MIPatternMatch.h.

◆ m_ICstOrSplat() [1/2]

ICstOrSplatMatch< APInt > llvm::MIPatternMatch::m_ICstOrSplat ( APInt Cst)
inline

◆ m_ICstOrSplat() [2/2]

ICstOrSplatMatch< int64_t > llvm::MIPatternMatch::m_ICstOrSplat ( int64_t &  Cst)
inline

Definition at line 138 of file MIPatternMatch.h.

◆ m_MInstr()

bind_ty< MachineInstr * > llvm::MIPatternMatch::m_MInstr ( MachineInstr *&  MI)
inline

◆ m_Neg()

template<typename SrcTy >
BinaryOp_match< SpecificConstantMatch, SrcTy, TargetOpcode::G_SUB > llvm::MIPatternMatch::m_Neg ( const SrcTy &&  Src)
inline

Matches a register negated by a G_SUB.

G_SUB 0, negated_reg

Definition at line 766 of file MIPatternMatch.h.

References m_GSub(), and m_ZeroInt().

◆ m_Not()

template<typename SrcTy >
BinaryOp_match< SrcTy, SpecificConstantMatch, TargetOpcode::G_XOR, true > llvm::MIPatternMatch::m_Not ( const SrcTy &&  Src)
inline

Matches a register not-ed by a G_XOR.

G_XOR not_reg, -1

Definition at line 774 of file MIPatternMatch.h.

References m_AllOnesInt(), and m_GXor().

◆ m_OneNonDBGUse()

template<typename SubPat >
OneNonDBGUse_match< SubPat > llvm::MIPatternMatch::m_OneNonDBGUse ( const SubPat &  SP)
inline

◆ m_OneUse()

template<typename SubPat >
OneUse_match< SubPat > llvm::MIPatternMatch::m_OneUse ( const SubPat &  SP)
inline

Definition at line 47 of file MIPatternMatch.h.

◆ m_Pred() [1/2]

operand_type_match llvm::MIPatternMatch::m_Pred ( )
inline

◆ m_Pred() [2/2]

bind_ty< CmpInst::Predicate > llvm::MIPatternMatch::m_Pred ( CmpInst::Predicate P)
inline

Definition at line 372 of file MIPatternMatch.h.

References P.

◆ m_Reg() [1/2]

operand_type_match llvm::MIPatternMatch::m_Reg ( )
inline

Definition at line 270 of file MIPatternMatch.h.

Referenced by llvm::AMDGPUCombinerHelper::applyFoldableFneg(), BitOp3_Op(), getBaseWithConstantOffset(), llvm::AMDGPU::getBaseWithConstantOffset(), getOperandsForBranch(), llvm::GISelAddressing::getPointerInfo(), getTruncStoreByteOffset(), llvm::GISelAddressing::instMayAlias(), isExtractHiElt(), isLaneMaskFromSameBlock(), llvm::CombinerHelper::matchAddSubSameReg(), llvm::CombinerHelper::matchAndOrDisjointMask(), llvm::CombinerHelper::matchAshrShlToSextInreg(), llvm::CombinerHelper::matchBuildVectorIdentityFold(), llvm::CombinerHelper::matchCombineAddP2IToPtrAdd(), llvm::CombinerHelper::matchCombineAnyExtTrunc(), llvm::CombinerHelper::matchCombineI2PToP2I(), llvm::CombinerHelper::matchCombineInsertVecElts(), llvm::CombinerHelper::matchCombineShlOfExtend(), llvm::CombinerHelper::matchCombineUnmergeZExtToZExt(), llvm::CombinerHelper::matchCombineZextTrunc(), llvm::CombinerHelper::matchCommuteShift(), matchLDPSTPAddrMode(), matchLoadAndBytePosition(), llvm::CombinerHelper::matchNotCmp(), llvm::CombinerHelper::matchOrShiftToFunnelShift(), llvm::CombinerHelper::matchOverlappingAnd(), llvm::CombinerHelper::matchReassocConstantInnerLHS(), llvm::CombinerHelper::matchRedundantBinOpInEquality(), llvm::CombinerHelper::matchRedundantNegOperands(), llvm::CombinerHelper::matchSextTruncSextLoad(), llvm::CombinerHelper::matchSimplifyAddToSub(), llvm::CombinerHelper::matchSimplifySelectToMinMax(), llvm::CombinerHelper::matchSubAddSameReg(), llvm::CombinerHelper::matchTruncBuildVectorFold(), llvm::CombinerHelper::matchTruncLshrBuildVectorFold(), llvm::CombinerHelper::matchXorOfAndWithSameReg(), matchZeroExtendFromS32(), peekThroughBitcast(), selectWMMAModsNegAbs(), and stripBitCast().

◆ m_Reg() [2/2]

bind_ty< Register > llvm::MIPatternMatch::m_Reg ( Register R)
inline

Definition at line 369 of file MIPatternMatch.h.

◆ m_SpecificICst()

SpecificConstantMatch llvm::MIPatternMatch::m_SpecificICst ( int64_t  RequestedValue)
inline

Matches a constant equal to RequestedValue.

Definition at line 195 of file MIPatternMatch.h.

Referenced by llvm::isBuildVectorConstantSplat(), isExtractHiElt(), and llvm::CombinerHelper::matchICmpToLHSKnownBits().

◆ m_SpecificICstOrSplat()

SpecificConstantOrSplatMatch llvm::MIPatternMatch::m_SpecificICstOrSplat ( int64_t  RequestedValue)
inline

◆ m_SpecificICstSplat()

SpecificConstantSplatMatch llvm::MIPatternMatch::m_SpecificICstSplat ( int64_t  RequestedValue)
inline

Matches a constant splat of RequestedValue.

Definition at line 211 of file MIPatternMatch.h.

◆ m_SpecificReg()

SpecificRegisterMatch llvm::MIPatternMatch::m_SpecificReg ( Register  RequestedReg)
inline

Matches a register only if it is equal to RequestedReg.

Definition at line 254 of file MIPatternMatch.h.

◆ m_SpecificType()

CheckType llvm::MIPatternMatch::m_SpecificType ( LLT  Ty)
inline

◆ m_Type()

bind_ty< LLT > llvm::MIPatternMatch::m_Type ( LLT  Ty)
inline

Definition at line 371 of file MIPatternMatch.h.

◆ m_ZeroInt()

SpecificConstantMatch llvm::MIPatternMatch::m_ZeroInt ( )
inline

{ Convenience matchers for specific integer values.

Definition at line 238 of file MIPatternMatch.h.

Referenced by m_Neg().

◆ matchConstant() [1/3]

template<>
std::optional< APInt > llvm::MIPatternMatch::matchConstant ( Register  Reg,
const MachineRegisterInfo MRI 
)
inline

Definition at line 70 of file MIPatternMatch.h.

References llvm::getIConstantVRegVal(), MRI, and Reg.

◆ matchConstant() [2/3]

template<>
std::optional< int64_t > llvm::MIPatternMatch::matchConstant ( Register  Reg,
const MachineRegisterInfo MRI 
)
inline

Definition at line 76 of file MIPatternMatch.h.

References llvm::getIConstantVRegSExtVal(), MRI, and Reg.

◆ matchConstant() [3/3]

template<typename ConstT >
std::optional< ConstT > llvm::MIPatternMatch::matchConstant ( Register  ,
const MachineRegisterInfo  
)
inline

◆ matchConstantSplat() [1/3]

template<>
std::optional< APInt > llvm::MIPatternMatch::matchConstantSplat ( Register  Reg,
const MachineRegisterInfo MRI 
)
inline

Definition at line 105 of file MIPatternMatch.h.

References llvm::getIConstantSplatVal(), MRI, and Reg.

◆ matchConstantSplat() [2/3]

template<>
std::optional< int64_t > llvm::MIPatternMatch::matchConstantSplat ( Register  Reg,
const MachineRegisterInfo MRI 
)
inline

Definition at line 112 of file MIPatternMatch.h.

References llvm::getIConstantSplatSExtVal(), MRI, and Reg.

◆ matchConstantSplat() [3/3]

template<typename ConstT >
std::optional< ConstT > llvm::MIPatternMatch::matchConstantSplat ( Register  ,
const MachineRegisterInfo  
)
inline

◆ mi_match() [1/2]

template<typename Pattern >
bool llvm::MIPatternMatch::mi_match ( MachineInstr MI,
const MachineRegisterInfo MRI,
Pattern &&  P 
)

Definition at line 31 of file MIPatternMatch.h.

References MI, MRI, and P.

◆ mi_match() [2/2]

template<typename Reg , typename Pattern >
bool llvm::MIPatternMatch::mi_match ( Reg  R,
const MachineRegisterInfo MRI,
Pattern &&  P 
)

Definition at line 25 of file MIPatternMatch.h.

References MRI, and P.

Referenced by llvm::AMDGPUCombinerHelper::applyFoldableFneg(), llvm::AMDGPURegisterBankInfo::applyMappingMAD_64_32(), BitOp3_Op(), clampVectorIndex(), getBaseWithConstantOffset(), llvm::AMDGPU::getBaseWithConstantOffset(), getOperandsForBranch(), llvm::GISelAddressing::getPointerInfo(), getTruncStoreByteOffset(), llvm::GISelAddressing::instMayAlias(), llvm::isBuildVectorConstantSplat(), isConstantCostlierToNegate(), isExtractHiElt(), isLaneMaskFromSameBlock(), llvm::LegalizerHelper::lowerExtractInsertVectorElt(), llvm::MIPatternMatch::BinaryOp_match< LHS_P, RHS_P, Opcode, Commutable >::match(), llvm::MIPatternMatch::BinaryOpc_match< LHS_P, RHS_P, Commutable >::match(), llvm::MIPatternMatch::UnaryOp_match< SrcTy, Opcode >::match(), llvm::MIPatternMatch::CompareOp_match< Pred_P, LHS_P, RHS_P, Opcode, Commutable >::match(), llvm::MIPatternMatch::TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, Opcode >::match(), llvm::MIPatternMatch::SpecificConstantMatch::match(), llvm::MIPatternMatch::SpecificConstantOrSplatMatch::match(), llvm::MIPatternMatch::ImplicitDefMatch::match(), llvm::CombinerHelper::matchAddEToAddO(), llvm::CombinerHelper::matchAddSubSameReg(), llvm::CombinerHelper::matchAndOrDisjointMask(), llvm::CombinerHelper::matchAshrShlToSextInreg(), llvm::CombinerHelper::matchBuildVectorIdentityFold(), llvm::CombinerHelper::matchCombineAddP2IToPtrAdd(), llvm::CombinerHelper::matchCombineAnyExtTrunc(), llvm::CombinerHelper::matchCombineConstPtrAddToI2P(), llvm::CombinerHelper::matchCombineFAddFpExtFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFAddFpExtFMulToFMadOrFMAAggressive(), llvm::CombinerHelper::matchCombineFSubFNegFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFSubFpExtFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFSubFpExtFNegFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineI2PToP2I(), llvm::CombinerHelper::matchCombineInsertVecElts(), llvm::CombinerHelper::matchCombineShlOfExtend(), llvm::CombinerHelper::matchCombineUnmergeZExtToZExt(), llvm::CombinerHelper::matchCombineZextTrunc(), llvm::CombinerHelper::matchCommuteFPConstantToRHS(), llvm::CombinerHelper::matchCommuteShift(), llvm::CombinerHelper::matchConstantFPOp(), llvm::CombinerHelper::matchICmpToLHSKnownBits(), matchLDPSTPAddrMode(), matchLoadAndBytePosition(), llvm::CombinerHelper::matchMulOBy0(), llvm::CombinerHelper::matchMulOBy2(), llvm::CombinerHelper::matchNotCmp(), llvm::CombinerHelper::matchOrShiftToFunnelShift(), llvm::CombinerHelper::matchOverlappingAnd(), llvm::CombinerHelper::matchReassocConstantInnerLHS(), llvm::CombinerHelper::matchRedundantBinOpInEquality(), llvm::CombinerHelper::matchRedundantNegOperands(), llvm::CombinerHelper::matchSextTruncSextLoad(), llvm::CombinerHelper::matchSimplifyAddToSub(), llvm::CombinerHelper::matchSimplifySelectToMinMax(), llvm::CombinerHelper::matchSubAddSameReg(), llvm::CombinerHelper::matchTruncBuildVectorFold(), llvm::CombinerHelper::matchTruncLshrBuildVectorFold(), llvm::CombinerHelper::matchXorOfAndWithSameReg(), matchZeroExtendFromS32(), peekThroughBitcast(), selectWMMAModsNegAbs(), and stripBitCast().