LLVM: llvm::MIPatternMatch Namespace Reference (original) (raw)

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< const MachineInstr * >
struct bind_helper< LLT >
struct bind_helper< MachineInstr * >
struct bind_ty
struct CheckType
struct ClassifyOp_match
struct CompareOp_match
struct ConstantMatch
struct deferred_helper
struct deferred_helper< LLT >
struct deferred_ty
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
Matcher for a specific register. 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 Pattern>
bool mi_match (const MachineInstr &MI, const MachineRegisterInfo &MRI, Pattern &&P)
template
OneUse_match< SubPat > m_OneUse (const SubPat &SP)
template
OneNonDBGUse_match< SubPat > m_OneNonDBGUse (const SubPat &SP)
template
std::optional< ConstT > matchConstant (Register, const MachineRegisterInfo &)
template<>
std::optional< APInt > matchConstant (Register Reg, const MachineRegisterInfo &MRI)
template<>
std::optional< int64_t > matchConstant (Register Reg, const MachineRegisterInfo &MRI)
ConstantMatch< APInt > m_ICst (APInt &Cst)
ConstantMatch< int64_t > m_ICst (int64_t &Cst)
template
std::optional< ConstT > matchConstantSplat (Register, const MachineRegisterInfo &)
template<>
std::optional< APInt > matchConstantSplat (Register Reg, const MachineRegisterInfo &MRI)
template<>
std::optional< int64_t > matchConstantSplat (Register Reg, const MachineRegisterInfo &MRI)
ICstOrSplatMatch< APInt > m_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 (const APInt &RequestedValue)
Matches a constant equal to RequestedValue.
SpecificConstantMatch m_SpecificICst (int64_t RequestedValue)
SpecificConstantSplatMatch m_SpecificICstSplat (const APInt &RequestedValue)
Matches a constant splat of RequestedValue.
SpecificConstantSplatMatch m_SpecificICstSplat (int64_t RequestedValue)
SpecificConstantOrSplatMatch m_SpecificICstOrSplat (const APInt &RequestedValue)
Matches a RequestedValue constant or a constant splat of RequestedValue.
SpecificConstantOrSplatMatch m_SpecificICstOrSplat (int64_t 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< Register > m_Reg (Register &R)
bind_ty< MachineInstr * > m_MInstr (MachineInstr *&MI)
bind_ty< const MachineInstr * > m_MInstr (const MachineInstr *&MI)
bind_ty< LLT > m_Type (LLT &Ty)
bind_ty< CmpInst::Predicate > m_Pred (CmpInst::Predicate &P)
operand_type_match m_Pred ()
bind_ty< FPClassTest > m_FPClassTest (FPClassTest &T)
deferred_ty< Register > m_DeferredReg (Register &R)
Similar to m_SpecificReg/Type, but the specific value to match originated from an earlier sub-pattern in the same mi_match expression.
deferred_ty< LLT > m_DeferredType (LLT &Ty)
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, true > m_CommutativeBinOp (unsigned Opcode, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_ADD, true > m_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, true > m_GMul (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_FADD, true > m_GFAdd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_FMUL, true > m_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, true > m_GAnd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_XOR, true > m_GXor (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, true > m_GOr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_OR, true, MachineInstr::Disjoint > m_GDisjointOr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
auto m_GAddLike (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, true > m_GSMax (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_SMIN, true > m_GSMin (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_UMAX, true > m_GUMax (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, TargetOpcode::G_UMIN, true > m_GUMin (const LHS &L, const RHS &R)
template
UnaryOp_match< SrcTy, TargetOpcode::G_ANYEXT > m_GAnyExt (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_SEXT > m_GSExt (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_ZEXT > m_GZExt (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_FPEXT > m_GFPExt (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_TRUNC > m_GTrunc (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_BITCAST > m_GBitcast (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_PTRTOINT > m_GPtrToInt (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_INTTOPTR > m_GIntToPtr (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_FPTRUNC > m_GFPTrunc (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_FABS > m_GFabs (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::G_FNEG > m_GFNeg (const SrcTy &Src)
template
UnaryOp_match< SrcTy, TargetOpcode::COPY > m_Copy (SrcTy &&Src)
template
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, true > m_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, true > m_c_GFCmp (const Pred &P, const LHS &L, const RHS &R)
G_FCMP matcher that also matches commuted compares.
template<typename LHS, typename Test>
ClassifyOp_match< LHS, Test, TargetOpcode::G_IS_FPCLASS > m_GIsFPClass (const LHS &L, const Test &T)
Matches the register and immediate used in a fpclass test G_IS_FPCLASS val, 96.
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
BinaryOp_match< SpecificConstantMatch, SrcTy, TargetOpcode::G_SUB > m_Neg (const SrcTy &&Src)
Matches a register negated by a G_SUB.
template
BinaryOp_match< SrcTy, SpecificConstantMatch, TargetOpcode::G_XOR, true > m_Not (const SrcTy &&Src)
Matches a register not-ed by a G_XOR.

m_all_of()

template<typename... Preds>

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

m_AllOnesInt()

m_any_of()

template<typename... Preds>

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

m_BinOp()

template<typename LHS, typename RHS>

m_c_GFCmp()

template<typename Pred, typename LHS, typename RHS>

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 865 of file MIPatternMatch.h.

References LHS, P, and RHS.

m_c_GICmp()

template<typename Pred, typename LHS, typename RHS>

m_CommutativeBinOp()

template<typename LHS, typename RHS>

m_Copy()

template

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

m_DeferredReg()

Similar to m_SpecificReg/Type, but the specific value to match originated from an earlier sub-pattern in the same mi_match expression.

For example, we cannot match (add X, X) with m_GAdd(m_Reg(X), m_SpecificReg(X)) because X is not initialized at the time it's passed to m_SpecificReg. Instead, we can use m_GAdd(m_Reg(x), m_DeferredReg(X)).

Definition at line 460 of file MIPatternMatch.h.

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

m_DeferredType()

m_FPClassTest()

m_GAdd()

template<typename LHS, typename RHS>

m_GAddLike()

template<typename LHS, typename RHS>

m_GAnd()

template<typename LHS, typename RHS>

m_GAnyExt()

template

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

m_GAShr()

template<typename LHS, typename RHS>

m_GBitcast()

template

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

m_GBuildVector()

template<typename LHS, typename RHS>

m_GBuildVectorTrunc()

template<typename LHS, typename RHS>

m_GCst()

m_GDisjointOr()

template<typename LHS, typename RHS>

m_GFabs()

template

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

m_GFAdd()

template<typename LHS, typename RHS>

m_GFCmp()

template<typename Pred, typename LHS, typename RHS>

m_GFCst() [1/2]

m_GFCst() [2/2]

m_GFCstOrSplat()

m_GFMul()

template<typename LHS, typename RHS>

m_GFNeg()

template

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

m_GFPExt()

template

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

m_GFPTrunc()

template

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

m_GFSqrt()

template

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

m_GFSub()

template<typename LHS, typename RHS>

m_GICmp()

template<typename Pred, typename LHS, typename RHS>

m_GImplicitDef()

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

m_GIntToPtr()

template

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

m_GIsFPClass()

template<typename LHS, typename Test>

m_GLShr()

template<typename LHS, typename RHS>

m_GMul()

template<typename LHS, typename RHS>

m_GOr()

template<typename LHS, typename RHS>

m_GPtrAdd()

template<typename LHS, typename RHS>

m_GPtrToInt()

template

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

m_GSExt()

template

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

m_GShl()

template<typename LHS, typename RHS>

m_GSMax()

template<typename LHS, typename RHS>

m_GSMin()

template<typename LHS, typename RHS>

m_GSub()

template<typename LHS, typename RHS>

m_GTrunc()

template

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

Definition at line 716 of file MIPatternMatch.h.

Referenced by AMDGPURegBankLegalizeCombiner::getReadAnyLaneSrc(), getTruncStoreByteOffset(), isExtractHiElt(), llvm::CombinerHelper::matchBuildVectorIdentityFold(), llvm::CombinerHelper::matchCombineAnyExtTrunc(), llvm::CombinerHelper::matchCombineZextTrunc(), llvm::CombinerHelper::matchSextTruncSextLoad(), llvm::CombinerHelper::matchSimplifySelectToMinMax(), llvm::LegalizationArtifactCombiner::tryCombineAnyExt(), llvm::LegalizationArtifactCombiner::tryCombineSExt(), llvm::LegalizationArtifactCombiner::tryCombineTrunc(), and llvm::LegalizationArtifactCombiner::tryCombineZExt().

m_GUMax()

template<typename LHS, typename RHS>

m_GUMin()

template<typename LHS, typename RHS>

m_GXor()

template<typename LHS, typename RHS>

m_GZExt()

template

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

m_ICst() [1/2]

Definition at line 102 of file MIPatternMatch.h.

Referenced by clampVectorIndex(), getBaseWithConstantOffset(), llvm::AMDGPU::getBaseWithConstantOffset(), getTruncStoreByteOffset(), llvm::GISelAddressing::instMayAlias(), llvm::LegalizerHelper::lowerExtractInsertVectorElt(), llvm::MIPatternMatch::SpecificConstantMatch::match(), llvm::MIPatternMatch::SpecificConstantOrSplatMatch::match(), llvm::CombinerHelper::matchAndOrDisjointMask(), llvm::CombinerHelper::matchCombineConstPtrAddToI2P(), llvm::CombinerHelper::matchCombineInsertVecElts(), matchLDPSTPAddrMode(), matchLoadAndBytePosition(), llvm::CombinerHelper::matchNotCmp(), and llvm::CombinerHelper::matchOverlappingAnd().

m_ICst() [2/2]

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

m_ICstOrSplat() [1/2]

m_ICstOrSplat() [2/2]

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

m_MInstr() [1/2]

m_MInstr() [2/2]

Definition at line 424 of file MIPatternMatch.h.

References MI.

Referenced by llvm::AMDGPU::getBaseWithConstantOffset(), llvm::MIPatternMatch::BinaryOp_match< LHS_P, RHS_P, Opcode, Commutable, Flags >::match(), llvm::MIPatternMatch::BinaryOpc_match< LHS_P, RHS_P, Commutable >::match(), llvm::MIPatternMatch::ClassifyOp_match< LHS_P, Test_P, Opcode >::match(), llvm::MIPatternMatch::CompareOp_match< Pred_P, LHS_P, RHS_P, Opcode, Commutable >::match(), llvm::MIPatternMatch::ImplicitDefMatch::match(), llvm::MIPatternMatch::TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, Opcode >::match(), llvm::MIPatternMatch::UnaryOp_match< SrcTy, Opcode >::match(), llvm::CombinerHelper::matchCombineFAddFpExtFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFAddFpExtFMulToFMadOrFMAAggressive(), llvm::CombinerHelper::matchCombineFSubFNegFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFSubFpExtFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFSubFpExtFNegFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineInsertVecElts(), llvm::LegalizationArtifactCombiner::tryCombineAnyExt(), and llvm::LegalizationArtifactCombiner::tryCombineSExt().

m_Neg()

Matches a register negated by a G_SUB.

G_SUB 0, negated_reg

Definition at line 929 of file MIPatternMatch.h.

References m_GSub(), and m_ZeroInt().

Referenced by combineAddSubWithShlAddSub(), combineAndXorSubWithBMI(), combineLogicBlendIntoConditionalNegate(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), foldAbsDiff(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), foldICmpPow2Test(), foldICmpXNegX(), FoldOrOfSelectSmaxToAbs(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombiner::getComplexity(), getKnownBitsFromAndXorOr(), getRangeForSelectPattern(), llvm::isKnownNegation(), llvm::isKnownToBeAPowerOfTwo(), llvm::SelectionDAG::isKnownToBeAPowerOfTwo(), isMaskOrZero(), isNeg(), LinearizeExprTree(), matchSelectPattern(), llvm::CombinerHelper::matchSimplifyAddToSub(), llvm::CombinerHelper::matchSimplifyNegMinMax(), NegateValue(), setLimitsForBinOp(), ShouldBreakUpSubtract(), llvm::X86TargetLowering::shouldFoldSelectWithIdentityConstant(), simplifyAndCommutative(), simplifyGEPInst(), simplifyICmpWithBinOp(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySelectWithICmpCond(), tryToRecognizeTableBasedCttz(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().

m_Not()

Matches a register not-ed by a G_XOR.

G_XOR not_reg, -1

Definition at line 937 of file MIPatternMatch.h.

References m_AllOnesInt(), and m_GXor().

Referenced by BitOp3_Op(), llvm::InstCombiner::canFreelyInvertAllUsersOf(), canonicalizeSaturatedAddUnsigned(), canShiftBinOpWithConstantRHS(), collectComplementaryPredicatedMemOps(), combineAndNotOrIntoAndNotAnd(), computeKnownBitsFromCond(), llvm::computeKnownBitsFromContext(), computeKnownFPClassFromCond(), llvm::decomposeBitTest(), dropRedundantMaskingOfLeftShiftInput(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleBitChange(), llvm::findValuesAffectedByCondition(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndToXor(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), foldComplexAndOrPatterns(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstant(), foldICmpWithHighBitMask(), foldMaskedMerge(), foldMulShl1(), foldNotXor(), foldOrToXor(), foldSubCtlzNot(), foldToUnsignedSaturatedAdd(), foldTwoEntryPHINode(), foldXorToXor(), llvm::InstCombiner::getComplexity(), llvm::InstCombiner::getFreelyInvertedImpl(), getNotValue(), llvm::AMDGPUTargetMachine::getPredicatedAddrSpace(), haveNoCommonBitsSetSpecialCases(), llvm::invertCondition(), llvm::isCheckForZeroAndMulWithOverflow(), llvm::isImpliedCondition(), llvm::isImpliedCondition(), isMaskOrZero(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), llvm::RISCVTTIImpl::isProfitableToSinkOperands(), matchDeMorgansLaws(), matchMinMaxOfMinMax(), matchSelectWithOptionalNotCond(), narrowBitOpRMW(), OptimizeAndOrXor(), reverseZExtICmpCombine(), simplifyAddInst(), simplifyAndCommutative(), simplifyBlends(), simplifyBranchConditionForVFAndUF(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpOfBools(), simplifyOrLogic(), simplifyRecipe(), simplifySelectInst(), simplifyXorInst(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), tryToReplaceALMWithWideALM(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().

m_OneNonDBGUse()

template

m_OneUse()

template

Definition at line 56 of file MIPatternMatch.h.

Referenced by llvm::canConvertToMinOrMaxIntrinsic(), canonicalizeAbs(), canonicalizeBitCastExtElt(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeInsertSplat(), canonicalizeLogicFirst(), canonicalizeLowbitMask(), llvm::canPeelLastIteration(), cheapToScalarize(), combineAdd(), combineAddSubWithShlAddSub(), combineAnd(), combineAndNotOrIntoAndNotAnd(), combineAndXorSubWithBMI(), combineCastedMaskArithmetic(), combineOrAndToBitfieldInsert(), combineOrToBitfieldInsert(), combineSetCC(), combineShiftToPMULH(), combineShlAddIAddImpl(), combineXorToBitfieldInsert(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), commuteSelect(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), dominatesMergePoint(), factorizeLerp(), llvm::SelectionDAGBuilder::FindMergedConditions(), fixReductionScalarResumeWhenVectorizingEpilog(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpsWithPow2AndWithZero(), foldAnyOrAllBitsSet(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBitOrderCrossLogicOp(), foldBoxMultiply(), foldComplexAndOrPatterns(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFNegIntoConstant(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpOrXorSubChain(), foldICmpPow2Test(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpWithClamp(), foldICmpWithHighBitMask(), foldICmpWithLowBitMaskedVal(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpWithTruncSignExtendedVal(), foldICmpXNegX(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldLoadsRecursive(), foldLogicCastConstant(), foldMinimumOverTrailingOrLeadingZeroCount(), foldMulHigh(), foldMulSelectToNegate(), foldMulShl1(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldNotXor(), foldNoWrapAdd(), FoldOrOfSelectSmaxToAbs(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldPtrToIntOrAddrOfGEP(), foldReductionIdiom(), foldSelectICmpAndAnd(), foldSetClearBits(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstCombinerImpl::foldShuffledIntrinsicOperands(), foldSubOfMinMax(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), foldVecExtTruncToExtElt(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), getNegatibleInsts(), llvm::vputils::getRecipesForUncountableExit(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::X86TTIImpl::getShuffleCost(), hoistMinMax(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVELast(), llvm::RecurrenceDescriptor::isAnyOfPattern(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), llvm::RecurrenceDescriptor::isFindIVPattern(), llvm::RecurrenceDescriptor::isMinMaxPattern(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), matchDeMorgansLaws(), matchesSquareSum(), matchFPExtFromF16(), matchIntPart(), matchOrConcat(), llvm::CombinerHelper::matchSimplifyNegMinMax(), matchZExtedSubInteger(), moveAddAfterMinMax(), narrowUDivURem(), narrowVectorSelect(), optimizeSymmetricCall(), llvm::RISCVTargetLowering::PerformDAGCombine(), reassociateForUses(), reassociateMinMaxWithConstantInOperand(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), reverseZExtICmpCombine(), shouldCanonicalizeGEPToPtrAdd(), shouldExpandCmpArithRMWInIR(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::simplifyInstruction(), simplifyShiftSelectingPackedElement(), simplifyValueKnownNonZero(), splitMergedValStore(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), tryToFPToSat(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToAddr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

m_Pred() [1/2]

m_Pred() [2/2]

m_Reg() [1/2]

Definition at line 311 of file MIPatternMatch.h.

Referenced by llvm::AMDGPUCombinerHelper::applyFoldableFneg(), BitOp3_Op(), getBaseWithConstantOffset(), llvm::AMDGPU::getBaseWithConstantOffset(), getOperandsForBranch(), llvm::GISelAddressing::getPointerInfo(), AMDGPURegBankLegalizeCombiner::getReadAnyLaneSrc(), getTruncStoreByteOffset(), llvm::GISelAddressing::instMayAlias(), isExtractHiElt(), isLaneMaskFromSameBlock(), isLshrHalf(), isShlHalf(), 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::SPIRVCombinerHelper::matchSelectToFaceForward(), llvm::CombinerHelper::matchSextTruncSextLoad(), llvm::CombinerHelper::matchSimplifyAddToSub(), llvm::CombinerHelper::matchSimplifyNegMinMax(), llvm::CombinerHelper::matchSimplifySelectToMinMax(), llvm::CombinerHelper::matchSubAddSameReg(), llvm::CombinerHelper::matchTruncBuildVectorFold(), llvm::CombinerHelper::matchTruncLshrBuildVectorFold(), llvm::CombinerHelper::matchTruncSSatS(), llvm::CombinerHelper::matchTruncSSatU(), llvm::CombinerHelper::matchTruncUSatU(), llvm::CombinerHelper::matchXorOfAndWithSameReg(), peekThroughBitcast(), selectWMMAModsNegAbs(), stripBitCast(), llvm::LegalizationArtifactCombiner::tryCombineAnyExt(), llvm::LegalizationArtifactCombiner::tryCombineSExt(), llvm::LegalizationArtifactCombiner::tryCombineTrunc(), and llvm::LegalizationArtifactCombiner::tryCombineZExt().

m_Reg() [2/2]

m_SpecificICst() [1/2]

m_SpecificICst() [2/2]

m_SpecificICstOrSplat() [1/2]

m_SpecificICstOrSplat() [2/2]

m_SpecificICstSplat() [1/2]

m_SpecificICstSplat() [2/2]

m_SpecificReg()

m_SpecificType()

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

m_Type()

m_ZeroInt()

Convenience matchers for specific integer values.

Definition at line 278 of file MIPatternMatch.h.

References llvm::APInt::getZero().

Referenced by llvm::AMDGPURegisterBankInfo::applyMappingMAD_64_32(), BitOp3_Op(), emitTransformedIndex(), foldGuardedFunnelShift(), foldICmpOfUAddOv(), foldICmpPow2Test(), foldInsEltIntoSplat(), foldIsPowerOf2(), foldIsPowerOf2OrZero(), FoldOrOfSelectSmaxToAbs(), foldSubOfMinMax(), getAlternateBinop(), llvm::getSplatValue(), llvm::ARMTTIImpl::isProfitableToSinkOperands(), llvm::RISCVTTIImpl::isProfitableToSinkOperands(), llvm::WebAssemblyTTIImpl::isProfitableToSinkOperands(), m_Neg(), matchSelectPattern(), matchUAddWithOverflowConstantEdgeCases(), shouldExpandCmpArithRMWInIR(), simplifyAndOrOfICmpsWithCtpop(), simplifyRecipe(), simplifySelectInst(), simplifySVEIntrinsic(), simplifyX86addcarry(), tryToMatchAndCreateMulAccumulateReduction(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitSub().

matchConstant() [1/3]

matchConstant() [2/3]

matchConstant() [3/3]

template

matchConstantSplat() [1/3]

matchConstantSplat() [2/3]

matchConstantSplat() [3/3]

template

mi_match() [1/3]

mi_match() [2/3]

mi_match() [3/3]

Definition at line 28 of file MIPatternMatch.h.

References MRI, P, and Reg.

Referenced by llvm::AMDGPUCombinerHelper::applyFoldableFneg(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::AMDGPURegisterBankInfo::applyMappingMAD_64_32(), BitOp3_Op(), clampVectorIndex(), getBaseWithConstantOffset(), llvm::AMDGPU::getBaseWithConstantOffset(), getOperandsForBranch(), llvm::GISelAddressing::getPointerInfo(), AMDGPURegBankLegalizeCombiner::getReadAnyLaneSrc(), getTruncStoreByteOffset(), llvm::GISelAddressing::instMayAlias(), llvm::SITargetLowering::isCanonicalized(), isConstantCostlierToNegate(), isExtractHiElt(), isLaneMaskFromSameBlock(), isLshrHalf(), isShlHalf(), llvm::LegalizerHelper::lowerExtractInsertVectorElt(), llvm::MIPatternMatch::BinaryOp_match< LHS_P, RHS_P, Opcode, Commutable, Flags >::match(), llvm::MIPatternMatch::BinaryOpc_match< LHS_P, RHS_P, Commutable >::match(), llvm::MIPatternMatch::ClassifyOp_match< LHS_P, Test_P, Opcode >::match(), llvm::MIPatternMatch::CompareOp_match< Pred_P, LHS_P, RHS_P, Opcode, Commutable >::match(), llvm::MIPatternMatch::ImplicitDefMatch::match(), llvm::MIPatternMatch::SpecificConstantMatch::match(), llvm::MIPatternMatch::SpecificConstantOrSplatMatch::match(), llvm::MIPatternMatch::TernaryOp_match< Src0Ty, Src1Ty, Src2Ty, Opcode >::match(), llvm::MIPatternMatch::UnaryOp_match< SrcTy, Opcode >::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::matchLshrOfTruncOfLshr(), 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::SPIRVCombinerHelper::matchSelectToFaceForward(), llvm::CombinerHelper::matchSextTruncSextLoad(), llvm::CombinerHelper::matchSimplifyAddToSub(), llvm::CombinerHelper::matchSimplifyNegMinMax(), llvm::CombinerHelper::matchSimplifySelectToMinMax(), llvm::CombinerHelper::matchSubAddSameReg(), llvm::CombinerHelper::matchTruncBuildVectorFold(), llvm::CombinerHelper::matchTruncLshrBuildVectorFold(), llvm::CombinerHelper::matchTruncSSatS(), llvm::CombinerHelper::matchTruncSSatU(), llvm::CombinerHelper::matchTruncUSatU(), llvm::CombinerHelper::matchXorOfAndWithSameReg(), peekThroughBitcast(), selectWMMAModsNegAbs(), stripBitCast(), llvm::LegalizationArtifactCombiner::tryCombineAnyExt(), llvm::LegalizationArtifactCombiner::tryCombineSExt(), llvm::LegalizationArtifactCombiner::tryCombineTrunc(), and llvm::LegalizationArtifactCombiner::tryCombineZExt().