LLVM 23.0.0git
llvm::PatternMatch Namespace Reference

Classes

struct  AllowFmf_match
struct  AnyBinaryOp_match
struct  AnyOps_match
 Matches instructions with Opcode and any number of operands. More...
struct  AnyUnaryOp_match
struct  ap_match
struct  apf_pred_ty
 This helper class is used to match scalar and vector constants that satisfy a specified predicate, and bind them to an APFloat. More...
struct  api_pred_ty
 This helper class is used to match scalar and vector constants that satisfy a specified predicate, and bind them to an APInt. More...
struct  Argument_match
struct  BinaryOp_match
struct  bind_const_intval_ty
struct  bind_immconstant_ty
struct  BinOpPred_match
struct  br_match
struct  brc_match
struct  CastInst_match
struct  CastOperator_match
struct  CmpClass_match
struct  CommutativeBinaryIntrinsic_match
struct  constantint_match
struct  ContainsMatchingVectorElement_match
struct  cstval_pred_ty
 This helper class is used to match constant scalars, vector splats, and fixed width vectors that satisfy a specified predicate. More...
struct  custom_checkfn
struct  DisjointOr_match
struct  ElementWiseBitCast_match
struct  Exact_match
struct  ExtractValue_match
struct  FMaxMin_match
struct  FNeg_match
struct  icmp_pred_with_threshold
struct  ICmpLike_match
struct  immconstant_ty
struct  InsertValue_match
 Matcher for a single index InsertValue instruction. More...
struct  IntrinsicID_match
 Intrinsic matchers. More...
struct  IntrinsicIDs_match
 Match intrinsic calls with any of the given IDs. More...
struct  IntrinsicMatchImpl
struct  is_all_ones
struct  is_any_apint
struct  is_any_zero_fp
struct  is_bitwiselogic_op
struct  is_finite
struct  is_finitenonzero
struct  is_idiv_op
struct  is_inf
struct  is_irem_op
struct  is_logical_shift_op
struct  is_lowbit_mask
struct  is_lowbit_mask_or_zero
struct  is_maxsignedvalue
struct  is_nan
struct  is_neg_zero_fp
struct  is_negated_power2
struct  is_negated_power2_or_zero
struct  is_negative
struct  is_non_zero_fp
struct  is_non_zero_int
struct  is_non_zero_not_denormal_fp
struct  is_noninf
struct  is_nonnan
struct  is_nonnegative
struct  is_nonpositive
struct  is_one
struct  is_pos_zero_fp
struct  is_power2
struct  is_power2_or_zero
struct  is_right_shift_op
struct  is_shift_op
struct  is_shifted_mask
struct  is_sign_mask
struct  is_signed_inf
struct  is_strictlypositive
struct  is_zero
struct  is_zero_int
struct  LoadSimple_match
 Matches a simple (non-volatile, non-atomic) LoadInst. More...
struct  LogicalOp_match
struct  m_Mask
struct  m_SpecificMask
struct  m_SplatMask
struct  m_SplatOrPoisonMask
struct  m_ZeroMask
struct  match_immconstant_ty
struct  match_unless
 Inverting matcher. More...
struct  NNegZExt_match
struct  NoWrapTrunc_match
struct  ofmax_pred_ty
 Helper class for identifying ordered max predicates. More...
struct  ofmin_pred_ty
 Helper class for identifying ordered min predicates. More...
struct  OneOps_match
 Matches instructions with Opcode and three operands. More...
struct  OneUse_match
struct  OverflowingBinaryOp_match
struct  PtrAdd_match
struct  PtrToIntSameSize_match
struct  SelectLike_match
struct  ShiftLike_match
struct  Shuffle_match
 Matches shuffle. More...
struct  Signum_match
struct  specific_bbval
 Match a specified basic block value. More...
struct  specific_fpval
 Match a specified floating point value or vector of all elements of that value. More...
struct  specific_intval
 Match a specified integer value or vector of all elements of that value. More...
struct  specific_intval64
struct  SpecificBinaryOp_match
struct  SpecificCmpClass_match
struct  specificval_ty
 Matcher for specified Value*. More...
struct  Splat_match
struct  ThreeOps_match
 Matches instructions with Opcode and three operands. More...
struct  TwoOps_match
 Matches instructions with Opcode and three operands. More...
struct  UAddWithOverflow_match
struct  ufmax_pred_ty
 Helper class for identifying unordered max predicates. More...
struct  ufmin_pred_ty
 Helper class for identifying unordered min predicates. More...
struct  undef_match
struct  XorLike_match

Typedefs

template<typename Predicate, bool AllowPoison = true>
using cst_pred_ty = cstval_pred_ty<Predicate, ConstantInt, AllowPoison>
 specialization of cstval_pred_ty for ConstantInt
template<typename Predicate>
using cstfp_pred_ty
 specialization of cstval_pred_ty for ConstantFP

Functions

template<typename Val, typename Pattern>
bool match (Val *V, const Pattern &P)
template<typename Val = const Value, typename Pattern>
auto match_fn (const Pattern &P)
 A match functor that can be used as a UnaryPredicate in functional algorithms like all_of.
template<typename Pattern>
bool match (ArrayRef< int > Mask, const Pattern &P)
template<typename T>
OneUse_match< Tm_OneUse (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::AllowReassocm_AllowReassoc (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::AllowReciprocalm_AllowReciprocal (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::AllowContractm_AllowContract (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::ApproxFuncm_ApproxFunc (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::NoNaNsm_NoNaNs (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::NoInfsm_NoInfs (const T &SubPattern)
template<typename T>
AllowFmf_match< T, FastMathFlags::NoSignedZerosm_NoSignedZeros (const T &SubPattern)
auto m_Value ()
 Match an arbitrary value and ignore it.
auto m_UnOp ()
 Match an arbitrary unary operation and ignore it.
auto m_BinOp ()
 Match an arbitrary binary operation and ignore it.
auto m_Cmp ()
 Matches any compare instruction and ignore it.
auto m_AnyIntrinsic ()
 Matches any intrinsic call and ignore it.
auto m_Undef ()
 Match an arbitrary undef constant.
auto m_UndefValue ()
 Match an arbitrary UndefValue constant.
auto m_Poison ()
 Match an arbitrary poison constant.
auto m_Constant ()
 Match an arbitrary Constant and ignore it.
auto m_ConstantInt ()
 Match an arbitrary ConstantInt and ignore it.
auto m_ConstantFP ()
 Match an arbitrary ConstantFP and ignore it.
template<typename SPTy>
ContainsMatchingVectorElement_match< SPTy > m_ContainsMatchingVectorElement (const SPTy &SubPattern)
 Match a vector constant where at least one of its elements matches the subpattern.
auto m_ConstantExpr ()
 Match a constant expression or a constant that contains a constant expression.
template<typename T>
Splat_match< Tm_ConstantSplat (const T &SubPattern)
 Match a constant splat. TODO: Extend this to non-constant splats.
auto m_BasicBlock ()
 Match an arbitrary basic block value and ignore it.
template<typename Ty>
match_unless< Ty > m_Unless (const Ty &M)
 Match if the inner matcher does NOT match.
ap_match< APIntm_APInt (const APInt *&Res)
 Match a ConstantInt or splatted ConstantVector, binding the specified pointer to the contained APInt.
ap_match< APIntm_APIntAllowPoison (const APInt *&Res)
 Match APInt while allowing poison in splat vector constants.
ap_match< APIntm_APIntForbidPoison (const APInt *&Res)
 Match APInt while forbidding poison in splat vector constants.
ap_match< APFloatm_APFloat (const APFloat *&Res)
 Match a ConstantFP or splatted ConstantVector, binding the specified pointer to the contained APFloat.
ap_match< APFloatm_APFloatAllowPoison (const APFloat *&Res)
 Match APFloat while allowing poison in splat vector constants.
ap_match< APFloatm_APFloatForbidPoison (const APFloat *&Res)
 Match APFloat while forbidding poison in splat vector constants.
template<int64_t Val>
constantint_match< Val > m_ConstantInt ()
 Match a ConstantInt with a specific value.
cst_pred_ty< custom_checkfn< APInt > > m_CheckedInt (function_ref< bool(const APInt &)> CheckFn)
 Match an integer or vector where CheckFn(ele) for each element is true.
cst_pred_ty< custom_checkfn< APInt > > m_CheckedInt (const Constant *&V, function_ref< bool(const APInt &)> CheckFn)
cstfp_pred_ty< custom_checkfn< APFloat > > m_CheckedFp (function_ref< bool(const APFloat &)> CheckFn)
 Match a float or vector where CheckFn(ele) for each element is true.
cstfp_pred_ty< custom_checkfn< APFloat > > m_CheckedFp (const Constant *&V, function_ref< bool(const APFloat &)> CheckFn)
cst_pred_ty< is_any_apintm_AnyIntegralConstant ()
 Match an integer or vector with any integral constant.
cst_pred_ty< is_shifted_maskm_ShiftedMask ()
cst_pred_ty< is_all_onesm_AllOnes ()
 Match an integer or vector with all bits set.
cst_pred_ty< is_all_ones, false > m_AllOnesForbidPoison ()
auto m_AllOnesOrPoison ()
cst_pred_ty< is_maxsignedvaluem_MaxSignedValue ()
 Match an integer or vector with values having all bits except for the high bit set (0x7f...).
api_pred_ty< is_maxsignedvaluem_MaxSignedValue (const APInt *&V)
cst_pred_ty< is_negativem_Negative ()
 Match an integer or vector of negative values.
api_pred_ty< is_negativem_Negative (const APInt *&V)
cst_pred_ty< is_nonnegativem_NonNegative ()
 Match an integer or vector of non-negative values.
api_pred_ty< is_nonnegativem_NonNegative (const APInt *&V)
cst_pred_ty< is_strictlypositivem_StrictlyPositive ()
 Match an integer or vector of strictly positive values.
api_pred_ty< is_strictlypositivem_StrictlyPositive (const APInt *&V)
cst_pred_ty< is_nonpositivem_NonPositive ()
 Match an integer or vector of non-positive values.
api_pred_ty< is_nonpositivem_NonPositive (const APInt *&V)
cst_pred_ty< is_onem_One ()
 Match an integer 1 or a vector with all elements equal to 1.
cst_pred_ty< is_zero_intm_ZeroInt ()
 Match an integer 0 or a vector with all elements equal to 0.
cst_pred_ty< is_non_zero_intm_NonZeroInt ()
 Match a non-zero integer or a vector with all non-zero elements.
is_zero m_Zero ()
 Match any null constant or a vector with all elements equal to 0.
auto m_ZeroOrPoison ()
cst_pred_ty< is_power2m_Power2 ()
 Match an integer or vector power-of-2.
api_pred_ty< is_power2m_Power2 (const APInt *&V)
cst_pred_ty< is_negated_power2m_NegatedPower2 ()
 Match a integer or vector negated power-of-2.
api_pred_ty< is_negated_power2m_NegatedPower2 (const APInt *&V)
cst_pred_ty< is_negated_power2_or_zerom_NegatedPower2OrZero ()
 Match a integer or vector negated power-of-2.
api_pred_ty< is_negated_power2_or_zerom_NegatedPower2OrZero (const APInt *&V)
cst_pred_ty< is_power2_or_zerom_Power2OrZero ()
 Match an integer or vector of 0 or power-of-2 values.
api_pred_ty< is_power2_or_zerom_Power2OrZero (const APInt *&V)
cst_pred_ty< is_sign_maskm_SignMask ()
 Match an integer or vector with only the sign bit(s) set.
cst_pred_ty< is_lowbit_maskm_LowBitMask ()
 Match an integer or vector with only the low bit(s) set.
api_pred_ty< is_lowbit_maskm_LowBitMask (const APInt *&V)
cst_pred_ty< is_lowbit_mask_or_zerom_LowBitMaskOrZero ()
 Match an integer or vector with only the low bit(s) set.
api_pred_ty< is_lowbit_mask_or_zerom_LowBitMaskOrZero (const APInt *&V)
cst_pred_ty< icmp_pred_with_thresholdm_SpecificInt_ICMP (ICmpInst::Predicate Predicate, const APInt &Threshold)
 Match an integer or vector with every element comparing 'pred' (eg/ne/...) to Threshold.
cstfp_pred_ty< is_nanm_NaN ()
 Match an arbitrary NaN constant.
cstfp_pred_ty< is_nonnanm_NonNaN ()
 Match a non-NaN FP constant.
cstfp_pred_ty< is_infm_Inf ()
 Match a positive or negative infinity FP constant.
cstfp_pred_ty< is_signed_inf< false > > m_PosInf ()
 Match a positive infinity FP constant.
cstfp_pred_ty< is_signed_inf< true > > m_NegInf ()
 Match a negative infinity FP constant.
cstfp_pred_ty< is_noninfm_NonInf ()
 Match a non-infinity FP constant, i.e.
cstfp_pred_ty< is_finitem_Finite ()
 Match a finite FP constant, i.e.
apf_pred_ty< is_finitem_Finite (const APFloat *&V)
cstfp_pred_ty< is_finitenonzerom_FiniteNonZero ()
 Match a finite non-zero FP constant.
apf_pred_ty< is_finitenonzerom_FiniteNonZero (const APFloat *&V)
cstfp_pred_ty< is_any_zero_fpm_AnyZeroFP ()
 Match a floating-point negative zero or positive zero.
cstfp_pred_ty< is_pos_zero_fpm_PosZeroFP ()
 Match a floating-point positive zero.
cstfp_pred_ty< is_neg_zero_fpm_NegZeroFP ()
 Match a floating-point negative zero.
cstfp_pred_ty< is_non_zero_fpm_NonZeroFP ()
 Match a floating-point non-zero.
cstfp_pred_ty< is_non_zero_not_denormal_fpm_NonZeroNotDenormalFP ()
 Match a floating-point non-zero that is not a denormal.
match_bind< Valuem_Value (Value *&V)
 Match a value, capturing it if we match.
match_bind< const Valuem_Value (const Value *&V)
template<typename Pattern>
auto m_Value (Value *&V, const Pattern &P)
 Match against the nested pattern, and capture the value if we match.
template<typename Pattern>
auto m_Value (const Value *&V, const Pattern &P)
 Match against the nested pattern, and capture the value if we match.
match_bind< Instructionm_Instruction (Instruction *&I)
 Match an instruction, capturing it if we match.
match_bind< const Instructionm_Instruction (const Instruction *&I)
template<typename Pattern>
auto m_Instruction (Instruction *&I, const Pattern &P)
 Match against the nested pattern, and capture the instruction if we match.
template<typename Pattern>
auto m_Instruction (const Instruction *&I, const Pattern &P)
match_bind< UnaryOperatorm_UnOp (UnaryOperator *&I)
 Match a unary operator, capturing it if we match.
match_bind< const UnaryOperatorm_UnOp (const UnaryOperator *&I)
match_bind< BinaryOperatorm_BinOp (BinaryOperator *&I)
 Match a binary operator, capturing it if we match.
match_bind< const BinaryOperatorm_BinOp (const BinaryOperator *&I)
match_bind< IntrinsicInstm_AnyIntrinsic (IntrinsicInst *&I)
 Match any intrinsic call, capturing it if we match.
match_bind< const IntrinsicInstm_AnyIntrinsic (const IntrinsicInst *&I)
match_bind< WithOverflowInstm_WithOverflowInst (WithOverflowInst *&I)
 Match a with overflow intrinsic, capturing it if we match.
match_bind< const WithOverflowInstm_WithOverflowInst (const WithOverflowInst *&I)
match_bind< PHINodem_Phi (PHINode *&PN)
 Match a PHI node, capturing it if we match.
match_bind< UndefValuem_UndefValue (UndefValue *&U)
 Match an UndefValue, capturing the value if we match.
match_bind< Constantm_Constant (Constant *&C)
 Match a Constant, capturing the value if we match.
match_bind< ConstantIntm_ConstantInt (ConstantInt *&CI)
 Match a ConstantInt, capturing the value if we match.
match_bind< ConstantFPm_ConstantFP (ConstantFP *&C)
 Match a ConstantFP, capturing the value if we match.
match_bind< ConstantExprm_ConstantExpr (ConstantExpr *&C)
 Match a ConstantExpr, capturing the value if we match.
match_bind< BasicBlockm_BasicBlock (BasicBlock *&V)
 Match a basic block value, capturing it if we match.
match_bind< const BasicBlockm_BasicBlock (const BasicBlock *&V)
match_immconstant_ty m_ImmConstant ()
 Match an arbitrary immediate Constant and ignore it.
bind_immconstant_ty m_ImmConstant (Constant *&C)
 Match an immediate Constant, capturing the value if we match.
specificval_ty m_Specific (const Value *V)
 Match if we have a specific specified value.
match_deferred< Valuem_Deferred (Value *const &V)
 Like m_Specific(), but works if the specific value to match is determined as part of the same match() expression.
match_deferred< const Valuem_Deferred (const Value *const &V)
specific_fpval m_SpecificFP (double V)
 Match a specific floating point value or vector with all elements equal to the value.
specific_fpval m_FPOne ()
 Match a float 1.0 or vector with all elements equal to 1.0.
specific_intval< false > m_SpecificInt (const APInt &V)
 Match a specific integer value or vector with all elements equal to the value.
specific_intval64< false > m_SpecificInt (uint64_t V)
specific_intval< true > m_SpecificIntAllowPoison (const APInt &V)
specific_intval64< true > m_SpecificIntAllowPoison (uint64_t V)
bind_const_intval_ty m_ConstantInt (uint64_t &V)
 Match a ConstantInt and bind to its value.
specific_bbval m_SpecificBB (BasicBlock *BB)
 Match a specific basic block value.
match_deferred< BasicBlockm_Deferred (BasicBlock *const &BB)
 A commutative-friendly version of m_Specific().
match_deferred< const BasicBlockm_Deferred (const BasicBlock *const &BB)
template<typename LHS, typename RHS>
AnyBinaryOp_match< LHS, RHSm_BinOp (const LHS &L, const RHS &R)
template<typename OP_t>
AnyUnaryOp_match< OP_t > m_UnOp (const OP_t &X)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Add > m_Add (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FAdd > m_FAdd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Sub > m_Sub (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FSub > m_FSub (const LHS &L, const RHS &R)
template<typename OpTy>
FNeg_match< OpTym_FNeg (const OpTy &X)
 Match 'fneg X' as 'fsub -0.0, X'.
template<typename RHS>
BinaryOp_match< cstfp_pred_ty< is_any_zero_fp >, RHS, Instruction::FSub > m_FNegNSZ (const RHS &X)
 Match 'fneg X' as 'fsub +-0.0, X'.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Mul > m_Mul (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FMul > m_FMul (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::UDiv > m_UDiv (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::SDiv > m_SDiv (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FDiv > m_FDiv (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::URem > m_URem (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::SRem > m_SRem (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FRem > m_FRem (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::And > m_And (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Or > m_Or (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Xor > m_Xor (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Shl > m_Shl (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::LShr > m_LShr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::AShr > m_AShr (const LHS &L, const RHS &R)
template<typename LHS>
ShiftLike_match< LHS, Instruction::Shl > m_ShlOrSelf (const LHS &L, uint64_t &R)
 Matches shl L, ConstShAmt or L itself (R will be set to zero in this case).
template<typename LHS>
ShiftLike_match< LHS, Instruction::LShr > m_LShrOrSelf (const LHS &L, uint64_t &R)
 Matches lshr L, ConstShAmt or L itself (R will be set to zero in this case).
template<typename LHS>
ShiftLike_match< LHS, Instruction::AShr > m_AShrOrSelf (const LHS &L, uint64_t &R)
 Matches ashr L, ConstShAmt or L itself (R will be set to zero in this case).
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrapm_NSWAdd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap, true > m_c_NSWAdd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrapm_NSWSub (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoSignedWrapm_NSWMul (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoSignedWrapm_NSWShl (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrapm_NUWAdd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap, true > m_c_NUWAdd (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrapm_NUWSub (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrapm_NUWMul (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoUnsignedWrapm_NUWShl (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
SpecificBinaryOp_match< LHS, RHSm_BinOp (unsigned Opcode, const LHS &L, const RHS &R)
 Matches a specific opcode.
template<typename LHS, typename RHS>
DisjointOr_match< LHS, RHSm_DisjointOr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
DisjointOr_match< LHS, RHS, true > m_c_DisjointOr (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
match_combine_or< BinaryOp_match< LHS, RHS, Instruction::Add >, DisjointOr_match< LHS, RHS > > m_AddLike (const LHS &L, const RHS &R)
 Match either "add" or "or disjoint".
template<typename LHS, typename RHS>
match_combine_or< OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap >, DisjointOr_match< LHS, RHS > > m_NSWAddLike (const LHS &L, const RHS &R)
 Match either "add nsw" or "or disjoint".
template<typename LHS, typename RHS>
match_combine_or< OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap >, DisjointOr_match< LHS, RHS > > m_NUWAddLike (const LHS &L, const RHS &R)
 Match either "add nuw" or "or disjoint".
template<typename LHS, typename RHS>
auto m_c_XorLike (const LHS &L, const RHS &R)
 Match either (xor L, R), (xor R, L) or (sub nuw R, L) iff R.isMask() Only commutative matcher as the sub will need to swap the L and R.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_shift_opm_Shift (const LHS &L, const RHS &R)
 Matches shift operations.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_right_shift_opm_Shr (const LHS &L, const RHS &R)
 Matches logical shift operations.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_logical_shift_opm_LogicalShift (const LHS &L, const RHS &R)
 Matches logical shift operations.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_bitwiselogic_opm_BitwiseLogic (const LHS &L, const RHS &R)
 Matches bitwise logic operations.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_bitwiselogic_op, true > m_c_BitwiseLogic (const LHS &L, const RHS &R)
 Matches bitwise logic operations in either order.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_idiv_opm_IDiv (const LHS &L, const RHS &R)
 Matches integer division operations.
template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_irem_opm_IRem (const LHS &L, const RHS &R)
 Matches integer remainder operations.
template<typename T>
Exact_match< Tm_Exact (const T &SubPattern)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, CmpInstm_Cmp (CmpPredicate &Pred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInstm_ICmp (CmpPredicate &Pred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, FCmpInstm_FCmp (CmpPredicate &Pred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, CmpInstm_Cmp (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInstm_ICmp (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, FCmpInstm_FCmp (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, CmpInstm_SpecificCmp (CmpPredicate MatchPred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, ICmpInstm_SpecificICmp (CmpPredicate MatchPred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, ICmpInst, true > m_c_SpecificICmp (CmpPredicate MatchPred, const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, FCmpInstm_SpecificFCmp (CmpPredicate MatchPred, const LHS &L, const RHS &R)
template<typename Cond, typename LHS, typename RHS>
ThreeOps_match< Cond, LHS, RHS, Instruction::Select > m_Select (const Cond &C, const LHS &L, const RHS &R)
 Matches SelectInst.
template<int64_t L, int64_t R, typename Cond>
ThreeOps_match< Cond, constantint_match< L >, constantint_match< R >, Instruction::Select > m_SelectCst (const Cond &C)
 This matches a select of two constants, e.g.: m_SelectCst<-1, 0>(m_Value(V))
template<typename LHS, typename RHS>
ThreeOps_match< decltype(m_Value()), LHS, RHS, Instruction::Select, true > m_c_Select (const LHS &L, const RHS &R)
 Match Select(C, LHS, RHS) or Select(C, RHS, LHS)
template<typename OpTy>
OneOps_match< OpTy, Instruction::Freeze > m_Freeze (const OpTy &Op)
 Matches FreezeInst.
template<typename Val_t, typename Elt_t, typename Idx_t>
ThreeOps_match< Val_t, Elt_t, Idx_t, Instruction::InsertElement > m_InsertElt (const Val_t &Val, const Elt_t &Elt, const Idx_t &Idx)
 Matches InsertElementInst.
template<typename Val_t, typename Idx_t>
TwoOps_match< Val_t, Idx_t, Instruction::ExtractElement > m_ExtractElt (const Val_t &Val, const Idx_t &Idx)
 Matches ExtractElementInst.
template<typename V1_t, typename V2_t>
TwoOps_match< V1_t, V2_t, Instruction::ShuffleVector > m_Shuffle (const V1_t &v1, const V2_t &v2)
 Matches ShuffleVectorInst independently of mask value.
template<typename V1_t, typename V2_t, typename Mask_t>
Shuffle_match< V1_t, V2_t, Mask_t > m_Shuffle (const V1_t &v1, const V2_t &v2, const Mask_t &mask)
template<typename OpTy>
OneOps_match< OpTy, Instruction::Load > m_Load (const OpTy &Op)
 Matches LoadInst.
template<typename OpTy>
LoadSimple_match< OpTym_LoadSimple (const OpTy &Op)
template<typename ValueOpTy, typename PointerOpTy>
TwoOps_match< ValueOpTy, PointerOpTy, Instruction::Store > m_Store (const ValueOpTy &ValueOp, const PointerOpTy &PointerOp)
 Matches StoreInst.
template<typename... OperandTypes>
auto m_GEP (const OperandTypes &...Ops)
 Matches GetElementPtrInst.
template<typename PointerOpTy, typename OffsetOpTy>
PtrAdd_match< PointerOpTy, OffsetOpTy > m_PtrAdd (const PointerOpTy &PointerOp, const OffsetOpTy &OffsetOp)
 Matches GEP with i8 source element type.
template<typename OpTy>
CastOperator_match< OpTy, Instruction::BitCast > m_BitCast (const OpTy &Op)
 Matches BitCast.
template<typename OpTy>
ElementWiseBitCast_match< OpTym_ElementWiseBitCast (const OpTy &Op)
template<typename OpTy>
CastOperator_match< OpTy, Instruction::PtrToInt > m_PtrToInt (const OpTy &Op)
 Matches PtrToInt.
template<typename OpTy>
PtrToIntSameSize_match< OpTym_PtrToIntSameSize (const DataLayout &DL, const OpTy &Op)
template<typename OpTy>
CastOperator_match< OpTy, Instruction::PtrToAddr > m_PtrToAddr (const OpTy &Op)
 Matches PtrToAddr.
template<typename OpTy>
auto m_PtrToIntOrAddr (const OpTy &Op)
 Matches PtrToInt or PtrToAddr.
template<typename OpTy>
CastOperator_match< OpTy, Instruction::IntToPtr > m_IntToPtr (const OpTy &Op)
 Matches IntToPtr.
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, CastInst >, OpTym_CastOrSelf (const OpTy &Op)
 Matches any cast or self. Used to ignore casts.
template<typename OpTy>
CastInst_match< OpTy, TruncInstm_Trunc (const OpTy &Op)
 Matches Trunc.
template<typename OpTy>
NoWrapTrunc_match< OpTy, TruncInst::NoUnsignedWrapm_NUWTrunc (const OpTy &Op)
 Matches trunc nuw.
template<typename OpTy>
NoWrapTrunc_match< OpTy, TruncInst::NoSignedWrapm_NSWTrunc (const OpTy &Op)
 Matches trunc nsw.
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, TruncInst >, OpTym_TruncOrSelf (const OpTy &Op)
template<typename OpTy>
CastInst_match< OpTy, SExtInstm_SExt (const OpTy &Op)
 Matches SExt.
template<typename OpTy>
CastInst_match< OpTy, ZExtInstm_ZExt (const OpTy &Op)
 Matches ZExt.
template<typename OpTy>
NNegZExt_match< OpTym_NNegZExt (const OpTy &Op)
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, ZExtInst >, OpTym_ZExtOrSelf (const OpTy &Op)
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, SExtInst >, OpTym_SExtOrSelf (const OpTy &Op)
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, SExtInst >, NNegZExt_match< OpTy > > m_SExtLike (const OpTy &Op)
 Match either "sext" or "zext nneg".
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, ZExtInst >, CastInst_match< OpTy, SExtInst > > m_ZExtOrSExt (const OpTy &Op)
template<typename OpTy>
match_combine_or< match_combine_or< CastInst_match< OpTy, ZExtInst >, CastInst_match< OpTy, SExtInst > >, OpTym_ZExtOrSExtOrSelf (const OpTy &Op)
template<typename OpTy>
auto m_ZExtOrTruncOrSelf (const OpTy &Op)
template<typename LHS, typename RHS>
ICmpLike_match< LHS, RHSm_ICmpLike (CmpPredicate &Pred, const LHS &L, const RHS &R)
template<typename CondTy, typename LTy, typename RTy>
SelectLike_match< CondTy, LTy, RTy > m_SelectLike (const CondTy &C, const LTy &TrueC, const RTy &FalseC)
 Matches a value that behaves like a boolean-controlled select, i.e.
template<typename OpTy>
CastInst_match< OpTy, UIToFPInstm_UIToFP (const OpTy &Op)
template<typename OpTy>
CastInst_match< OpTy, SIToFPInstm_SIToFP (const OpTy &Op)
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, UIToFPInst >, CastInst_match< OpTy, SIToFPInst > > m_IToFP (const OpTy &Op)
template<typename OpTy>
CastInst_match< OpTy, FPToUIInstm_FPToUI (const OpTy &Op)
template<typename OpTy>
CastInst_match< OpTy, FPToSIInstm_FPToSI (const OpTy &Op)
template<typename OpTy>
match_combine_or< CastInst_match< OpTy, FPToUIInst >, CastInst_match< OpTy, FPToSIInst > > m_FPToI (const OpTy &Op)
template<typename OpTy>
CastInst_match< OpTy, FPTruncInstm_FPTrunc (const OpTy &Op)
template<typename OpTy>
CastInst_match< OpTy, FPExtInstm_FPExt (const OpTy &Op)
br_match m_UnconditionalBr (BasicBlock *&Succ)
template<typename Cond_t>
brc_match< Cond_t, match_bind< BasicBlock >, match_bind< BasicBlock > > m_Br (const Cond_t &C, BasicBlock *&T, BasicBlock *&F)
template<typename Cond_t, typename TrueBlock_t, typename FalseBlock_t>
brc_match< Cond_t, TrueBlock_t, FalseBlock_t > m_Br (const Cond_t &C, const TrueBlock_t &T, const FalseBlock_t &F)
template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ofmax_pred_tym_OrdFMax (const LHS &L, const RHS &R)
 Match an 'ordered' floating point maximum function.
template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ofmin_pred_tym_OrdFMin (const LHS &L, const RHS &R)
 Match an 'ordered' floating point minimum function.
template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ufmax_pred_tym_UnordFMax (const LHS &L, const RHS &R)
 Match an 'unordered' floating point maximum function.
template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ufmin_pred_tym_UnordFMin (const LHS &L, const RHS &R)
 Match an 'unordered' floating point minimum function.
template<typename LHS, typename RHS>
match_combine_or< FMaxMin_match< LHS, RHS, ofmax_pred_ty >, FMaxMin_match< LHS, RHS, ufmax_pred_ty > > m_OrdOrUnordFMax (const LHS &L, const RHS &R)
 Match an 'ordered' or 'unordered' floating point maximum function.
template<typename LHS, typename RHS>
match_combine_or< FMaxMin_match< LHS, RHS, ofmin_pred_ty >, FMaxMin_match< LHS, RHS, ufmin_pred_ty > > m_OrdOrUnordFMin (const LHS &L, const RHS &R)
 Match an 'ordered' or 'unordered' floating point minimum function.
template<typename ValTy>
BinaryOp_match< cst_pred_ty< is_all_ones >, ValTy, Instruction::Xor, true > m_Not (const ValTy &V)
 Matches a 'Not' as 'xor V, -1' or 'xor -1, V'.
template<typename ValTy>
BinaryOp_match< cst_pred_ty< is_all_ones, false >, ValTy, Instruction::Xor, true > m_NotForbidPoison (const ValTy &V)
template<typename LHS_t, typename RHS_t, typename Sum_t>
UAddWithOverflow_match< LHS_t, RHS_t, Sum_t > m_UAddWithOverflow (const LHS_t &L, const RHS_t &R, const Sum_t &S)
 Match an icmp instruction checking for unsigned overflow on addition.
template<unsigned OpI, typename Opnd_t>
Argument_match< Opnd_t > m_Argument (const Opnd_t &Op)
 Match an argument.
template<Intrinsic::ID IntrID, typename... Ts>
auto m_Intrinsic (const Ts &...Ops)
 Match intrinsic calls like this: m_Intrinsic<Intrinsic::fabs>(m_Value(X))
template<Intrinsic::ID... IntrIDs>
IntrinsicIDs_match< IntrIDs... > m_AnyIntrinsic ()
 Match intrinsic calls with any of the given IDs like this: m_AnyIntrinsic<Intrinsic::fptosi_sat, Intrinsic::fptoui_sat>() This is more efficient than using nested m_CombineOr with m_Intrinsic because it performs the CallInst/Function cast only once.
template<typename Opnd0, typename Opnd1, typename Opnd2>
auto m_MaskedLoad (const Opnd0 &Op0, const Opnd1 &Op1, const Opnd2 &Op2)
 Matches MaskedLoad Intrinsic.
template<typename Opnd0, typename Opnd1, typename Opnd2>
auto m_MaskedStore (const Opnd0 &Op0, const Opnd1 &Op1, const Opnd2 &Op2)
 Matches MaskedStore Intrinsic.
template<typename Opnd0, typename Opnd1, typename Opnd2>
auto m_MaskedGather (const Opnd0 &Op0, const Opnd1 &Op1, const Opnd2 &Op2)
 Matches MaskedGather Intrinsic.
template<typename Opnd0>
auto m_BitReverse (const Opnd0 &Op0)
template<typename Opnd0>
auto m_BSwap (const Opnd0 &Op0)
template<typename Opnd0>
auto m_Ctpop (const Opnd0 &Op0)
template<typename Opnd0>
auto m_FAbs (const Opnd0 &Op0)
template<typename Opnd0>
auto m_FCanonicalize (const Opnd0 &Op0)
template<typename Opnd0, typename Opnd1>
auto m_Ctlz (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_Cttz (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_SMax (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_SMin (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_UMax (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_UMin (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_MaxOrMin (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMinNum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMinimum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMinimumNum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMaxNum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMaximum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMaximumNum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMaxNum_or_FMaximumNum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1>
auto m_FMinNum_or_FMinimumNum (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0, typename Opnd1, typename Opnd2>
auto m_FShl (const Opnd0 &Op0, const Opnd1 &Op1, const Opnd2 &Op2)
template<typename Opnd0, typename Opnd1, typename Opnd2>
auto m_FShr (const Opnd0 &Op0, const Opnd1 &Op1, const Opnd2 &Op2)
template<typename Opnd0>
auto m_Sqrt (const Opnd0 &Op0)
template<typename Opnd0, typename Opnd1>
auto m_CopySign (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd0>
auto m_VecReverse (const Opnd0 &Op0)
template<typename Opnd0, typename Opnd1, typename Opnd2>
auto m_VectorInsert (const Opnd0 &Op0, const Opnd1 &Op1, const Opnd2 &Op2)
template<typename LHS, typename RHS>
AnyBinaryOp_match< LHS, RHS, true > m_c_BinOp (const LHS &L, const RHS &R)
 Matches a BinaryOperator with LHS and RHS in either order.
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInst, true > m_c_ICmp (CmpPredicate &Pred, const LHS &L, const RHS &R)
 Matches an ICmp with a predicate over LHS and RHS in either order.
template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInst, true > m_c_ICmp (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
SpecificBinaryOp_match< LHS, RHS, true > m_c_BinOp (unsigned Opcode, const LHS &L, const RHS &R)
 Matches a specific opcode with LHS and RHS in either order.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Add, true > m_c_Add (const LHS &L, const RHS &R)
 Matches a Add with LHS and RHS in either order.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Mul, true > m_c_Mul (const LHS &L, const RHS &R)
 Matches a Mul with LHS and RHS in either order.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::And, true > m_c_And (const LHS &L, const RHS &R)
 Matches an And with LHS and RHS in either order.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Or, true > m_c_Or (const LHS &L, const RHS &R)
 Matches an Or with LHS and RHS in either order.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Xor, true > m_c_Xor (const LHS &L, const RHS &R)
 Matches an Xor with LHS and RHS in either order.
template<typename ValTy>
BinaryOp_match< cst_pred_ty< is_zero_int >, ValTy, Instruction::Sub > m_Neg (const ValTy &V)
 Matches a 'Neg' as 'sub 0, V'.
template<typename ValTy>
OverflowingBinaryOp_match< cst_pred_ty< is_zero_int >, ValTy, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrapm_NSWNeg (const ValTy &V)
 Matches a 'Neg' as 'sub nsw 0, V'.
template<Intrinsic::ID IntrID, typename T0, typename T1>
CommutativeBinaryIntrinsic_match< IntrID, T0, T1m_c_Intrinsic (const T0 &Op0, const T1 &Op1)
template<typename LHS, typename RHS>
auto m_c_SMin (const LHS &L, const RHS &R)
 Matches an SMin with LHS and RHS in either order.
template<typename LHS, typename RHS>
auto m_c_SMax (const LHS &L, const RHS &R)
 Matches an SMax with LHS and RHS in either order.
template<typename LHS, typename RHS>
auto m_c_UMin (const LHS &L, const RHS &R)
 Matches a UMin with LHS and RHS in either order.
template<typename LHS, typename RHS>
auto m_c_UMax (const LHS &L, const RHS &R)
 Matches a UMax with LHS and RHS in either order.
template<typename LHS, typename RHS>
auto m_c_MaxOrMin (const LHS &L, const RHS &R)
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FAdd, true > m_c_FAdd (const LHS &L, const RHS &R)
 Matches FAdd with LHS and RHS in either order.
template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FMul, true > m_c_FMul (const LHS &L, const RHS &R)
 Matches FMul with LHS and RHS in either order.
template<typename Val_t>
Signum_match< Val_t > m_Signum (const Val_t &V)
 Matches a signum pattern.
template<int Ind, typename Val_t>
ExtractValue_match< Ind, Val_t > m_ExtractValue (const Val_t &V)
 Match a single index ExtractValue instruction.
template<typename Val_t>
ExtractValue_match<-1, Val_t > m_ExtractValue (const Val_t &V)
 Match an ExtractValue instruction with any index.
template<int Ind, typename Val_t, typename Elt_t>
InsertValue_match< Ind, Val_t, Elt_t > m_InsertValue (const Val_t &Val, const Elt_t &Elt)
 Matches a single index InsertValue instruction.
auto m_VScale ()
 Matches a call to llvm.vscale().
template<typename Opnd0, typename Opnd1>
auto m_Interleave2 (const Opnd0 &Op0, const Opnd1 &Op1)
template<typename Opnd>
auto m_Deinterleave2 (const Opnd &Op)
template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::And > m_LogicalAnd (const LHS &L, const RHS &R)
 Matches L && R either in the form of L & R or L ?
auto m_LogicalAnd ()
 Matches L && R where L and R are arbitrary values.
template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::And, true > m_c_LogicalAnd (const LHS &L, const RHS &R)
 Matches L && R with LHS and RHS in either order.
template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::Or > m_LogicalOr (const LHS &L, const RHS &R)
 Matches L || R either in the form of L | R or L ?
auto m_LogicalOr ()
 Matches L || R where L and R are arbitrary values.
template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::Or, true > m_c_LogicalOr (const LHS &L, const RHS &R)
 Matches L || R with LHS and RHS in either order.
template<typename LHS, typename RHS, bool Commutable = false>
auto m_LogicalOp (const LHS &L, const RHS &R)
 Matches either L && R or L || R, either one being in the either binary or logical form.
auto m_LogicalOp ()
 Matches either L && R or L || R where L and R are arbitrary values.
template<typename LHS, typename RHS>
auto m_c_LogicalOp (const LHS &L, const RHS &R)
 Matches either L && R or L || R with LHS and RHS in either order.

Typedef Documentation

◆ cst_pred_ty

template<typename Predicate, bool AllowPoison = true>
using llvm::PatternMatch::cst_pred_ty = cstval_pred_ty<Predicate, ConstantInt, AllowPoison>

specialization of cstval_pred_ty for ConstantInt

Definition at line 389 of file PatternMatch.h.

◆ cstfp_pred_ty

template<typename Predicate>
using llvm::PatternMatch::cstfp_pred_ty
Initial value:
true>
ConstantFP - Floating Point Values [float, double].
Definition Constants.h:420
This helper class is used to match constant scalars, vector splats, and fixed width vectors that sati...

specialization of cstval_pred_ty for ConstantFP

Definition at line 393 of file PatternMatch.h.

Function Documentation

◆ m_Add()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Add > llvm::PatternMatch::m_Add ( const LHS & L,
const RHS & R )
inline

Definition at line 1173 of file PatternMatch.h.

Referenced by canonicalizeLogicFirst(), canonicalizeLowbitMask(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), canonicalizeSaturatedSubtractUnsigned(), checkForNegativeOperand(), combineAdd(), combineAddMulh(), combineShlAddIAddImpl(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::VPlanTransforms::convertEVLExitCond(), createWidenInductionRecipe(), decompose(), detectPMADDUBSW(), detectShiftUntilZeroIdiom(), dropRedundantMaskingOfLeftShiftInput(), llvm::findHistogram(), llvm::findScalarElement(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpEqConstantAndICmp(), foldAndToUsubsat(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpPow2Test(), llvm::InstCombinerImpl::foldICmpWithConstant(), foldICmpWithHighBitMask(), foldMaskedAddXorPattern(), foldMulHigh(), foldMulShl1(), foldSelectICmpMinMax(), foldSignedTruncationCheck(), llvm::VPlanTransforms::foldTailByMasking(), foldToUnsignedSaturatedAdd(), llvm::InstCombiner::getFreelyInvertedImpl(), getKnownBitsFromAndXorOr(), llvm::vputils::getSCEVExprForVPValue(), hoistSubAddAssociation(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), isKnownMonotonic(), isKnownNonPositive(), llvm::isKnownToBeAPowerOfTwo(), isMaskOrZero(), m_AddLike(), m_AnyAdd(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), matchIncrement(), matchPMADDWD(), matchPMADDWD_2(), matchPopCountBytes(), matchUAddWithOverflowConstantEdgeCases(), matchVPMADD52(), moveAddAfterMinMax(), llvm::VPlanTransforms::narrowInterleaveGroups(), optimizeBranch(), performAddTruncShiftCombine(), performLastTrueTestVectorCombine(), llvm::LoopVectorizationPlanner::selectBestEpiloguePlan(), ShouldBreakUpDistribution(), llvm::X86TargetLowering::shouldFoldSelectWithIdentityConstant(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyBranchConditionForVFAndUF(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyLogicOfAddSub(), llvm::simplifyLoopAfterUnroll(), simplifyOrOfICmpsWithAdd(), simplifyRecipe(), simplifySubInst(), trySimplifyICmpWithAdds(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitURem(), and llvm::InstCombinerImpl::visitXor().

◆ m_AddLike()

◆ m_AllOnes()

cst_pred_ty< is_all_ones > llvm::PatternMatch::m_AllOnes ( )
inline

Match an integer or vector with all bits set.

For vectors, this includes constants with undefined elements.

Definition at line 509 of file PatternMatch.h.

Referenced by areInverseVectorBitmasks(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeLowbitMask(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), canonicalizeSaturatedSubtractUnsigned(), dropRedundantMaskingOfLeftShiftInput(), FindSingleBitChange(), llvm::findValuesAffectedByCondition(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBitCast(), foldICmpOfUAddOv(), foldICmpOfVectorReduce(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpPow2Test(), foldICmpWithHighBitMask(), foldICmpWithLowBitMaskedVal(), foldMulSelectToNegate(), foldMulShl1(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldSelectICmpMinMax(), foldSelectToUSATI(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::AArch64TargetLowering::getJumpConditionMergingParams(), getKnownBitsFromAndXorOr(), getMaskedTypeForICmpPair(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineSVEVectorMlaU(), llvm::isKnownToBeAPowerOfTwo(), isMaskOrZero(), m_AllOnesOrPoison(), m_Not(), llvm::SDPatternMatch::m_Not(), llvm::maskContainsAllOneOrUndef(), matchAndCC(), matchEquivZeroRHS(), matchOrCC(), matchSelectPattern(), matchSignedNewValueCC(), matchUAddWithOverflowConstantEdgeCases(), performLastTrueTestVectorCombine(), llvm::X86TargetLowering::shouldFoldSelectWithIdentityConstant(), simplifyAddInst(), simplifyAndCommutative(), simplifyAndInst(), simplifyAShrInst(), simplifyBinaryIntrinsic(), simplifyGEPInst(), llvm::simplifyIntrinsic(), simplifyLogicalRecipe(), simplifyOrInst(), simplifyRecipe(), simplifySelectWithICmpCond(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().

◆ m_AllOnesForbidPoison()

cst_pred_ty< is_all_ones, false > llvm::PatternMatch::m_AllOnesForbidPoison ( )
inline

Definition at line 513 of file PatternMatch.h.

Referenced by m_NotForbidPoison().

◆ m_AllOnesOrPoison()

auto llvm::PatternMatch::m_AllOnesOrPoison ( )
inline

Definition at line 517 of file PatternMatch.h.

References m_AllOnes(), llvm::PatternMatchHelpers::m_CombineOr(), and m_Poison().

◆ m_AllowContract()

template<typename T>
AllowFmf_match< T, FastMathFlags::AllowContract > llvm::PatternMatch::m_AllowContract ( const T & SubPattern)
inline

Definition at line 109 of file PatternMatch.h.

References T.

◆ m_AllowReassoc()

template<typename T>
AllowFmf_match< T, FastMathFlags::AllowReassoc > llvm::PatternMatch::m_AllowReassoc ( const T & SubPattern)
inline

◆ m_AllowReciprocal()

template<typename T>
AllowFmf_match< T, FastMathFlags::AllowReciprocal > llvm::PatternMatch::m_AllowReciprocal ( const T & SubPattern)
inline

Definition at line 103 of file PatternMatch.h.

References T.

◆ m_And()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::And > llvm::PatternMatch::m_And ( const LHS & L,
const RHS & R )
inline

Definition at line 1287 of file PatternMatch.h.

Referenced by canScalarizeAccess(), checkForNegativeOperand(), collectBitParts(), combineAnd(), combineAndNotOrIntoAndNotAnd(), combineAndOnGF2P8AFFINEQBOperand(), combineAndXorSubWithBMI(), combineBTToBitOpFlag(), combineMaskBitOp(), combineNarrowableShiftedLoad(), combineOrAndToBitfieldInsert(), combineOrOfSetCCToUSUBOCarry(), combineSetCC(), combineXorToBitfieldInsert(), computeKnownBitsFromCmp(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), countToEliminateCompares(), llvm::decomposeBitTestICmp(), llvm::findValuesAffectedByCondition(), foldAddSubBoolOfMaskedVal(), foldAddToAshr(), foldAndToUsubsat(), foldAnyOrAllBitsSet(), foldBoxMultiply(), foldCopySignIdioms(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldICmpWithLowBitMaskedVal(), foldMaskedAddXorPattern(), foldMaskedMerge(), foldMulHigh(), foldNotXor(), foldOrOfInversions(), foldOrToXor(), foldSelectICmpAndAnd(), foldSelectICmpAndZeroShl(), foldSetClearBits(), foldSubCtlzNot(), foldXorToXor(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::SystemZTargetLowering::getJumpConditionMergingParams(), getMaskedTypeForICmpPair(), getShlAddShlAdd(), haveNoCommonBitsSetSpecialCases(), llvm::SelectionDAG::isKnownToBeAPowerOfTwo(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), llvm::X86TTIImpl::isProfitableToSinkOperands(), lookThroughAnd(), LowerAndToBT(), matchAndOrChain(), matchBitmaskMul(), matchLogicBlend(), matchPopCountBytes(), MatchRem(), matchZExtedSubInteger(), narrowBitOpRMW(), parseCondition(), llvm::parseWidenableBranch(), reverseZExtICmpCombine(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::simplifyInstruction(), simplifyOrInst(), simplifyOrLogic(), simplifySelectBitTest(), simplifySelectWithICmpCond(), llvm::stripNullTest(), llvm::InstCombinerImpl::takeLog2(), tryToImproveAlign(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedCttz(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ m_AnyIntegralConstant()

cst_pred_ty< is_any_apint > llvm::PatternMatch::m_AnyIntegralConstant ( )
inline

Match an integer or vector with any integral constant.

For vectors, this includes constants with undefined elements.

Definition at line 492 of file PatternMatch.h.

◆ m_AnyIntrinsic() [1/4]

auto llvm::PatternMatch::m_AnyIntrinsic ( )
inline

Matches any intrinsic call and ignore it.

Definition at line 148 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by addSaturatedDecorationToIntrinsic(), isSpvAggrPlaceholder(), requireAssignType(), and tracesToPointerAlloca().

◆ m_AnyIntrinsic() [2/4]

template<Intrinsic::ID... IntrIDs>
IntrinsicIDs_match< IntrIDs... > llvm::PatternMatch::m_AnyIntrinsic ( )
inline

Match intrinsic calls with any of the given IDs like this: m_AnyIntrinsic<Intrinsic::fptosi_sat, Intrinsic::fptoui_sat>() This is more efficient than using nested m_CombineOr with m_Intrinsic because it performs the CallInst/Function cast only once.

Definition at line 2795 of file PatternMatch.h.

◆ m_AnyIntrinsic() [3/4]

match_bind< const IntrinsicInst > llvm::PatternMatch::m_AnyIntrinsic ( const IntrinsicInst *& I)
inline

Definition at line 870 of file PatternMatch.h.

References I.

◆ m_AnyIntrinsic() [4/4]

match_bind< IntrinsicInst > llvm::PatternMatch::m_AnyIntrinsic ( IntrinsicInst *& I)
inline

Match any intrinsic call, capturing it if we match.

Definition at line 869 of file PatternMatch.h.

References I.

◆ m_AnyZeroFP()

◆ m_APFloat()

◆ m_APFloatAllowPoison()

ap_match< APFloat > llvm::PatternMatch::m_APFloatAllowPoison ( const APFloat *& Res)
inline

Match APFloat while allowing poison in splat vector constants.

Definition at line 301 of file PatternMatch.h.

Referenced by simplifyFCmpInst().

◆ m_APFloatForbidPoison()

ap_match< APFloat > llvm::PatternMatch::m_APFloatForbidPoison ( const APFloat *& Res)
inline

Match APFloat while forbidding poison in splat vector constants.

Definition at line 306 of file PatternMatch.h.

◆ m_APInt()

ap_match< APInt > llvm::PatternMatch::m_APInt ( const APInt *& Res)
inline

Match a ConstantInt or splatted ConstantVector, binding the specified pointer to the contained APInt.

Definition at line 278 of file PatternMatch.h.

Referenced by bitTrackingDCE(), canEvaluateShiftedShift(), canonicalizeAbs(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeGEPOfConstGEPI8(), canonicalizeLogicFirst(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedSubtractUnsigned(), checkForNegativeOperand(), cmpExcludesZero(), collectBitParts(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonIRemTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), computeKnownBits(), computeKnownBitsFromCmp(), computeKnownBitsFromOperator(), computeKnownFPClassFromCond(), ComputeNumSignBitsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), llvm::InstCombinerImpl::foldAddLikeCommutative(), foldAddToAshr(), llvm::InstCombinerImpl::foldAddWithConstant(), foldBitwiseLogicWithIntrinsics(), foldClampRangeOfTwo(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpEqualityWithOffset(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), llvm::InstCombinerImpl::foldICmpMulConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldICmpShlLHSC(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpUDivConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldICmpUSubSatOrUAddSatWithConstant(), llvm::InstCombinerImpl::foldICmpWithClamp(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpWithTruncSignExtendedVal(), llvm::InstCombinerImpl::foldICmpXorConstant(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldNegativePower2AndShiftedMask(), foldNoWrapAdd(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldSelectICmp(), foldSelectICmpAnd(), foldSelectICmpAndZeroShl(), llvm::InstCombinerImpl::foldSelectIntoOp(), foldSetClearBits(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftedShift(), foldToUnsignedSaturatedAdd(), foldVecExtTruncToExtElt(), getDemandedBitsLHSMask(), llvm::ConstantExpr::getExactLogBase2(), llvm::SystemZTargetLowering::getJumpConditionMergingParams(), getMaskedICmpType(), getNotValue(), getRangeForIntrinsic(), getRangeForSelectPattern(), llvm::vputils::getSCEVExprForVPValue(), getValueFromOverflowCondition(), haveNoCommonBitsSetSpecialCases(), llvm::RISCVTTIImpl::instCombineIntrinsic(), isAllocSiteRemovable(), isDivZero(), isImpliedCondICmps(), isImpliedToBeAPowerOfTwoFromCond(), llvm::isKnownInversion(), isKnownNonZeroFromOperator(), isNonEqualMul(), isNonEqualPHIs(), isNonEqualShl(), isNonZeroRecurrence(), isPoisonShift(), llvm::isSafeToSpeculativelyExecuteWithOpcode(), isSignedMinMaxClamp(), isSignedMinMaxIntrinsicClamp(), isSignificantBitCheckWellFormed(), isTruePredicate(), lookThroughAnd(), maintainNoSignedWrap(), matchAndCC(), matchAndOrChain(), matchBitmaskMul(), matchClamp(), MatchDiv(), matchICmpOperand(), matchIntPart(), matchMinMax(), MatchMul(), matchOrConcat(), matchPopCountBytes(), MatchRem(), matchZExtedSubInteger(), llvm::VPlanTransforms::materializeVectorTripCount(), moveAddAfterMinMax(), optimizeVectorInductionWidthForTCAndVFUF(), setLimitsForBinOp(), ShrinkDemandedConstant(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfICmpsWithConstants(), simplifyAndOrOfICmpsWithCtpop(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyDiv(), simplifyICmpWithBinOp(), simplifyICmpWithBinOpOnLHS(), llvm::simplifyInstruction(), llvm::simplifyIntrinsic(), simplifyIRemMulShl(), llvm::simplifyLoopAfterUnroll(), simplifyLShrInst(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedBits(), simplifyOrInst(), simplifyOrOfICmpsWithAdd(), simplifyRecipe(), simplifyRem(), simplifySelectBitTest(), simplifySelectWithICmpCond(), simplifySwitchOnSelectUsingRanges(), llvm::stripNullTest(), tryFactorization(), trySimplifyICmpWithAdds(), tryToFPToSat(), tryToImproveAlign(), tryToMatchAndCreateMulAccumulateReduction(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedCttz(), tryToRecognizeTableBasedLog2(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitXor(), and llvm::reassociate::XorOpnd::XorOpnd().

◆ m_APIntAllowPoison()

◆ m_APIntForbidPoison()

ap_match< APInt > llvm::PatternMatch::m_APIntForbidPoison ( const APInt *& Res)
inline

Match APInt while forbidding poison in splat vector constants.

Definition at line 289 of file PatternMatch.h.

◆ m_ApproxFunc()

template<typename T>
AllowFmf_match< T, FastMathFlags::ApproxFunc > llvm::PatternMatch::m_ApproxFunc ( const T & SubPattern)
inline

Definition at line 115 of file PatternMatch.h.

References T.

◆ m_Argument()

template<unsigned OpI, typename Opnd_t>
Argument_match< Opnd_t > llvm::PatternMatch::m_Argument ( const Opnd_t & Op)
inline

Match an argument.

Definition at line 2745 of file PatternMatch.h.

Referenced by llvm::PatternMatch::IntrinsicMatchImpl::impl().

◆ m_AShr()

◆ m_AShrOrSelf()

template<typename LHS>
ShiftLike_match< LHS, Instruction::AShr > llvm::PatternMatch::m_AShrOrSelf ( const LHS & L,
uint64_t & R )
inline

Matches ashr L, ConstShAmt or L itself (R will be set to zero in this case).

Definition at line 1356 of file PatternMatch.h.

◆ m_BasicBlock() [1/3]

◆ m_BasicBlock() [2/3]

match_bind< BasicBlock > llvm::PatternMatch::m_BasicBlock ( BasicBlock *& V)
inline

Match a basic block value, capturing it if we match.

Definition at line 901 of file PatternMatch.h.

◆ m_BasicBlock() [3/3]

match_bind< const BasicBlock > llvm::PatternMatch::m_BasicBlock ( const BasicBlock *& V)
inline

Definition at line 902 of file PatternMatch.h.

◆ m_BinOp() [1/5]

auto llvm::PatternMatch::m_BinOp ( )
inline

Match an arbitrary binary operation and ignore it.

Definition at line 142 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by cheapToScalarize(), combineAdd(), combineAddMulh(), combineOr(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::findHistogram(), foldAndToXor(), llvm::InstCombinerImpl::foldBinOpSelectBinOp(), foldBitCastBitwiseLogic(), foldComplexAndOrPatterns(), foldDependentIVs(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldICmpBinOp(), foldMaskedAddXorPattern(), foldMulShl1(), foldSelectBinOpIdentity(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectShuffleWith1Binop(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldShiftOfShiftedBinOp(), foldTwoEntryPHINode(), llvm::InstCombinerImpl::foldVectorBinop(), instCombineSVELast(), isInstructionPairMul(), llvm::isSplatValue(), matchesSquareSum(), matchLogicBlend(), matchRdxBop(), NegateValue(), passingValueIsAlwaysUndefined(), reassociateFCmps(), reassociateForUses(), simplifyAndInst(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitShl(), and llvm::InstCombinerImpl::visitSub().

◆ m_BinOp() [2/5]

match_bind< BinaryOperator > llvm::PatternMatch::m_BinOp ( BinaryOperator *& I)
inline

Match a binary operator, capturing it if we match.

Definition at line 864 of file PatternMatch.h.

References I.

◆ m_BinOp() [3/5]

match_bind< const BinaryOperator > llvm::PatternMatch::m_BinOp ( const BinaryOperator *& I)
inline

Definition at line 865 of file PatternMatch.h.

References I.

◆ m_BinOp() [4/5]

template<typename LHS, typename RHS>
AnyBinaryOp_match< LHS, RHS > llvm::PatternMatch::m_BinOp ( const LHS & L,
const RHS & R )
inline

Definition at line 1119 of file PatternMatch.h.

◆ m_BinOp() [5/5]

template<typename LHS, typename RHS>
SpecificBinaryOp_match< LHS, RHS > llvm::PatternMatch::m_BinOp ( unsigned Opcode,
const LHS & L,
const RHS & R )
inline

Matches a specific opcode.

Definition at line 1487 of file PatternMatch.h.

◆ m_BitCast()

◆ m_BitReverse()

template<typename Opnd0>
auto llvm::PatternMatch::m_BitReverse ( const Opnd0 & Op0)
inline

◆ m_BitwiseLogic()

template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_bitwiselogic_op > llvm::PatternMatch::m_BitwiseLogic ( const LHS & L,
const RHS & R )
inline

Matches bitwise logic operations.

Definition at line 1658 of file PatternMatch.h.

Referenced by combineCastedMaskArithmetic(), combineMaskBitOp(), foldBitOrderCrossLogicOp(), and foldBitOrderCrossLogicOp().

◆ m_Br() [1/2]

◆ m_Br() [2/2]

template<typename Cond_t, typename TrueBlock_t, typename FalseBlock_t>
brc_match< Cond_t, TrueBlock_t, FalseBlock_t > llvm::PatternMatch::m_Br ( const Cond_t & C,
const TrueBlock_t & T,
const FalseBlock_t & F )
inline

Definition at line 2480 of file PatternMatch.h.

References llvm::CallingConv::C, F, and T.

◆ m_BSwap()

template<typename Opnd0>
auto llvm::PatternMatch::m_BSwap ( const Opnd0 & Op0)
inline

◆ m_c_Add()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Add, true > llvm::PatternMatch::m_c_Add ( const LHS & L,
const RHS & R )
inline

Matches a Add with LHS and RHS in either order.

Definition at line 2977 of file PatternMatch.h.

Referenced by canonicalizeAbs(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), combineAddSubWithShlAddSub(), llvm::VPlanTransforms::convertEVLExitCond(), llvm::VPlanTransforms::convertToVariableLengthStep(), detectShiftUntilZeroIdiom(), llvm::vputils::findCanonicalIVIncrement(), fixupVFUsersForEVL(), llvm::InstCombinerImpl::foldAddLikeCommutative(), foldBoxMultiply(), llvm::InstCombinerImpl::foldDivCeil(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldMulHigh(), foldSubOfMinMax(), foldToUnsignedSaturatedAdd(), foldUnsignedUnderflowCheck(), getKnownBitsFromAndXorOr(), getOptimizableIVOf(), hoistSubAddAssociation(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEPairwiseAddLong(), isConditionTrueViaVFAndUF(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), isImpliedCondICmps(), isTruePredicate(), matchAddCC(), matchesAdd(), matchPopCountBytes(), simplifyBranchConditionForVFAndUF(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpWithIntrinsicOnLHS(), simplifyOrInst(), simplifyRecipe(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLShr(), and llvm::InstCombinerImpl::visitSub().

◆ m_c_And()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::And, true > llvm::PatternMatch::m_c_And ( const LHS & L,
const RHS & R )
inline

◆ m_c_BinOp() [1/2]

◆ m_c_BinOp() [2/2]

template<typename LHS, typename RHS>
SpecificBinaryOp_match< LHS, RHS, true > llvm::PatternMatch::m_c_BinOp ( unsigned Opcode,
const LHS & L,
const RHS & R )
inline

Matches a specific opcode with LHS and RHS in either order.

Definition at line 2971 of file PatternMatch.h.

◆ m_c_BitwiseLogic()

template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_bitwiselogic_op, true > llvm::PatternMatch::m_c_BitwiseLogic ( const LHS & L,
const RHS & R )
inline

Matches bitwise logic operations in either order.

Definition at line 1665 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::visitSExt(), and llvm::InstCombinerImpl::visitZExt().

◆ m_c_DisjointOr()

template<typename LHS, typename RHS>
DisjointOr_match< LHS, RHS, true > llvm::PatternMatch::m_c_DisjointOr ( const LHS & L,
const RHS & R )
inline

◆ m_c_FAdd()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FAdd, true > llvm::PatternMatch::m_c_FAdd ( const LHS & L,
const RHS & R )
inline

Matches FAdd with LHS and RHS in either order.

Definition at line 3078 of file PatternMatch.h.

Referenced by factorizeLerp(), getOptimizableIVOf(), simplifyFSubInst(), llvm::InstCombinerImpl::visitFAdd(), and llvm::InstCombinerImpl::visitFSub().

◆ m_c_FMul()

◆ m_c_ICmp() [1/2]

◆ m_c_ICmp() [2/2]

template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInst, true > llvm::PatternMatch::m_c_ICmp ( const LHS & L,
const RHS & R )
inline

Definition at line 2963 of file PatternMatch.h.

◆ m_c_Intrinsic()

template<Intrinsic::ID IntrID, typename T0, typename T1>
CommutativeBinaryIntrinsic_match< IntrID, T0, T1 > llvm::PatternMatch::m_c_Intrinsic ( const T0 & Op0,
const T1 & Op1 )
inline

◆ m_c_LogicalAnd()

template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::And, true > llvm::PatternMatch::m_c_LogicalAnd ( const LHS & L,
const RHS & R )
inline

◆ m_c_LogicalOp()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_LogicalOp ( const LHS & L,
const RHS & R )
inline

Matches either L && R or L || R with LHS and RHS in either order.

Definition at line 3292 of file PatternMatch.h.

References m_LogicalOp().

◆ m_c_LogicalOr()

template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::Or, true > llvm::PatternMatch::m_c_LogicalOr ( const LHS & L,
const RHS & R )
inline

Matches L || R with LHS and RHS in either order.

Definition at line 3273 of file PatternMatch.h.

Referenced by llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), simplifyOrLogic(), and simplifySelectInst().

◆ m_c_MaxOrMin()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_MaxOrMin ( const LHS & L,
const RHS & R )
inline

◆ m_c_Mul()

◆ m_c_NSWAdd()

template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap, true > llvm::PatternMatch::m_c_NSWAdd ( const LHS & L,
const RHS & R )
inline

◆ m_c_NUWAdd()

template<typename LHS, typename RHS>
OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap, true > llvm::PatternMatch::m_c_NUWAdd ( const LHS & L,
const RHS & R )
inline

◆ m_c_Or()

◆ m_c_Select()

template<typename LHS, typename RHS>
ThreeOps_match< decltype(m_Value()), LHS, RHS, Instruction::Select, true > llvm::PatternMatch::m_c_Select ( const LHS & L,
const RHS & R )
inline

◆ m_c_SMax()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_SMax ( const LHS & L,
const RHS & R )
inline

Matches an SMax with LHS and RHS in either order.

Definition at line 3055 of file PatternMatch.h.

References m_c_Intrinsic().

Referenced by isTruePredicate(), m_c_MaxOrMin(), and llvm::InstCombinerImpl::visitSub().

◆ m_c_SMin()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_SMin ( const LHS & L,
const RHS & R )
inline

Matches an SMin with LHS and RHS in either order.

Definition at line 3050 of file PatternMatch.h.

References m_c_Intrinsic().

Referenced by computeKnownBitsAddSub(), isTruePredicate(), m_c_MaxOrMin(), and llvm::InstCombinerImpl::visitSub().

◆ m_c_SpecificICmp()

template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, ICmpInst, true > llvm::PatternMatch::m_c_SpecificICmp ( CmpPredicate MatchPred,
const LHS & L,
const RHS & R )
inline

Definition at line 1814 of file PatternMatch.h.

◆ m_c_UMax()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_UMax ( const LHS & L,
const RHS & R )
inline

Matches a UMax with LHS and RHS in either order.

Definition at line 3065 of file PatternMatch.h.

References m_c_Intrinsic().

Referenced by isTruePredicate(), m_c_MaxOrMin(), and llvm::InstCombinerImpl::visitSub().

◆ m_c_UMin()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_UMin ( const LHS & L,
const RHS & R )
inline

Matches a UMin with LHS and RHS in either order.

Definition at line 3060 of file PatternMatch.h.

References m_c_Intrinsic().

Referenced by foldToUnsignedSaturatedAdd(), isTruePredicate(), m_c_MaxOrMin(), and llvm::InstCombinerImpl::visitSub().

◆ m_c_Xor()

◆ m_c_XorLike()

template<typename LHS, typename RHS>
auto llvm::PatternMatch::m_c_XorLike ( const LHS & L,
const RHS & R )
inline

Match either (xor L, R), (xor R, L) or (sub nuw R, L) iff R.isMask() Only commutative matcher as the sub will need to swap the L and R.

Definition at line 1575 of file PatternMatch.h.

◆ m_CastOrSelf()

template<typename OpTy>
match_combine_or< CastInst_match< OpTy, CastInst >, OpTy > llvm::PatternMatch::m_CastOrSelf ( const OpTy & Op)
inline

Matches any cast or self. Used to ignore casts.

Definition at line 2228 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr().

Referenced by tryToRecognizeTableBasedCttz(), and tryToRecognizeTableBasedLog2().

◆ m_CheckedFp() [1/2]

cstfp_pred_ty< custom_checkfn< APFloat > > llvm::PatternMatch::m_CheckedFp ( const Constant *& V,
function_ref< bool(const APFloat &)> CheckFn )
inline

Definition at line 483 of file PatternMatch.h.

◆ m_CheckedFp() [2/2]

cstfp_pred_ty< custom_checkfn< APFloat > > llvm::PatternMatch::m_CheckedFp ( function_ref< bool(const APFloat &)> CheckFn)
inline

Match a float or vector where CheckFn(ele) for each element is true.

For vectors, poison elements are assumed to match.

Definition at line 478 of file PatternMatch.h.

Referenced by llvm::isKnownIntegral().

◆ m_CheckedInt() [1/2]

cst_pred_ty< custom_checkfn< APInt > > llvm::PatternMatch::m_CheckedInt ( const Constant *& V,
function_ref< bool(const APInt &)> CheckFn )
inline

Definition at line 471 of file PatternMatch.h.

◆ m_CheckedInt() [2/2]

cst_pred_ty< custom_checkfn< APInt > > llvm::PatternMatch::m_CheckedInt ( function_ref< bool(const APInt &)> CheckFn)
inline

Match an integer or vector where CheckFn(ele) for each element is true.

For vectors, poison elements are assumed to match.

Definition at line 466 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldICmpCommutative(), foldMinimumOverTrailingOrLeadingZeroCount(), simplifyRem(), and llvm::InstCombinerImpl::visitMul().

◆ m_Cmp() [1/3]

◆ m_Cmp() [2/3]

template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, CmpInst > llvm::PatternMatch::m_Cmp ( CmpPredicate & Pred,
const LHS & L,
const RHS & R )
inline

Definition at line 1739 of file PatternMatch.h.

◆ m_Cmp() [3/3]

template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, CmpInst > llvm::PatternMatch::m_Cmp ( const LHS & L,
const RHS & R )
inline

Definition at line 1757 of file PatternMatch.h.

◆ m_Constant() [1/2]

auto llvm::PatternMatch::m_Constant ( )
inline

Match an arbitrary Constant and ignore it.

Definition at line 177 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), llvm::findScalarElement(), llvm::findValuesAffectedByCondition(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpsWithConstEq(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), foldBitCastBitwiseLogic(), llvm::InstCombinerImpl::foldCmpSelectOfConstants(), foldConstantInsEltIntoShuffle(), foldFDivConstantDividend(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFNegIntoConstant(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpEquality(), foldNoWrapAdd(), foldSelectBinOpIdentity(), foldSelectGEP(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectShuffleWith1Binop(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldSignBitTest(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), getNegatibleInsts(), hoistInsEltConst(), llvm::ARMTTIImpl::instCombineIntrinsic(), lookThroughCastConst(), matchIncrement(), matchSubIntegerPackFromVector(), narrowUDivURem(), NegateValue(), recordCondition(), llvm::TargetTransformInfoImplBase::shouldTreatInstructionLikeSelect(), simplifyAssocCastAssoc(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), simplifyLogicOfAddSub(), simplifySelectInst(), simplifyShuffleVectorInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFSub(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ m_Constant() [2/2]

match_bind< Constant > llvm::PatternMatch::m_Constant ( Constant *& C)
inline

Match a Constant, capturing the value if we match.

Definition at line 889 of file PatternMatch.h.

References llvm::CallingConv::C.

◆ m_ConstantExpr() [1/2]

auto llvm::PatternMatch::m_ConstantExpr ( )
inline

◆ m_ConstantExpr() [2/2]

match_bind< ConstantExpr > llvm::PatternMatch::m_ConstantExpr ( ConstantExpr *& C)
inline

Match a ConstantExpr, capturing the value if we match.

Definition at line 898 of file PatternMatch.h.

References llvm::CallingConv::C.

◆ m_ConstantFP() [1/2]

auto llvm::PatternMatch::m_ConstantFP ( )
inline

Match an arbitrary ConstantFP and ignore it.

Definition at line 183 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), and matchFPExtFromF16().

◆ m_ConstantFP() [2/2]

match_bind< ConstantFP > llvm::PatternMatch::m_ConstantFP ( ConstantFP *& C)
inline

Match a ConstantFP, capturing the value if we match.

Definition at line 895 of file PatternMatch.h.

References llvm::CallingConv::C.

◆ m_ConstantInt() [1/4]

auto llvm::PatternMatch::m_ConstantInt ( )
inline

Match an arbitrary ConstantInt and ignore it.

Definition at line 180 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by annotateNonNullAndDereferenceable(), llvm::VPIntrinsic::canIgnoreVectorLengthParam(), canonicalizeInsertSplat(), canScalarizeAccess(), cheapToScalarize(), llvm::InstCombinerImpl::commonShiftTransforms(), computeKnownBitsFromCmp(), computeKnownFPClassFromCond(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), decompose(), llvm::findScalarElement(), llvm::findValuesAffectedByCondition(), foldConstantInsEltIntoShuffle(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpWithConstant(), foldInsEltIntoIdentityShuffle(), foldInsEltIntoSplat(), foldShuffleWithInsert(), foldTruncInsEltPair(), foldVecExtTruncToExtElt(), foldVecTruncToExtElt(), getKnownTypeFromMaskedOp(), llvm::vputils::getSCEVExprForVPValue(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), hoistInsEltConst(), llvm::RISCVTTIImpl::instCombineIntrinsic(), isLoopNeverExecuted(), isMultipleOfN(), isOperandOfVmullHighP64(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), isSSATMinMaxPattern(), isThreadID(), m_SelectCst(), llvm::PatternMatch::ShiftLike_match< LHS_t, Opcode >::match(), matchesAdd(), matchesOr(), matchSubIntegerPackFromVector(), llvm::InstCombinerImpl::matchThreeWayIntCompare(), matchZExtedSubInteger(), shouldCanonicalizeGEPToPtrAdd(), shouldSinkVScale(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyGEPInst(), simplifyRecipe(), simplifyShiftSelectingPackedElement(), simplifyShuffleVectorInst(), simplifySwitchWhenUMin(), tryToReplaceALMWithWideALM(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSwitchInst(), and llvm::InstCombinerImpl::visitXor().

◆ m_ConstantInt() [2/4]

template<int64_t Val>
constantint_match< Val > llvm::PatternMatch::m_ConstantInt ( )
inline

Match a ConstantInt with a specific value.

Definition at line 326 of file PatternMatch.h.

◆ m_ConstantInt() [3/4]

match_bind< ConstantInt > llvm::PatternMatch::m_ConstantInt ( ConstantInt *& CI)
inline

Match a ConstantInt, capturing the value if we match.

Definition at line 892 of file PatternMatch.h.

◆ m_ConstantInt() [4/4]

bind_const_intval_ty llvm::PatternMatch::m_ConstantInt ( uint64_t & V)
inline

Match a ConstantInt and bind to its value.

This does not match ConstantInts wider than 64-bits.

Definition at line 1069 of file PatternMatch.h.

◆ m_ConstantSplat()

template<typename T>
Splat_match< T > llvm::PatternMatch::m_ConstantSplat ( const T & SubPattern)
inline

Match a constant splat. TODO: Extend this to non-constant splats.

Definition at line 228 of file PatternMatch.h.

References T.

Referenced by llvm::InstCombinerImpl::foldVectorBinop().

◆ m_ContainsMatchingVectorElement()

template<typename SPTy>
ContainsMatchingVectorElement_match< SPTy > llvm::PatternMatch::m_ContainsMatchingVectorElement ( const SPTy & SubPattern)
inline

Match a vector constant where at least one of its elements matches the subpattern.

Scalable vector constants are not matched. Any bindings in the subpattern will be bound to the first match.

Definition at line 201 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::commonIDivRemTransforms(), m_ConstantExpr(), llvm::maskContainsAllOneOrUndef(), and llvm::InstCombinerImpl::visitFreeze().

◆ m_CopySign()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_CopySign ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

◆ m_Ctlz()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_Ctlz ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

◆ m_Ctpop()

◆ m_Cttz()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_Cttz ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

◆ m_Deferred() [1/4]

match_deferred< BasicBlock > llvm::PatternMatch::m_Deferred ( BasicBlock *const & BB)
inline

A commutative-friendly version of m_Specific().

Definition at line 1089 of file PatternMatch.h.

◆ m_Deferred() [2/4]

match_deferred< const BasicBlock > llvm::PatternMatch::m_Deferred ( const BasicBlock *const & BB)
inline

Definition at line 1093 of file PatternMatch.h.

◆ m_Deferred() [3/4]

match_deferred< const Value > llvm::PatternMatch::m_Deferred ( const Value *const & V)
inline

Definition at line 971 of file PatternMatch.h.

◆ m_Deferred() [4/4]

match_deferred< Value > llvm::PatternMatch::m_Deferred ( Value *const & V)
inline

Like m_Specific(), but works if the specific value to match is determined as part of the same match() expression.

For example: m_Add(m_Value(X), m_Specific(X)) is incorrect, because m_Specific() will bind X before the pattern match starts. m_Add(m_Value(X), m_Deferred(X)) is correct, and will check against whichever value m_Value(X) populated.

Definition at line 970 of file PatternMatch.h.

Referenced by combineAddMulh(), combineAndXorSubWithBMI(), combineBasicSADPattern(), combineOrOfSetCCToUSUBOCarry(), combineXorToBitfieldInsert(), llvm::VPlanTransforms::convertEVLExitCond(), dropRedundantMaskingOfLeftShiftInput(), factorizeLerp(), foldAndToUsubsat(), foldAndToXor(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldDivCeil(), llvm::InstCombinerImpl::foldFMulReassoc(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpPow2Test(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldICmpWithTruncSignExtendedVal(), foldICmpXNegX(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldMaskedAddXorPattern(), foldMaskedMerge(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldPowiReassoc(), foldToUnsignedSaturatedAdd(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), foldXorToXor(), getKnownBitsFromAndXorOr(), llvm::AMDGPUTargetMachine::getPredicatedAddrSpace(), haveNoCommonBitsSetSpecialCases(), isAbsoluteValueULEOne(), llvm::SelectionDAG::isKnownToBeAPowerOfTwo(), isMaskOrZero(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), matchesSquareSum(), matchExpandedRem(), matchLogicBlend(), matchPopCountBytes(), narrowBitOpRMW(), PerformSELECTShiftCombine(), simplifyAndInst(), simplifyCastInst(), llvm::TargetLowering::SimplifyDemandedBits(), simplifyLogicalRecipe(), simplifyRecipe(), simplifySelectWithICmpCond(), llvm::stripNullTest(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedCttz(), tryToRecognizeTableBasedLog2(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitXor().

◆ m_Deinterleave2()

template<typename Opnd>
auto llvm::PatternMatch::m_Deinterleave2 ( const Opnd & Op)
inline

Definition at line 3190 of file PatternMatch.h.

References m_Intrinsic().

◆ m_DisjointOr()

◆ m_ElementWiseBitCast()

◆ m_Exact()

template<typename T>
Exact_match< T > llvm::PatternMatch::m_Exact ( const T & SubPattern)
inline

◆ m_ExtractElt()

◆ m_ExtractValue() [1/2]

◆ m_ExtractValue() [2/2]

template<typename Val_t>
ExtractValue_match<-1, Val_t > llvm::PatternMatch::m_ExtractValue ( const Val_t & V)
inline

Match an ExtractValue instruction with any index.

For example m_ExtractValue(...)

Definition at line 3155 of file PatternMatch.h.

◆ m_FAbs()

◆ m_FAdd()

◆ m_FCanonicalize()

template<typename Opnd0>
auto llvm::PatternMatch::m_FCanonicalize ( const Opnd0 & Op0)
inline

Definition at line 2835 of file PatternMatch.h.

References m_Intrinsic().

◆ m_FCmp() [1/2]

◆ m_FCmp() [2/2]

template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, FCmpInst > llvm::PatternMatch::m_FCmp ( const LHS & L,
const RHS & R )
inline

Definition at line 1767 of file PatternMatch.h.

◆ m_FDiv()

◆ m_Finite() [1/2]

cstfp_pred_ty< is_finite > llvm::PatternMatch::m_Finite ( )
inline

Match a finite FP constant, i.e.

not infinity or NaN. For vectors, this includes constants with undefined elements.

Definition at line 760 of file PatternMatch.h.

Referenced by computeKnownExponentRangeFromContext().

◆ m_Finite() [2/2]

apf_pred_ty< is_finite > llvm::PatternMatch::m_Finite ( const APFloat *& V)
inline

Definition at line 763 of file PatternMatch.h.

◆ m_FiniteNonZero() [1/2]

cstfp_pred_ty< is_finitenonzero > llvm::PatternMatch::m_FiniteNonZero ( )
inline

Match a finite non-zero FP constant.

For vectors, this includes constants with undefined elements.

Definition at line 770 of file PatternMatch.h.

Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), and foldFCmpFAbsFSubIntToFP().

◆ m_FiniteNonZero() [2/2]

apf_pred_ty< is_finitenonzero > llvm::PatternMatch::m_FiniteNonZero ( const APFloat *& V)
inline

Definition at line 773 of file PatternMatch.h.

◆ m_FMaximum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMaximum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2896 of file PatternMatch.h.

References m_Intrinsic().

Referenced by getMinMaxRecurrence(), and matchRdxBop().

◆ m_FMaximumNum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMaximumNum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2901 of file PatternMatch.h.

References m_Intrinsic().

Referenced by m_FMaxNum_or_FMaximumNum().

◆ m_FMaxNum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMaxNum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2891 of file PatternMatch.h.

References m_Intrinsic().

Referenced by m_FMaxNum_or_FMaximumNum(), matchFastFloatClamp(), and matchRdxBop().

◆ m_FMaxNum_or_FMaximumNum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMaxNum_or_FMaximumNum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2906 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr(), m_FMaximumNum(), and m_FMaxNum().

Referenced by simplifyFCmpInst().

◆ m_FMinimum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMinimum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2881 of file PatternMatch.h.

References m_Intrinsic().

Referenced by getMinMaxRecurrence(), and matchRdxBop().

◆ m_FMinimumNum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMinimumNum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2886 of file PatternMatch.h.

References m_Intrinsic().

Referenced by m_FMinNum_or_FMinimumNum().

◆ m_FMinNum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMinNum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2876 of file PatternMatch.h.

References m_Intrinsic().

Referenced by m_FMinNum_or_FMinimumNum(), matchFastFloatClamp(), and matchRdxBop().

◆ m_FMinNum_or_FMinimumNum()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_FMinNum_or_FMinimumNum ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 2911 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr(), m_FMinimumNum(), and m_FMinNum().

Referenced by simplifyFCmpInst().

◆ m_FMul()

◆ m_FNeg()

◆ m_FNegNSZ()

template<typename RHS>
BinaryOp_match< cstfp_pred_ty< is_any_zero_fp >, RHS, Instruction::FSub > llvm::PatternMatch::m_FNegNSZ ( const RHS & X)
inline

Match 'fneg X' as 'fsub +-0.0, X'.

Definition at line 1234 of file PatternMatch.h.

References m_AnyZeroFP(), m_FSub(), and X.

Referenced by simplifyFDivInst().

◆ m_FPExt()

◆ m_FPOne()

specific_fpval llvm::PatternMatch::m_FPOne ( )
inline

Match a float 1.0 or vector with all elements equal to 1.0.

Definition at line 998 of file PatternMatch.h.

References m_SpecificFP().

Referenced by factorizeLerp(), llvm::GCNTTIImpl::getArithmeticInstrCost(), getFSqrtDivOptPattern(), simplifyFDivInst(), simplifyFMAFMul(), and llvm::InstCombinerImpl::visitFMul().

◆ m_FPToI()

template<typename OpTy>
match_combine_or< CastInst_match< OpTy, FPToUIInst >, CastInst_match< OpTy, FPToSIInst > > llvm::PatternMatch::m_FPToI ( const OpTy & Op)
inline

◆ m_FPToSI()

template<typename OpTy>
CastInst_match< OpTy, FPToSIInst > llvm::PatternMatch::m_FPToSI ( const OpTy & Op)
inline

◆ m_FPToUI()

template<typename OpTy>
CastInst_match< OpTy, FPToUIInst > llvm::PatternMatch::m_FPToUI ( const OpTy & Op)
inline

Definition at line 2408 of file PatternMatch.h.

Referenced by m_FPToI().

◆ m_FPTrunc()

template<typename OpTy>
CastInst_match< OpTy, FPTruncInst > llvm::PatternMatch::m_FPTrunc ( const OpTy & Op)
inline

◆ m_Freeze()

template<typename OpTy>
OneOps_match< OpTy, Instruction::Freeze > llvm::PatternMatch::m_Freeze ( const OpTy & Op)
inline

Matches FreezeInst.

Definition at line 1942 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::visitFreeze().

◆ m_FRem()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::FRem > llvm::PatternMatch::m_FRem ( const LHS & L,
const RHS & R )
inline

Definition at line 1281 of file PatternMatch.h.

◆ m_FShl()

template<typename Opnd0, typename Opnd1, typename Opnd2>
auto llvm::PatternMatch::m_FShl ( const Opnd0 & Op0,
const Opnd1 & Op1,
const Opnd2 & Op2 )
inline

◆ m_FShr()

template<typename Opnd0, typename Opnd1, typename Opnd2>
auto llvm::PatternMatch::m_FShr ( const Opnd0 & Op0,
const Opnd1 & Op1,
const Opnd2 & Op2 )
inline

◆ m_FSub()

◆ m_GEP()

template<typename... OperandTypes>
auto llvm::PatternMatch::m_GEP ( const OperandTypes &... Ops)
inline

Matches GetElementPtrInst.

Definition at line 2077 of file PatternMatch.h.

References AbstractManglingParser< Derived, Alloc >::Ops.

Referenced by foldDependentIVs(), and processUse().

◆ m_ICmp() [1/2]

template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInst > llvm::PatternMatch::m_ICmp ( CmpPredicate & Pred,
const LHS & L,
const RHS & R )
inline

Definition at line 1745 of file PatternMatch.h.

Referenced by analyzeICmp(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), llvm::canPeelLastIteration(), checkOrAndOpImpliedByOther(), collectUnswitchCandidatesWithInjections(), computeKnownFPClassFromCond(), countToEliminateCompares(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), llvm::findValuesAffectedByCondition(), foldAddToAshr(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfICmpsWithPow2AndWithZero(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpOrChain(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldIsPowerOf2OrZero(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldReductionIdiom(), foldSelectICmpAndZeroShl(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSelectSplitCTLZCTTZ(), foldSelectZeroOrFixedOp(), llvm::InstCombinerImpl::foldSignBitTest(), foldUnsignedUnderflowCheck(), getAppleRuntimeUnrollPreferences(), getRecipesForUncountableExit(), llvm::SCEVExpander::hasRelatedExistingExpansion(), hoistAddSub(), hoistMinMax(), llvm::isCheckForZeroAndMulWithOverflow(), isImpliedToBeAPowerOfTwoFromCond(), llvm::isKnownInversion(), llvm::isOnlyUsedInZeroComparison(), isProcessableCondBI(), isSignificantBitCheckWellFormed(), llvm::PatternMatch::ICmpLike_match< LHS_t, RHS_t >::match(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), matchAndCC(), matchOrCC(), matchSelectWithOptionalNotCond(), llvm::InstCombinerImpl::matchThreeWayIntCompare(), optimizeVectorInductionWidthForTCAndVFUF(), recordCondition(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfICmpsWithCtpop(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyOrOfICmpsWithAdd(), simplifySelectWithICmpCond(), simplifySwitchOnSelectUsingRanges(), simplifyUnsignedRangeCheck(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToMoveFreeBeforeNullTest(), llvm::InstCombinerImpl::visitAdd(), and llvm::InstCombinerImpl::visitOr().

◆ m_ICmp() [2/2]

template<typename LHS, typename RHS>
CmpClass_match< LHS, RHS, ICmpInst > llvm::PatternMatch::m_ICmp ( const LHS & L,
const RHS & R )
inline

Definition at line 1762 of file PatternMatch.h.

◆ m_ICmpLike()

template<typename LHS, typename RHS>
ICmpLike_match< LHS, RHS > llvm::PatternMatch::m_ICmpLike ( CmpPredicate & Pred,
const LHS & L,
const RHS & R )
inline

◆ m_IDiv()

template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_idiv_op > llvm::PatternMatch::m_IDiv ( const LHS & L,
const RHS & R )
inline

◆ m_ImmConstant() [1/2]

match_immconstant_ty llvm::PatternMatch::m_ImmConstant ( )
inline

Match an arbitrary immediate Constant and ignore it.

Definition at line 931 of file PatternMatch.h.

Referenced by AddParamAndFnBasicAttributes(), llvm::collectPossibleValues(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldBinOpSelectBinOp(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpEqualityWithOffset(), foldICmpIntrinsicWithIntrinsic(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), foldMaskedAddXorPattern(), llvm::InstCombinerImpl::foldReversedIntrinsicOperands(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldShuffledIntrinsicOperands(), foldTwoEntryPHINode(), foldURemOfLoopIncrement(), llvm::InstCombinerImpl::foldVectorBinop(), getAlternateBinop(), getBinOpsForFactorization(), llvm::InstCombiner::getFreelyInvertedImpl(), isImpliedCondFCmps(), isImpliedCondICmps(), reassociateMinMaxWithConstantInOperand(), reassociateMinMaxWithConstants(), ShouldBreakUpDistribution(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpInst(), simplifyTernarylogic(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitStoreInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitXor().

◆ m_ImmConstant() [2/2]

bind_immconstant_ty llvm::PatternMatch::m_ImmConstant ( Constant *& C)
inline

Match an immediate Constant, capturing the value if we match.

Definition at line 948 of file PatternMatch.h.

References llvm::CallingConv::C.

◆ m_Inf()

cstfp_pred_ty< is_inf > llvm::PatternMatch::m_Inf ( )
inline

Match a positive or negative infinity FP constant.

For vectors, this includes constants with undefined elements.

Definition at line 726 of file PatternMatch.h.

Referenced by matchUnorderedInfCompare(), simplifyFAddInst(), simplifyFPOp(), and simplifyFSubInst().

◆ m_InsertElt()

◆ m_InsertValue()

template<int Ind, typename Val_t, typename Elt_t>
InsertValue_match< Ind, Val_t, Elt_t > llvm::PatternMatch::m_InsertValue ( const Val_t & Val,
const Elt_t & Elt )
inline

Matches a single index InsertValue instruction.

Definition at line 3177 of file PatternMatch.h.

◆ m_Instruction() [1/4]

match_bind< const Instruction > llvm::PatternMatch::m_Instruction ( const Instruction *& I)
inline

Definition at line 844 of file PatternMatch.h.

References I.

◆ m_Instruction() [2/4]

template<typename Pattern>
auto llvm::PatternMatch::m_Instruction ( const Instruction *& I,
const Pattern & P )
inline

Definition at line 854 of file PatternMatch.h.

References I, llvm::PatternMatchHelpers::m_CombineAnd(), and P.

◆ m_Instruction() [3/4]

match_bind< Instruction > llvm::PatternMatch::m_Instruction ( Instruction *& I)
inline

Match an instruction, capturing it if we match.

Definition at line 843 of file PatternMatch.h.

References I.

Referenced by analyzeCostOfVecReduction(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), llvm::InstCombinerImpl::commonShiftTransforms(), computeKnownBitsFromLerpPattern(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), detectShiftUntilZeroIdiom(), llvm::findHistogram(), foldFNegIntoConstant(), foldICmpInvariantGroup(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldLoadsRecursive(), foldMulHigh(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldSelectGEP(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstCombinerImpl::foldSignBitTest(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), getAppleRuntimeUnrollPreferences(), getNegatibleInsts(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::SCEVExpander::hasRelatedExistingExpansion(), hoistSubAddAssociation(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), isSignificantBitCheckWellFormed(), LinearizeExprTree(), lookThroughAnd(), RecurrenceInfo::matchConditionalRecurrence(), matchExpandedRem(), matchIncrement(), matchSubIntegerPackFromVector(), reassociateMinMaxWithConstantInOperand(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), and llvm::InstCombinerImpl::visitOr().

◆ m_Instruction() [4/4]

template<typename Pattern>
auto llvm::PatternMatch::m_Instruction ( Instruction *& I,
const Pattern & P )
inline

Match against the nested pattern, and capture the instruction if we match.

Definition at line 850 of file PatternMatch.h.

References I, llvm::PatternMatchHelpers::m_CombineAnd(), and P.

◆ m_Interleave2()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_Interleave2 ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

Definition at line 3186 of file PatternMatch.h.

References m_Intrinsic().

◆ m_Intrinsic()

template<Intrinsic::ID IntrID, typename... Ts>
auto llvm::PatternMatch::m_Intrinsic ( const Ts &... Ops)
inline

Match intrinsic calls like this: m_Intrinsic<Intrinsic::fabs>(m_Value(X))

Definition at line 2785 of file PatternMatch.h.

References AbstractManglingParser< Derived, Alloc >::Ops, and llvm::PatternMatch::IntrinsicMatchImpl::impl().

Referenced by llvm::AliasSetTracker::add(), cannotHoistOrSinkRecipe(), llvm::vputils::cannotHoistOrSinkRecipe(), llvm::canSinkOrHoistInst(), cheapToScalarize(), llvm::collectEphemeralRecipesForVPlan(), llvm::computeConstantRange(), computeKnownFPClassFromCond(), computeShapeInfoForInst(), llvm::findValuesAffectedByCondition(), foldBitOrderCrossLogicOp(), foldCttzCtlz(), foldFCmpWithFloorAndCeil(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), foldICmpOfUAddOv(), foldICmpOfVectorReduce(), foldMinimumOverTrailingOrLeadingZeroCount(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldPowiReassoc(), foldSpliceBinOp(), llvm::InstCombinerImpl::foldVectorBinop(), getBundleFromUse(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), llvm::ARMTTIImpl::getGatherScatterOpCost(), getKnownTypeFromMaskedOp(), getMinMaxRecurrence(), llvm::AMDGPUTargetMachine::getPredicatedAddrSpace(), llvm::vputils::getSCEVExprForVPValue(), getUnsignedMonotonicValues(), llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleMultiUseReductions(), hasRequiredFastMathFlags(), llvm::hoistRegion(), INITIALIZE_PASS(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::RISCVTTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), instCombineSVEDup(), instCombineSVEDupqLane(), instCombineSVESrshl(), instCombineSVEUzp1(), instCombineSVEVectorFuseMulAddSub(), instCombineSVEZip(), isAbsoluteValueULEOne(), isAllActivePredicate(), isAMXCast(), llvm::isCheckForZeroAndMulWithOverflow(), isDeadRecipe(), llvm::isGuard(), llvm::isGuardAsWidenableBranch(), llvm::ConstantPtrAuth::isKnownCompatibleWith(), isPTruePromoted(), llvm::MemoryWriteTracking::isSpecialInstruction(), isThreadID(), llvm::isWidenableCondition(), m_BitReverse(), m_BSwap(), m_CopySign(), m_Ctlz(), m_Ctpop(), m_Cttz(), m_Deinterleave2(), m_FAbs(), m_FCanonicalize(), m_FMaximum(), m_FMaximumNum(), m_FMaxNum(), m_FMinimum(), m_FMinimumNum(), m_FMinNum(), m_FShl(), m_FShr(), m_Interleave2(), m_MaskedGather(), m_MaskedLoad(), m_MaskedStore(), m_SMax(), m_SMin(), m_Sqrt(), m_UMax(), m_UMin(), m_VecReverse(), m_VectorInsert(), m_VScale(), matchIncrement(), matchRdxBop(), matchStridedStart(), llvm::VPlanTransforms::optimizeEVLMasks(), optimizeMaskToEVL(), llvm::parseWidenableBranch(), processLoop(), processUse(), llvm::AssumptionCache::registerAssumption(), llvm::DropUnnecessaryAssumesPass::run(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyExtractValueInst(), llvm::simplifyIntrinsic(), simplifyOrInst(), simplifyRecipe(), simplifySelectWithICmpCond(), simplifyUnaryIntrinsic(), simplifyWithOpsReplaced(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToAddr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().

◆ m_IntToPtr()

template<typename OpTy>
CastOperator_match< OpTy, Instruction::IntToPtr > llvm::PatternMatch::m_IntToPtr ( const OpTy & Op)
inline

Matches IntToPtr.

Definition at line 2221 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldPtrToIntOrAddrOfGEP(), and llvm::InstCombinerImpl::visitPtrToInt().

◆ m_IRem()

template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_irem_op > llvm::PatternMatch::m_IRem ( const LHS & L,
const RHS & R )
inline

Matches integer remainder operations.

Definition at line 1678 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldSelectZeroOrFixedOp(), and isKnownNonNullFromDominatingCondition().

◆ m_IToFP()

template<typename OpTy>
match_combine_or< CastInst_match< OpTy, UIToFPInst >, CastInst_match< OpTy, SIToFPInst > > llvm::PatternMatch::m_IToFP ( const OpTy & Op)
inline

◆ m_Load()

template<typename OpTy>
OneOps_match< OpTy, Instruction::Load > llvm::PatternMatch::m_Load ( const OpTy & Op)
inline

◆ m_LoadSimple()

template<typename OpTy>
LoadSimple_match< OpTy > llvm::PatternMatch::m_LoadSimple ( const OpTy & Op)
inline

Definition at line 2063 of file PatternMatch.h.

Referenced by processUse().

◆ m_LogicalAnd() [1/2]

◆ m_LogicalAnd() [2/2]

template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::And > llvm::PatternMatch::m_LogicalAnd ( const LHS & L,
const RHS & R )
inline

Matches L && R either in the form of L & R or L ?

R : false. Note that the latter form is poison-blocking.

Definition at line 3244 of file PatternMatch.h.

Referenced by removeCommonBlendMask(), llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect(), llvm::TargetTransformInfoImplBase::shouldTreatInstructionLikeSelect(), and unswitchTrivialBranch().

◆ m_LogicalOp() [1/2]

auto llvm::PatternMatch::m_LogicalOp ( )
inline

Matches either L && R or L || R where L and R are arbitrary values.

Definition at line 3288 of file PatternMatch.h.

References m_LogicalOp(), and m_Value().

Referenced by computeKnownBitsFromCond(), llvm::findValuesAffectedByCondition(), m_LogicalOp(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), and llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp().

◆ m_LogicalOp() [2/2]

template<typename LHS, typename RHS, bool Commutable = false>
auto llvm::PatternMatch::m_LogicalOp ( const LHS & L,
const RHS & R )
inline

Matches either L && R or L || R, either one being in the either binary or logical form.

Note that the latter form is poison-blocking.

Definition at line 3281 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr().

Referenced by m_c_LogicalOp().

◆ m_LogicalOr() [1/2]

◆ m_LogicalOr() [2/2]

template<typename LHS, typename RHS>
LogicalOp_match< LHS, RHS, Instruction::Or > llvm::PatternMatch::m_LogicalOr ( const LHS & L,
const RHS & R )
inline

Matches L || R either in the form of L | R or L ?

true : R. Note that the latter form is poison-blocking.

Definition at line 3262 of file PatternMatch.h.

Referenced by llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect(), llvm::TargetTransformInfoImplBase::shouldTreatInstructionLikeSelect(), and unswitchTrivialBranch().

◆ m_LogicalShift()

template<typename LHS, typename RHS>
BinOpPred_match< LHS, RHS, is_logical_shift_op > llvm::PatternMatch::m_LogicalShift ( const LHS & L,
const RHS & R )
inline

◆ m_LowBitMask() [1/2]

◆ m_LowBitMask() [2/2]

api_pred_ty< is_lowbit_mask > llvm::PatternMatch::m_LowBitMask ( const APInt *& V)
inline

Definition at line 674 of file PatternMatch.h.

◆ m_LowBitMaskOrZero() [1/2]

cst_pred_ty< is_lowbit_mask_or_zero > llvm::PatternMatch::m_LowBitMaskOrZero ( )
inline

Match an integer or vector with only the low bit(s) set.

For vectors, this includes constants with undefined elements.

Definition at line 681 of file PatternMatch.h.

Referenced by isMaskOrZero().

◆ m_LowBitMaskOrZero() [2/2]

api_pred_ty< is_lowbit_mask_or_zero > llvm::PatternMatch::m_LowBitMaskOrZero ( const APInt *& V)
inline

Definition at line 684 of file PatternMatch.h.

◆ m_LShr()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::LShr > llvm::PatternMatch::m_LShr ( const LHS & L,
const RHS & R )
inline

Definition at line 1311 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), dropRedundantMaskingOfLeftShiftInput(), foldBoxMultiply(), foldCttzCtlz(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpEquality(), foldMulHigh(), foldSelectICmpAndAnd(), foldSelectICmpLshrAshr(), foldSelectSplitCTLZ(), foldSelectSplitCTTZ(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldTruncInsEltPair(), foldVecExtTruncToExtElt(), foldVecTruncToExtElt(), getBinOpsForFactorization(), llvm::vputils::getSCEVExprForVPValue(), haveNoCommonBitsSetSpecialCases(), llvm::isKnownToBeAPowerOfTwo(), isTruePredicate(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), matchAndOrChain(), MatchDiv(), matchIntPart(), matchPopCountBytes(), matchZExtedSubInteger(), simplifyAndInst(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpWithBinOpOnLHS(), llvm::simplifyIntrinsic(), simplifyOrInst(), simplifyValueKnownNonZero(), llvm::stripNullTest(), llvm::InstCombinerImpl::takeLog2(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedCttz(), tryToRecognizeTableBasedLog2(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitXor().

◆ m_LShrOrSelf()

template<typename LHS>
ShiftLike_match< LHS, Instruction::LShr > llvm::PatternMatch::m_LShrOrSelf ( const LHS & L,
uint64_t & R )
inline

Matches lshr L, ConstShAmt or L itself (R will be set to zero in this case).

Definition at line 1349 of file PatternMatch.h.

Referenced by matchPartStore().

◆ m_MaskedGather()

template<typename Opnd0, typename Opnd1, typename Opnd2>
auto llvm::PatternMatch::m_MaskedGather ( const Opnd0 & Op0,
const Opnd1 & Op1,
const Opnd2 & Op2 )
inline

Matches MaskedGather Intrinsic.

Definition at line 2814 of file PatternMatch.h.

References m_Intrinsic().

◆ m_MaskedLoad()

template<typename Opnd0, typename Opnd1, typename Opnd2>
auto llvm::PatternMatch::m_MaskedLoad ( const Opnd0 & Op0,
const Opnd1 & Op1,
const Opnd2 & Op2 )
inline

Matches MaskedLoad Intrinsic.

Definition at line 2801 of file PatternMatch.h.

References m_Intrinsic().

Referenced by optimizeMaskToEVL().

◆ m_MaskedStore()

template<typename Opnd0, typename Opnd1, typename Opnd2>
auto llvm::PatternMatch::m_MaskedStore ( const Opnd0 & Op0,
const Opnd1 & Op1,
const Opnd2 & Op2 )
inline

Matches MaskedStore Intrinsic.

Definition at line 2807 of file PatternMatch.h.

References m_Intrinsic().

Referenced by optimizeMaskToEVL().

◆ m_MaxOrMin()

◆ m_MaxSignedValue() [1/2]

cst_pred_ty< is_maxsignedvalue > llvm::PatternMatch::m_MaxSignedValue ( )
inline

Match an integer or vector with values having all bits except for the high bit set (0x7f...).

For vectors, this includes constants with undefined elements.

Definition at line 525 of file PatternMatch.h.

Referenced by canonicalizeSaturatedAddSigned(), canonicalizeSaturatedSubtractSigned(), and llvm::InstCombinerImpl::visitAnd().

◆ m_MaxSignedValue() [2/2]

api_pred_ty< is_maxsignedvalue > llvm::PatternMatch::m_MaxSignedValue ( const APInt *& V)
inline

Definition at line 528 of file PatternMatch.h.

◆ m_Mul()

◆ m_NaN()

cstfp_pred_ty< is_nan > llvm::PatternMatch::m_NaN ( )
inline

Match an arbitrary NaN constant.

This includes quiet and signalling nans. For vectors, this includes constants with undefined elements.

Definition at line 710 of file PatternMatch.h.

Referenced by simplifyFPOp().

◆ m_Neg()

template<typename ValTy>
BinaryOp_match< cst_pred_ty< is_zero_int >, ValTy, Instruction::Sub > llvm::PatternMatch::m_Neg ( const ValTy & V)
inline

Matches a 'Neg' as 'sub 0, V'.

Definition at line 3013 of file PatternMatch.h.

References m_Sub(), and m_ZeroInt().

Referenced by llvm::PatternMatch::Signum_match< Opnd_t >::match().

◆ m_NegatedPower2() [1/2]

cst_pred_ty< is_negated_power2 > llvm::PatternMatch::m_NegatedPower2 ( )
inline

Match a integer or vector negated power-of-2.

For vectors, this includes constants with undefined elements.

Definition at line 625 of file PatternMatch.h.

Referenced by foldNegativePower2AndShiftedMask(), llvm::simplifyInstruction(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSDiv(), and llvm::InstCombinerImpl::visitTrunc().

◆ m_NegatedPower2() [2/2]

api_pred_ty< is_negated_power2 > llvm::PatternMatch::m_NegatedPower2 ( const APInt *& V)
inline

Definition at line 628 of file PatternMatch.h.

◆ m_NegatedPower2OrZero() [1/2]

cst_pred_ty< is_negated_power2_or_zero > llvm::PatternMatch::m_NegatedPower2OrZero ( )
inline

Match a integer or vector negated power-of-2.

For vectors, this includes constants with undefined elements.

Definition at line 637 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldICmpBinOp(), and isMaskOrZero().

◆ m_NegatedPower2OrZero() [2/2]

api_pred_ty< is_negated_power2_or_zero > llvm::PatternMatch::m_NegatedPower2OrZero ( const APInt *& V)
inline

Definition at line 641 of file PatternMatch.h.

◆ m_Negative() [1/2]

cst_pred_ty< is_negative > llvm::PatternMatch::m_Negative ( )
inline

Match an integer or vector of negative values.

For vectors, this includes constants with undefined elements.

Definition at line 537 of file PatternMatch.h.

Referenced by canonicalizeSaturatedAddSigned(), foldICmpXorXX(), simplifyBinaryIntrinsic(), simplifyShlInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitURem().

◆ m_Negative() [2/2]

api_pred_ty< is_negative > llvm::PatternMatch::m_Negative ( const APInt *& V)
inline

Definition at line 540 of file PatternMatch.h.

◆ m_NegInf()

cstfp_pred_ty< is_signed_inf< true > > llvm::PatternMatch::m_NegInf ( )
inline

Match a negative infinity FP constant.

For vectors, this includes constants with undefined elements.

Definition at line 742 of file PatternMatch.h.

◆ m_NegZeroFP()

cstfp_pred_ty< is_neg_zero_fp > llvm::PatternMatch::m_NegZeroFP ( )
inline

Match a floating-point negative zero.

For vectors, this includes constants with undefined elements.

Definition at line 800 of file PatternMatch.h.

Referenced by llvm::ConstantFoldBinaryInstruction(), simplifyFAddInst(), simplifyFRemInst(), simplifyFSubInst(), and llvm::InstCombinerImpl::visitCallInst().

◆ m_NNegZExt()

template<typename OpTy>
NNegZExt_match< OpTy > llvm::PatternMatch::m_NNegZExt ( const OpTy & Op)
inline

◆ m_NoInfs()

template<typename T>
AllowFmf_match< T, FastMathFlags::NoInfs > llvm::PatternMatch::m_NoInfs ( const T & SubPattern)
inline

Definition at line 125 of file PatternMatch.h.

References T.

◆ m_NoNaNs()

template<typename T>
AllowFmf_match< T, FastMathFlags::NoNaNs > llvm::PatternMatch::m_NoNaNs ( const T & SubPattern)
inline

Definition at line 120 of file PatternMatch.h.

References T.

◆ m_NonInf()

cstfp_pred_ty< is_noninf > llvm::PatternMatch::m_NonInf ( )
inline

Match a non-infinity FP constant, i.e.

finite or NaN. For vectors, this includes constants with undefined elements.

Definition at line 751 of file PatternMatch.h.

◆ m_NonNaN()

cstfp_pred_ty< is_nonnan > llvm::PatternMatch::m_NonNaN ( )
inline

Match a non-NaN FP constant.

For vectors, this includes constants with undefined elements.

Definition at line 717 of file PatternMatch.h.

◆ m_NonNegative() [1/2]

cst_pred_ty< is_nonnegative > llvm::PatternMatch::m_NonNegative ( )
inline

Match an integer or vector of non-negative values.

For vectors, this includes constants with undefined elements.

Definition at line 547 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldICmpBinOp(), foldICmpWithLowBitMaskedVal(), getBinOpsForFactorization(), instCombineSVESrshl(), isImpliedCondICmps(), llvm::InstCombinerImpl::OptimizePointerDifference(), and llvm::InstCombinerImpl::visitSDiv().

◆ m_NonNegative() [2/2]

api_pred_ty< is_nonnegative > llvm::PatternMatch::m_NonNegative ( const APInt *& V)
inline

Definition at line 550 of file PatternMatch.h.

◆ m_NonPositive() [1/2]

cst_pred_ty< is_nonpositive > llvm::PatternMatch::m_NonPositive ( )
inline

Match an integer or vector of non-positive values.

For vectors, this includes constants with undefined elements.

Definition at line 569 of file PatternMatch.h.

Referenced by isImpliedCondICmps().

◆ m_NonPositive() [2/2]

api_pred_ty< is_nonpositive > llvm::PatternMatch::m_NonPositive ( const APInt *& V)
inline

Definition at line 572 of file PatternMatch.h.

◆ m_NonZeroFP()

cstfp_pred_ty< is_non_zero_fp > llvm::PatternMatch::m_NonZeroFP ( )
inline

Match a floating-point non-zero.

For vectors, this includes constants with undefined elements.

Definition at line 809 of file PatternMatch.h.

◆ m_NonZeroInt()

cst_pred_ty< is_non_zero_int > llvm::PatternMatch::m_NonZeroInt ( )
inline

Match a non-zero integer or a vector with all non-zero elements.

For vectors, this includes constants with undefined elements.

Definition at line 595 of file PatternMatch.h.

◆ m_NonZeroNotDenormalFP()

cstfp_pred_ty< is_non_zero_not_denormal_fp > llvm::PatternMatch::m_NonZeroNotDenormalFP ( )
inline

Match a floating-point non-zero that is not a denormal.

For vectors, this includes constants with undefined elements.

Definition at line 821 of file PatternMatch.h.

Referenced by hasNonZeroFPOperands().

◆ m_NoSignedZeros()

template<typename T>
AllowFmf_match< T, FastMathFlags::NoSignedZeros > llvm::PatternMatch::m_NoSignedZeros ( const T & SubPattern)
inline

Definition at line 131 of file PatternMatch.h.

References T.

◆ m_Not()

template<typename ValTy>
BinaryOp_match< cst_pred_ty< is_all_ones >, ValTy, Instruction::Xor, true > llvm::PatternMatch::m_Not ( const ValTy & V)
inline

Matches a 'Not' as 'xor V, -1' or 'xor -1, V'.

NOTE: we first match the 'Not' (by matching '-1'), and only then match the inner matcher!

Definition at line 2644 of file PatternMatch.h.

References m_AllOnes(), and m_c_Xor().

Referenced by llvm::InstCombiner::canFreelyInvertAllUsersOf(), and llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match().

◆ m_NotForbidPoison()

template<typename ValTy>
BinaryOp_match< cst_pred_ty< is_all_ones, false >, ValTy, Instruction::Xor, true > llvm::PatternMatch::m_NotForbidPoison ( const ValTy & V)
inline

Definition at line 2651 of file PatternMatch.h.

References m_AllOnesForbidPoison(), and m_c_Xor().

Referenced by canonicalizeSaturatedAddUnsigned().

◆ m_NSWAdd()

◆ m_NSWAddLike()

◆ m_NSWMul()

◆ m_NSWNeg()

template<typename ValTy>
OverflowingBinaryOp_match< cst_pred_ty< is_zero_int >, ValTy, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap > llvm::PatternMatch::m_NSWNeg ( const ValTy & V)
inline

Matches a 'Neg' as 'sub nsw 0, V'.

Definition at line 3022 of file PatternMatch.h.

References m_NSWSub(), and m_ZeroInt().

Referenced by foldICmpXNegX(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitSDiv(), and llvm::InstCombinerImpl::visitSRem().

◆ m_NSWShl()

◆ m_NSWSub()

◆ m_NSWTrunc()

template<typename OpTy>
NoWrapTrunc_match< OpTy, TruncInst::NoSignedWrap > llvm::PatternMatch::m_NSWTrunc ( const OpTy & Op)
inline

◆ m_NUWAdd()

◆ m_NUWAddLike()

◆ m_NUWMul()

◆ m_NUWShl()

◆ m_NUWSub()

◆ m_NUWTrunc()

◆ m_One()

cst_pred_ty< is_one > llvm::PatternMatch::m_One ( )
inline

Match an integer 1 or a vector with all elements equal to 1.

For vectors, this includes constants with undefined elements.

Definition at line 579 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeICmpBool(), canonicalizeLowbitMask(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), checkForNegativeOperand(), combineSetCC(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::VPHistogramRecipe::computeCost(), computeKnownBitsFromOperator(), llvm::VPlanTransforms::convertToConcreteRecipes(), despeculateCountZeros(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), dropRedundantMaskingOfLeftShiftInput(), llvm::VPVectorPointerRecipe::execute(), foldAddSubBoolOfMaskedVal(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpsWithPow2AndWithZero(), foldAnyOrAllBitsSet(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBitCast(), foldICmpOfUAddOv(), foldICmpWithHighBitMask(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldMulSelectToNegate(), foldMulShl1(), foldSelectICmpAndAnd(), foldSelectICmpMinMax(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), getRangeForIntrinsic(), handleOtherCmpSelSimplifications(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), instCombineSVEVectorMlaU(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::Constant::isElementWiseEqual(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), isKnownMonotonic(), llvm::isKnownToBeAPowerOfTwo(), isNeutralValue(), isRemOfLoopIncrementWithLoopInvariant(), isSignificantBitCheckWellFormed(), LowerAndToBT(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), matchAndOrChain(), matchEquivZeroRHS(), matchSelectPattern(), narrowBitOpRMW(), llvm::LoopVectorizePass::processLoop(), replaceConditionalBranchesOnConstant(), reverseZExtICmpCombine(), llvm::AssumptionPrinterPass::run(), simplifyBinaryIntrinsic(), simplifyExtractValueInst(), simplifyICmpOfBools(), simplifyICmpWithBinOp(), simplifyMulInst(), simplifyOrInst(), simplifyRecipe(), simplifySelectInst(), simplifyValueKnownNonZero(), simplifyX86pmulh(), skipTrivialSelect(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitURem(), and llvm::InstCombinerImpl::visitXor().

◆ m_OneUse()

template<typename T>
OneUse_match< T > llvm::PatternMatch::m_OneUse ( const T & SubPattern)
inline

◆ m_Or()

◆ m_OrdFMax()

template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ofmax_pred_ty > llvm::PatternMatch::m_OrdFMax ( const LHS & L,
const RHS & R )
inline

Match an 'ordered' floating point maximum function.

Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ogt/ge, L, R), L, R) semantics matched by this predicate.

                    max(L, R)  iff L and R are not NaN

m_OrdFMax(L, R) = R iff L or R are NaN

Definition at line 2563 of file PatternMatch.h.

◆ m_OrdFMin()

template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ofmin_pred_ty > llvm::PatternMatch::m_OrdFMin ( const LHS & L,
const RHS & R )
inline

Match an 'ordered' floating point minimum function.

Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(olt/le, L, R), L, R) semantics matched by this predicate.

                    min(L, R)  iff L and R are not NaN

m_OrdFMin(L, R) = R iff L or R are NaN

Definition at line 2578 of file PatternMatch.h.

◆ m_OrdOrUnordFMax()

template<typename LHS, typename RHS>
match_combine_or< FMaxMin_match< LHS, RHS, ofmax_pred_ty >, FMaxMin_match< LHS, RHS, ufmax_pred_ty > > llvm::PatternMatch::m_OrdOrUnordFMax ( const LHS & L,
const RHS & R )
inline

Match an 'ordered' or 'unordered' floating point maximum function.

Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics.

Definition at line 2621 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr().

Referenced by getMinMaxRecurrence(), and matchFastFloatClamp().

◆ m_OrdOrUnordFMin()

template<typename LHS, typename RHS>
match_combine_or< FMaxMin_match< LHS, RHS, ofmin_pred_ty >, FMaxMin_match< LHS, RHS, ufmin_pred_ty > > llvm::PatternMatch::m_OrdOrUnordFMin ( const LHS & L,
const RHS & R )
inline

Match an 'ordered' or 'unordered' floating point minimum function.

Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics.

Definition at line 2634 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr().

Referenced by getMinMaxRecurrence(), and matchFastFloatClamp().

◆ m_Phi()

match_bind< PHINode > llvm::PatternMatch::m_Phi ( PHINode *& PN)
inline

Match a PHI node, capturing it if we match.

Definition at line 883 of file PatternMatch.h.

Referenced by isRemOfLoopIncrementWithLoopInvariant(), and llvm::matchSimpleRecurrence().

◆ m_Poison()

◆ m_PosInf()

cstfp_pred_ty< is_signed_inf< false > > llvm::PatternMatch::m_PosInf ( )
inline

Match a positive infinity FP constant.

For vectors, this includes constants with undefined elements.

Definition at line 736 of file PatternMatch.h.

◆ m_PosZeroFP()

cstfp_pred_ty< is_pos_zero_fp > llvm::PatternMatch::m_PosZeroFP ( )
inline

Match a floating-point positive zero.

For vectors, this includes constants with undefined elements.

Definition at line 791 of file PatternMatch.h.

Referenced by foldSqrtWithFcmpZero(), simplifyAndOrOfFCmps(), simplifyFAddInst(), simplifyFRemInst(), simplifyFSubInst(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFCmpInst().

◆ m_Power2() [1/2]

◆ m_Power2() [2/2]

api_pred_ty< is_power2 > llvm::PatternMatch::m_Power2 ( const APInt *& V)
inline

Definition at line 618 of file PatternMatch.h.

◆ m_Power2OrZero() [1/2]

cst_pred_ty< is_power2_or_zero > llvm::PatternMatch::m_Power2OrZero ( )
inline

Match an integer or vector of 0 or power-of-2 values.

For vectors, this includes constants with undefined elements.

Definition at line 650 of file PatternMatch.h.

Referenced by llvm::isKnownToBeAPowerOfTwo().

◆ m_Power2OrZero() [2/2]

api_pred_ty< is_power2_or_zero > llvm::PatternMatch::m_Power2OrZero ( const APInt *& V)
inline

Definition at line 653 of file PatternMatch.h.

◆ m_PtrAdd()

template<typename PointerOpTy, typename OffsetOpTy>
PtrAdd_match< PointerOpTy, OffsetOpTy > llvm::PatternMatch::m_PtrAdd ( const PointerOpTy & PointerOp,
const OffsetOpTy & OffsetOp )
inline

◆ m_PtrToAddr()

template<typename OpTy>
CastOperator_match< OpTy, Instruction::PtrToAddr > llvm::PatternMatch::m_PtrToAddr ( const OpTy & Op)
inline

Matches PtrToAddr.

Definition at line 2209 of file PatternMatch.h.

Referenced by m_PtrToIntOrAddr(), and llvm::InstCombinerImpl::visitSub().

◆ m_PtrToInt()

template<typename OpTy>
CastOperator_match< OpTy, Instruction::PtrToInt > llvm::PatternMatch::m_PtrToInt ( const OpTy & Op)
inline

◆ m_PtrToIntOrAddr()

◆ m_PtrToIntSameSize()

template<typename OpTy>
PtrToIntSameSize_match< OpTy > llvm::PatternMatch::m_PtrToIntSameSize ( const DataLayout & DL,
const OpTy & Op )
inline

◆ m_SDiv()

◆ m_Select()

template<typename Cond, typename LHS, typename RHS>
ThreeOps_match< Cond, LHS, RHS, Instruction::Select > llvm::PatternMatch::m_Select ( const Cond & C,
const LHS & L,
const RHS & R )
inline

Matches SelectInst.

Definition at line 1919 of file PatternMatch.h.

References llvm::CallingConv::C, and Cond.

Referenced by annotateNonNullAndDereferenceable(), breakSelfRecursivePHI(), llvm::canConvertToMinOrMaxIntrinsic(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::VPlanTransforms::convertEVLExitCond(), llvm::VPlanTransforms::createInLoopReductionRecipes(), llvm::VPlanTransforms::createPartialReductions(), llvm::vputils::findComputeReductionResult(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), foldBitCastSelect(), llvm::InstCombinerImpl::foldCmpSelectOfConstants(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), foldMulHigh(), foldMulSelectToNegate(), FoldOrOfSelectSmaxToAbs(), foldSelectGEP(), foldSelectSplitCTLZCTTZ(), foldSelectToUSATI(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), llvm::InstCombiner::getFreelyInvertedImpl(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), llvm::VPlanTransforms::handleFindLastReductions(), handleFirstArgMinOrMax(), llvm::VPlanTransforms::handleMultiUseReductions(), llvm::RecurrenceDescriptor::isAnyOfPattern(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), llvm::RecurrenceDescriptor::isFindPattern(), isReductionCandidate(), isSignificantBitCheckWellFormed(), llvm::isSplatValue(), m_SelectCst(), llvm::PatternMatch::SelectLike_match< CondTy, LTy, RTy >::match(), matchBitmaskMul(), RecurrenceInfo::matchConditionalRecurrence(), matchSelectWithOptionalNotCond(), llvm::InstCombinerImpl::matchThreeWayIntCompare(), narrowVectorSelect(), llvm::VPlanTransforms::optimizeFindIVReductions(), PerformSELECTShiftCombine(), llvm::TargetTransformInfoImplBase::shouldTreatInstructionLikeSelect(), simplifyAndInst(), simplifyLogicalRecipe(), simplifyOrInst(), simplifyRecipe(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), skipTrivialSelect(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().

◆ m_SelectCst()

template<int64_t L, int64_t R, typename Cond>
ThreeOps_match< Cond, constantint_match< L >, constantint_match< R >, Instruction::Select > llvm::PatternMatch::m_SelectCst ( const Cond & C)
inline

This matches a select of two constants, e.g.: m_SelectCst<-1, 0>(m_Value(V))

Definition at line 1928 of file PatternMatch.h.

References llvm::CallingConv::C, Cond, m_ConstantInt(), and m_Select().

◆ m_SelectLike()

template<typename CondTy, typename LTy, typename RTy>
SelectLike_match< CondTy, LTy, RTy > llvm::PatternMatch::m_SelectLike ( const CondTy & C,
const LTy & TrueC,
const RTy & FalseC )
inline

Matches a value that behaves like a boolean-controlled select, i.e.

one of: select i1 Cond, TrueC, FalseC zext i1 Cond (equivalent to select i1 Cond, 1, 0) sext i1 Cond (equivalent to select i1 Cond, -1, 0)

The condition is matched against Cond, and the true/false constants against TrueC and FalseC respectively. For zext/sext, the synthetic constants are bound to TrueC and FalseC via their matchers.

Definition at line 2386 of file PatternMatch.h.

References llvm::CallingConv::C.

Referenced by llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), foldSelectWithIdentityConstant(), llvm::VPlanTransforms::handleFindLastReductions(), llvm::VPlanTransforms::optimizeFindIVReductions(), optimizeMaskToEVL(), takeInexpensiveLog2(), and tryToFoldExtendSelectLoad().

◆ m_SExt()

◆ m_SExtLike()

◆ m_SExtOrSelf()

◆ m_Shift()

◆ m_ShiftedMask()

cst_pred_ty< is_shifted_mask > llvm::PatternMatch::m_ShiftedMask ( )
inline

Definition at line 500 of file PatternMatch.h.

Referenced by foldNegativePower2AndShiftedMask().

◆ m_Shl()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Shl > llvm::PatternMatch::m_Shl ( const LHS & L,
const RHS & R )
inline

Definition at line 1305 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeLowbitMask(), combineAdd(), combineAddSubWithShlAddSub(), combineBTToBitOpFlag(), combineNarrowableShiftedLoad(), combineSetCC(), combineShlAddIAddImpl(), computeKnownBitsFromCmp(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), detectShiftUntilBitTestIdiom(), dropRedundantMaskingOfLeftShiftInput(), factorizeMathWithShlOps(), llvm::vputils::findCanonicalIVIncrement(), llvm::InstCombinerImpl::foldAddLikeCommutative(), llvm::InstCombinerImpl::foldAddWithConstant(), foldBoxMultiply(), foldCttzCtlz(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldICmpWithHighBitMask(), foldICmpWithTruncSignExtendedVal(), foldIDivShl(), foldMulShl1(), foldSelectICmpAndZeroShl(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), getBinOpsForFactorization(), llvm::vputils::getSCEVExprForVPValue(), haveNoCommonBitsSetSpecialCases(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::isKnownToBeAPowerOfTwo(), isNonEqualShl(), llvm::X86TTIImpl::isProfitableToSinkOperands(), LowerAndToBT(), MatchMul(), matchOrConcat(), matchZExtedSubInteger(), narrowBitOpRMW(), PerformSELECTShiftCombine(), setShiftFlags(), shouldCanonicalizeGEPToPtrAdd(), shouldSinkVScale(), simplifyAndCommutative(), simplifyAndInst(), simplifyAShrInst(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpWithBinOp(), simplifyICmpWithBinOpOnLHS(), llvm::simplifyIntrinsic(), simplifyIRemMulShl(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedBits(), simplifyOrInst(), simplifyShiftSelectingPackedElement(), simplifyValueKnownNonZero(), splitMergedValStore(), llvm::InstCombinerImpl::takeLog2(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitXor().

◆ m_ShlOrSelf()

template<typename LHS>
ShiftLike_match< LHS, Instruction::Shl > llvm::PatternMatch::m_ShlOrSelf ( const LHS & L,
uint64_t & R )
inline

Matches shl L, ConstShAmt or L itself (R will be set to zero in this case).

Definition at line 1342 of file PatternMatch.h.

Referenced by foldLoadsRecursive(), and matchSubIntegerPackFromVector().

◆ m_Shr()

◆ m_Shuffle() [1/2]

◆ m_Shuffle() [2/2]

template<typename V1_t, typename V2_t, typename Mask_t>
Shuffle_match< V1_t, V2_t, Mask_t > llvm::PatternMatch::m_Shuffle ( const V1_t & v1,
const V2_t & v2,
const Mask_t & mask )
inline

Definition at line 2041 of file PatternMatch.h.

References mask().

◆ m_SignMask()

◆ m_Signum()

template<typename Val_t>
Signum_match< Val_t > llvm::PatternMatch::m_Signum ( const Val_t & V)
inline

Matches a signum pattern.

signum(x) = x > 0 -> 1 x == 0 -> 0 x < 0 -> -1

Definition at line 3125 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldICmpOrConstant(), and llvm::InstCombinerImpl::foldICmpTruncConstant().

◆ m_SIToFP()

template<typename OpTy>
CastInst_match< OpTy, SIToFPInst > llvm::PatternMatch::m_SIToFP ( const OpTy & Op)
inline

◆ m_SMax()

◆ m_SMin()

◆ m_Specific()

specificval_ty llvm::PatternMatch::m_Specific ( const Value * V)
inline

Match if we have a specific specified value.

Definition at line 962 of file PatternMatch.h.

Referenced by llvm::VPlanTransforms::adjustFirstOrderRecurrenceMiddleUsers(), breakSelfRecursivePHI(), canoncalizeSelectICmpMinMax(), canonicalizeAbs(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), canonicalizeSaturatedSubtractSigned(), canonicalizeSaturatedSubtractUnsigned(), llvm::SCEVExpander::canReuseFlagsFromOriginalIVInc(), checkOuterLoopInsts(), collectComplementaryPredicatedMemOps(), combineBTToBitOpFlag(), combineLogicBlendIntoConditionalNegate(), combineSelect(), combineShiftLeft(), combineShiftRightLogical(), llvm::InstCombinerImpl::commonIDivTransforms(), computeKnownBitsAddSub(), computeKnownBitsFromCmp(), computeKnownBitsFromCond(), llvm::computeKnownBitsFromContext(), computeKnownBitsFromICmpCond(), computeKnownBitsFromLerpPattern(), computeKnownBitsFromOperator(), computeKnownExponentRangeFromContext(), computeKnownFPClassFromCond(), llvm::computeOverflowForSignedSub(), llvm::computeOverflowForUnsignedSub(), llvm::VPlanTransforms::convertEVLExitCond(), convertFSqrtDivIntoFMul(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), llvm::VPlanTransforms::convertToVariableLengthStep(), llvm::VPlanTransforms::createPartialReductions(), createWidenInductionRecipe(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), directlyImpliesPoison(), factorizeFAddFSub(), factorizeMathWithShlOps(), llvm::vputils::findCanonicalIVIncrement(), findFindIVSelect(), llvm::findHistogram(), fixupVFUsersForEVL(), foldAbsDiff(), llvm::InstCombinerImpl::foldAddLikeCommutative(), foldAddToAshr(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfICmpsWithPow2AndWithZero(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpSelectBinOp(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), foldBoxMultiply(), foldComplexAndOrPatterns(), foldCttzCtlz(), foldDependentIVs(), foldFCmpFNegCommonOp(), foldFCmpFSubIntoFCmp(), foldFCmpWithFloorAndCeil(), llvm::InstCombinerImpl::foldFMulReassoc(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpEqualityWithOffset(), foldICmpOrXX(), foldICmpPow2Test(), llvm::InstCombinerImpl::foldICmpWithClamp(), foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), foldICmpWithLowBitMaskedVal(), foldICmpXorXX(), foldIDivShl(), foldInsEltIntoIdentityShuffle(), foldInsEltIntoSplat(), foldIsPowerOf2(), foldIsPowerOf2OrZero(), foldMinMaxSharedOp(), foldMulHigh(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::FoldOrOfLogicalAnds(), FoldOrOfSelectSmaxToAbs(), foldOrToXor(), llvm::InstCombinerImpl::foldPowiReassoc(), foldSelectBinOpIdentity(), foldSelectICmpAndAnd(), foldSelectICmpAndBinOp(), foldSelectICmpAndZeroShl(), foldSelectICmpLshrAshr(), foldSelectICmpMinMax(), foldSelectShuffleWith1Binop(), foldSelectSplitCTLZ(), foldSelectSplitCTTZ(), foldSelectToUSATI(), foldSelectZeroOrFixedOp(), foldSetClearBits(), foldSignedTruncationCheck(), foldSpliceBinOp(), foldSubOfMinMax(), llvm::VPlanTransforms::foldTailByMasking(), foldToMaskedStore(), foldTruncInsEltPair(), foldUnsignedUnderflowCheck(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::foldVectorBinop(), foldXorToXor(), getBundleFromUse(), llvm::PredicateBase::getConstraint(), getFSqrtDivOptPattern(), getInvertibleOperands(), getOptimizableIVOf(), getRangeForSelectPattern(), llvm::VPlanTransforms::handleFindLastReductions(), llvm::VPlanTransforms::handleMultiUseReductions(), handleUncountableExitsWithSideEffects(), haveNoCommonBitsSetSpecialCases(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEPairwiseAddLong(), instCombineSVEVectorFuseMulAddSub(), instCombineSVEZip(), instCombineXorSVECmpCC(), instCombineZExtSVECmpNE(), llvm::invertCondition(), isConditionalOnXorOfPHIs(), isConditionTrueViaVFAndUF(), isDivZero(), isEqualImpl(), llvm::RecurrenceDescriptor::isFindPattern(), isImpliedCondICmps(), isImpliedToBeAPowerOfTwoFromCond(), llvm::ConstantPtrAuth::isKnownCompatibleWith(), llvm::isKnownInversion(), llvm::isKnownNegation(), isKnownNonNullFromDominatingCondition(), isKnownNonZeroFromAssume(), isKnownNonZeroFromOperator(), llvm::isKnownToBeAPowerOfTwo(), isNonEqualMul(), isNonEqualShl(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), isRemOfLoopIncrementWithLoopInvariant(), isSignificantBitCheckWellFormed(), isTruePredicate(), llvm::vputils::isUsedByLoadStoreAddress(), isUsedWithinShuffleVector(), lookThroughCast(), RemoveMask_match< Op0_t, Op1_t >::match(), matchAddCC(), matchAndCC(), matchClamp(), matchExpandedRem(), matchFastFloatClamp(), matchICmpOperand(), matchMinMaxOfMinMax(), matchOpWithOpEqZero(), matchOrCC(), matchOrConcat(), matchSelectPattern(), matchSelectWithOptionalNotCond(), matchSubCC(), matchUAddWithOverflowConstantEdgeCases(), matchXorCC(), llvm::VPlanTransforms::narrowInterleaveGroups(), optimizeBranch(), llvm::VPlanTransforms::optimizeEVLMasks(), llvm::VPlanTransforms::optimizeFindIVReductions(), optimizeMaskToEVL(), optimizeVectorInductionWidthForTCAndVFUF(), passingValueIsAlwaysUndefined(), performMINMAXCombine(), performReverseEVLCombine(), performVP_STORECombine(), processUse(), reassociateHeaderMask(), removeCommonBlendMask(), llvm::LoopVectorizationPlanner::selectBestEpiloguePlan(), setLimitsForBinOp(), setShiftFlags(), llvm::X86TargetLowering::shouldFoldSelectWithIdentityConstant(), simplifyAddInst(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfFCmps(), simplifyAndOrOfICmpsWithCtpop(), simplifyAShrInst(), simplifyBinaryIntrinsic(), simplifyBranchConditionForVFAndUF(), simplifyCmpSelOfMaxMin(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyDiv(), simplifyDivRem(), simplifyFAddInst(), simplifyFDivInst(), simplifyFSubInst(), simplifyGEPInst(), simplifyICmpWithBinOpOnLHS(), simplifyICmpWithIntrinsicOnLHS(), llvm::simplifyInsertElementInst(), llvm::simplifyIntrinsic(), simplifyIRemMulShl(), simplifyLogicOfAddSub(), simplifyLShrInst(), simplifyMulInst(), simplifyOperationIntoSelectOperand(), simplifyOrInst(), simplifyOrLogic(), simplifyOrOfICmpsWithAdd(), llvm::InstCombinerImpl::simplifyRangeCheck(), simplifyRecipe(), simplifyRem(), simplifySelectBitTest(), simplifySelectInst(), simplifySelectWithICmpCond(), simplifyShlInst(), simplifySubInst(), simplifySwitchOnSelectUsingRanges(), simplifyUnsignedRangeCheck(), simplifyXorInst(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), swapICmpOperandsToExposeCSEOpportunities(), trySimplifyICmpWithAdds(), tryToMoveFreeBeforeNullTest(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ m_SpecificBB()

specific_bbval llvm::PatternMatch::m_SpecificBB ( BasicBlock * BB)
inline

Match a specific basic block value.

Definition at line 1084 of file PatternMatch.h.

Referenced by foldGuardedFunnelShift().

◆ m_SpecificCmp()

template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, CmpInst > llvm::PatternMatch::m_SpecificCmp ( CmpPredicate MatchPred,
const LHS & L,
const RHS & R )
inline

◆ m_SpecificFCmp()

template<typename LHS, typename RHS>
SpecificCmpClass_match< LHS, RHS, FCmpInst > llvm::PatternMatch::m_SpecificFCmp ( CmpPredicate MatchPred,
const LHS & L,
const RHS & R )
inline

Definition at line 1820 of file PatternMatch.h.

Referenced by reassociateFCmps().

◆ m_SpecificFP()

◆ m_SpecificICmp()

◆ m_SpecificInt() [1/2]

specific_intval< false > llvm::PatternMatch::m_SpecificInt ( const APInt & V)
inline

Match a specific integer value or vector with all elements equal to the value.

Definition at line 1051 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedSubtractUnsigned(), combineAdd(), combineBTToBitOpFlag(), combineOr(), combineSelect(), combineShiftLeft(), combineShiftRightArithmetic(), combineShiftRightLogical(), combineShiftToPMULH(), combineVectorInsert(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), computeKnownBitsFromOperator(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), detectSSatPattern(), detectSSatSPattern(), detectSSatUPattern(), detectUSatUPattern(), expandMulToAddOrSubOfShl(), llvm::vputils::findCanonicalIVIncrement(), FindSingleBitChange(), llvm::InstCombinerImpl::foldAddLikeCommutative(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndToUsubsat(), foldBoxMultiply(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpEquality(), foldInsEltIntoIdentityShuffle(), foldIsPowerOf2(), foldIsPowerOf2OrZero(), foldMulHigh(), foldSelectSplitCTLZ(), foldSelectSplitCTTZ(), foldSelectToUSATI(), llvm::InstCombinerImpl::foldSquareSumInt(), getShlAddShlAdd(), handleUncountableExitsWithSideEffects(), instCombineSVEDup(), isAddSubOrSubAdd(), llvm::X86TTIImpl::isProfitableToSinkOperands(), isSignificantBitCheckWellFormed(), isSupportedMemset(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), matchOrConcat(), matchPopCountBytes(), optimizeBranch(), performLastTrueTestVectorCombine(), performMINMAXCombine(), performPredicateLoadCombine(), PerformSELECTShiftCombine(), preparePlanForEpilogueVectorLoop(), processUse(), simplifyAndInst(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyGEPInst(), llvm::simplifyIntrinsic(), simplifyOrInst(), simplifySelectWithICmpCond(), simplifyShlInst(), simplifyWithOpsReplaced(), splitMergedValStore(), tryToRecognizePopCount(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedLog2(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), and widenBuildVector().

◆ m_SpecificInt() [2/2]

specific_intval64< false > llvm::PatternMatch::m_SpecificInt ( uint64_t V)
inline

Definition at line 1055 of file PatternMatch.h.

◆ m_SpecificInt_ICMP()

cst_pred_ty< icmp_pred_with_threshold > llvm::PatternMatch::m_SpecificInt_ICMP ( ICmpInst::Predicate Predicate,
const APInt & Threshold )
inline

◆ m_SpecificIntAllowPoison() [1/2]

◆ m_SpecificIntAllowPoison() [2/2]

specific_intval64< true > llvm::PatternMatch::m_SpecificIntAllowPoison ( uint64_t V)
inline

Definition at line 1063 of file PatternMatch.h.

◆ m_Sqrt()

template<typename Opnd0>
auto llvm::PatternMatch::m_Sqrt ( const Opnd0 & Op0)
inline

◆ m_SRem()

◆ m_Store()

template<typename ValueOpTy, typename PointerOpTy>
TwoOps_match< ValueOpTy, PointerOpTy, Instruction::Store > llvm::PatternMatch::m_Store ( const ValueOpTy & ValueOp,
const PointerOpTy & PointerOp )
inline

Matches StoreInst.

Definition at line 2070 of file PatternMatch.h.

Referenced by computeShapeInfoForInst(), and llvm::findHistogram().

◆ m_StrictlyPositive() [1/2]

cst_pred_ty< is_strictlypositive > llvm::PatternMatch::m_StrictlyPositive ( )
inline

Match an integer or vector of strictly positive values.

For vectors, this includes constants with undefined elements.

Definition at line 557 of file PatternMatch.h.

Referenced by canonicalizeSaturatedAddSigned(), matchSelectPattern(), and llvm::InstCombinerImpl::visitCallInst().

◆ m_StrictlyPositive() [2/2]

api_pred_ty< is_strictlypositive > llvm::PatternMatch::m_StrictlyPositive ( const APInt *& V)
inline

Definition at line 560 of file PatternMatch.h.

◆ m_Sub()

template<typename LHS, typename RHS>
BinaryOp_match< LHS, RHS, Instruction::Sub > llvm::PatternMatch::m_Sub ( const LHS & L,
const RHS & R )
inline

Definition at line 1185 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeSaturatedSubtractUnsigned(), combineAdd(), combineBasicSADPattern(), llvm::InstCombinerImpl::commonIDivTransforms(), computeKnownBitsFromOperator(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), llvm::VPlanTransforms::createInLoopReductionRecipes(), detectShiftUntilZeroIdiom(), llvm::findHistogram(), FindSingleBitChange(), llvm::findValuesAffectedByCondition(), foldAbsDiff(), llvm::InstCombinerImpl::foldAddLikeCommutative(), llvm::InstCombinerImpl::foldAddWithConstant(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpOrXorSubChain(), foldSubCtlzNot(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombiner::getFreelyInvertedImpl(), getKnownBitsFromAndXorOr(), getOptimizableIVOf(), llvm::vputils::getSCEVExprForVPValue(), haveNoCommonBitsSetSpecialCases(), hoistSubAddAssociation(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), isImpliedCondICmps(), llvm::isKnownNegation(), llvm::SelectionDAG::isKnownToBeAPowerOfTwo(), m_Neg(), matchExpandedRem(), matchIncrement(), matchPopCountBytes(), matchSubCC(), optimizeBranch(), processUse(), ShouldBreakUpDistribution(), simplifyAddInst(), simplifyCastInst(), llvm::TargetLowering::SimplifyDemandedBits(), simplifyGEPInst(), simplifyICmpWithBinOpOnLHS(), simplifyICmpWithIntrinsicOnLHS(), simplifyLogicOfAddSub(), simplifyOrInst(), simplifyRecipe(), simplifySubInst(), simplifyUnsignedRangeCheck(), swapICmpOperandsToExposeCSEOpportunities(), tryToMatchAndCreateMulAccumulateReduction(), tryToRecognizeTableBasedLog2(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ m_Trunc()

template<typename OpTy>
CastInst_match< OpTy, TruncInst > llvm::PatternMatch::m_Trunc ( const OpTy & Op)
inline

◆ m_TruncOrSelf()

◆ m_UAddWithOverflow()

template<typename LHS_t, typename RHS_t, typename Sum_t>
UAddWithOverflow_match< LHS_t, RHS_t, Sum_t > llvm::PatternMatch::m_UAddWithOverflow ( const LHS_t & L,
const RHS_t & R,
const Sum_t & S )

Match an icmp instruction checking for unsigned overflow on addition.

S is matched to the addition whose result is being checked for overflow, and L and R are matched to the LHS and RHS of S.

Definition at line 2725 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::visitICmpInst().

◆ m_UDiv()

◆ m_UIToFP()

◆ m_UMax()

template<typename Opnd0, typename Opnd1>
auto llvm::PatternMatch::m_UMax ( const Opnd0 & Op0,
const Opnd1 & Op1 )
inline

◆ m_UMin()

◆ m_UnconditionalBr()

br_match llvm::PatternMatch::m_UnconditionalBr ( BasicBlock *& Succ)
inline

Definition at line 2452 of file PatternMatch.h.

Referenced by tryToMoveFreeBeforeNullTest().

◆ m_Undef()

◆ m_UndefValue() [1/2]

auto llvm::PatternMatch::m_UndefValue ( )
inline

Match an arbitrary UndefValue constant.

Definition at line 171 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by llvm::InstCombinerImpl::commonIDivRemTransforms(), and llvm::maskContainsAllOneOrUndef().

◆ m_UndefValue() [2/2]

match_bind< UndefValue > llvm::PatternMatch::m_UndefValue ( UndefValue *& U)
inline

Match an UndefValue, capturing the value if we match.

Definition at line 886 of file PatternMatch.h.

◆ m_Unless()

template<typename Ty>
match_unless< Ty > llvm::PatternMatch::m_Unless ( const Ty & M)
inline

Match if the inner matcher does NOT match.

Definition at line 245 of file PatternMatch.h.

Referenced by llvm::InstCombinerImpl::foldICmpEquality(), getBundleFromUse(), llvm::InstCombinerImpl::visitFreeze(), and llvm::InstCombinerImpl::visitXor().

◆ m_UnOp() [1/4]

auto llvm::PatternMatch::m_UnOp ( )
inline

Match an arbitrary unary operation and ignore it.

Definition at line 139 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by cheapToScalarize(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitExtractElementInst().

◆ m_UnOp() [2/4]

template<typename OP_t>
AnyUnaryOp_match< OP_t > llvm::PatternMatch::m_UnOp ( const OP_t & X)
inline

Definition at line 1139 of file PatternMatch.h.

References X.

◆ m_UnOp() [3/4]

match_bind< const UnaryOperator > llvm::PatternMatch::m_UnOp ( const UnaryOperator *& I)
inline

Definition at line 860 of file PatternMatch.h.

References I.

◆ m_UnOp() [4/4]

match_bind< UnaryOperator > llvm::PatternMatch::m_UnOp ( UnaryOperator *& I)
inline

Match a unary operator, capturing it if we match.

Definition at line 859 of file PatternMatch.h.

References I.

◆ m_UnordFMax()

template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ufmax_pred_ty > llvm::PatternMatch::m_UnordFMax ( const LHS & L,
const RHS & R )
inline

Match an 'unordered' floating point maximum function.

Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ugt/ge, L, R), L, R) semantics matched by this predicate.

                    max(L, R)  iff L and R are not NaN

m_UnordFMax(L, R) = L iff L or R are NaN

Definition at line 2593 of file PatternMatch.h.

◆ m_UnordFMin()

template<typename LHS, typename RHS>
FMaxMin_match< LHS, RHS, ufmin_pred_ty > llvm::PatternMatch::m_UnordFMin ( const LHS & L,
const RHS & R )
inline

Match an 'unordered' floating point minimum function.

Floating point has one special value 'NaN'. Therefore, there is no total order. However, if we can ignore the 'NaN' value (for example, because of a 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' semantics. In the presence of 'NaN' we have to preserve the original select(fcmp(ult/le, L, R), L, R) semantics matched by this predicate.

                     min(L, R)  iff L and R are not NaN

m_UnordFMin(L, R) = L iff L or R are NaN

Definition at line 2608 of file PatternMatch.h.

◆ m_URem()

◆ m_Value() [1/5]

auto llvm::PatternMatch::m_Value ( )
inline

Match an arbitrary value and ignore it.

Definition at line 136 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_Isa().

Referenced by addValueAffectedByCondition(), analyzeCostOfVecReduction(), analyzeICmp(), annotateNonNullAndDereferenceable(), areExtractExts(), areExtractExts(), areExtractShuffleVectors(), breakSelfRecursivePHI(), llvm::InstCombiner::canBeCastedExactlyIntToFP(), llvm::canConvertToMinOrMaxIntrinsic(), llvm::InstCombiner::canFreelyInvertAllUsersOf(), canonicalizeAbs(), canonicalizeBitCastExtElt(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeGEPOfConstGEPI8(), canonicalizeInsertSplat(), canonicalizeLogicFirst(), canonicalizeLowbitMask(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), llvm::canPeelLastIteration(), canProveExitOnFirstIteration(), llvm::SCEVExpander::canReuseFlagsFromOriginalIVInc(), canSafelyConvertTo16Bit(), canScalarizeAccess(), canShiftBinOpWithConstantRHS(), cheapToScalarize(), checkForNegativeOperand(), checkOrAndOpImpliedByOther(), collectBitParts(), collectUnswitchCandidatesWithInjections(), combineAdd(), combineAddMulh(), combineAddSubWithShlAddSub(), combineAnd(), combineAndNotOrIntoAndNotAnd(), combineAndOnGF2P8AFFINEQBOperand(), combineAndXorSubWithBMI(), combineBasicSADPattern(), combineBTToBitOpFlag(), combineCastedMaskArithmetic(), combineConcatVectorOps(), combineLogicBlendIntoConditionalNegate(), combineMaskBitOp(), combineNarrowableShiftedLoad(), combineNestedGF2P8AFFINEQB(), combineOr(), combineOrAndToBitfieldInsert(), combineOrOfSetCCToUSUBOCarry(), combineOrToBitfieldInsert(), combineOrWithGF2P8AFFINEQB(), combinePMULH(), combineSCALAR_TO_VECTOR(), combineSetCC(), combineShiftRightArithmetic(), combineShiftToPMULH(), combineShlAddIAddImpl(), combineStore(), combineTargetShuffle(), combineVectorInsert(), combineVTRUNCSAT(), combineXorOnGF2P8AFFINEQBOperand(), combineXorToBitfieldInsert(), combineXorWithGF2P8AFFINEQB(), combineXorWithTwoGF2P8AFFINEQB(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), commuteSelect(), llvm::computeConstantRange(), computeKnownBitsAddSub(), computeKnownBitsFromCmp(), computeKnownBitsFromCond(), computeKnownBitsFromLerpPattern(), computeKnownBitsFromOperator(), computeKnownFPClass(), computeKnownFPClassFromCond(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedSub(), llvm::computeOverflowForUnsignedSub(), computeShapeInfoForInst(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), countToEliminateCompares(), decompose(), llvm::decomposeBitTest(), llvm::decomposeBitTestICmp(), detectPMADDUBSW(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), detectSSatPattern(), detectSSatSPattern(), detectSSatUPattern(), detectUSatPattern(), detectUSatUPattern(), dropRedundantMaskingOfLeftShiftInput(), expandMulToAddOrSubOfShl(), factorizeFAddFSub(), factorizeLerp(), factorizeMathWithShlOps(), llvm::findHistogram(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::findScalarElement(), FindSingleBitChange(), llvm::findValuesAffectedByCondition(), llvm::InstCombinerImpl::foldAddLikeCommutative(), foldAddSubBoolOfMaskedVal(), foldAddToAshr(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfICmpsWithPow2AndWithZero(), foldAndToUsubsat(), foldAndToXor(), foldAnyOrAllBitsSet(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBitOrderCrossLogicOp(), foldBitOrderCrossLogicOp(), foldBoxMultiply(), foldClampRangeOfTwo(), llvm::InstCombinerImpl::foldCmpSelectOfConstants(), foldComplexAndOrPatterns(), foldCopySignIdioms(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldDivCeil(), foldFabsWithFcmpZero(), foldFCmpFAbsFSubIntToFP(), foldFCmpFNegCommonOp(), foldFCmpFSubIntoFCmp(), foldFDivConstantDividend(), foldFDivSqrtDivisor(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFNegIntoConstant(), foldFPtoI(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpEqualityWithOffset(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), foldICmpOfUAddOv(), foldICmpOfVectorReduce(), foldICmpOrChain(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXorSubChain(), foldICmpOrXX(), foldICmpPow2Test(), foldICmpShlLHSC(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithConstant(), foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), foldICmpWithHighBitMask(), foldICmpWithLowBitMaskedVal(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpWithTruncSignExtendedVal(), llvm::InstCombinerImpl::foldICmpWithZero(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldICmpXNegX(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), foldICmpXorXX(), foldIdentityExtractShuffle(), foldIDivShl(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldIsPowerOf2(), foldIsPowerOf2OrZero(), foldLoadsRecursive(), foldLogicCastConstant(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldMaskedAddXorPattern(), foldMaskedMerge(), foldMinimumOverTrailingOrLeadingZeroCount(), foldMinMaxSharedOp(), foldMulHigh(), foldMulSelectToNegate(), foldMulShl1(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldNotXor(), foldNoWrapAdd(), foldOrOfInversions(), llvm::InstCombinerImpl::FoldOrOfLogicalAnds(), FoldOrOfSelectSmaxToAbs(), foldOrToXor(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldPtrToIntOrAddrOfGEP(), foldReduceOperandViaVDOT4A(), foldReductionIdiom(), llvm::InstCombinerImpl::foldReversedIntrinsicOperands(), foldSelectBinOpIdentity(), foldSelectGEP(), foldSelectICmpAndAnd(), foldSelectICmpAndZeroShl(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectSplitCTLZ(), foldSelectSplitCTLZCTTZ(), foldSelectSplitCTTZ(), foldSelectToUSATI(), foldSelectWithIdentityConstant(), foldSelectZeroOrFixedOp(), foldSetClearBits(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldShuffledIntrinsicOperands(), foldShuffleOfUnaryOps(), foldShuffleWithInsert(), llvm::InstCombinerImpl::foldSignBitTest(), foldSignedTruncationCheck(), foldSpliceBinOp(), foldSqrtWithFcmpZero(), foldSubCtlzNot(), foldSubOfMinMax(), foldToMaskedStore(), foldToUnsignedSaturatedAdd(), foldTruncInsEltPair(), foldTruncShuffle(), foldTwoEntryPHINode(), foldUnsignedUnderflowCheck(), foldURemOfLoopIncrement(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), foldVecExtTruncToExtElt(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), foldVSelectToSignBitSplatMask(), foldXorToXor(), getAppleRuntimeUnrollPreferences(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), getBinOpsForFactorization(), getBoolVecFromMask(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::InstCombiner::getComplexity(), getDomPredecessorCondition(), llvm::InstCombiner::getFreelyInvertedImpl(), getFSqrtDivOptPattern(), getHashValueImpl(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), getInvertibleOperands(), llvm::AArch64TargetLowering::getJumpConditionMergingParams(), llvm::SystemZTargetLowering::getJumpConditionMergingParams(), llvm::X86TargetLowering::getJumpConditionMergingParams(), getKnownBitsFromAndXorOr(), getKnownSign(), getKnownSignOrZero(), getMaskedTypeForICmpPair(), getMinimumFPType(), getMinMaxRecurrence(), getNotValue(), llvm::AMDGPUTargetMachine::getPredicatedAddrSpace(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), getShlAddShlAdd(), llvm::X86TTIImpl::getShuffleCost(), llvm::getSplatValue(), getUnsignedMonotonicValues(), hasRequiredFastMathFlags(), haveNoCommonBitsSetSpecialCases(), hoistAdd(), hoistAddSub(), hoistInsEltConst(), hoistMinMax(), hoistSub(), hoistSubAddAssociation(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), instCombineSVEDupqLane(), instCombineSVELast(), instCombineSVEPairwiseAddLong(), instCombineSVESrshl(), instCombineSVEUzp1(), instCombineSVEVectorFuseMulAddSub(), instCombineSVEZip(), llvm::invertCondition(), isAbsoluteValueULEOne(), isAllActivePredicate(), isAMXCast(), llvm::RecurrenceDescriptor::isAnyOfPattern(), llvm::isCheckForZeroAndMulWithOverflow(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), isDivZero(), isEqualImpl(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), llvm::RecurrenceDescriptor::isFindPattern(), isFNeg(), isImpliedCondAndOr(), isImpliedCondICmps(), llvm::isImpliedCondition(), llvm::isImpliedCondition(), isInstructionPairMul(), llvm::ConstantPtrAuth::isKnownCompatibleWith(), llvm::isKnownInversion(), llvm::isKnownNegation(), isKnownNonEqual(), isKnownNonNullFromDominatingCondition(), isKnownNonPositive(), isKnownNonZeroFromAssume(), isKnownNonZeroFromOperator(), llvm::isKnownToBeAPowerOfTwo(), llvm::SelectionDAG::isKnownToBeAPowerOfTwo(), isMaskOrZero(), isMultipleOfN(), isNeg(), llvm::isOnlyUsedInZeroComparison(), isOperandOfVmullHighP64(), isProcessableCondBI(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), llvm::ARMTTIImpl::isProfitableToSinkOperands(), llvm::GCNTTIImpl::isProfitableToSinkOperands(), llvm::RISCVTTIImpl::isProfitableToSinkOperands(), llvm::WebAssemblyTTIImpl::isProfitableToSinkOperands(), llvm::X86TTIImpl::isProfitableToSinkOperands(), isReductionCandidate(), isRemOfLoopIncrementWithLoopInvariant(), isSignificantBitCheckWellFormed(), llvm::isSplatValue(), isTruePredicate(), isTruncateOf(), LinearizeExprTree(), LowerAndToBT(), lowerBUILD_VECTOR(), lowerBuildVectorAsRV32PNarrowingShift(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), m_c_Select(), m_LogicalAnd(), m_LogicalOp(), m_LogicalOr(), llvm::PatternMatch::ICmpLike_match< LHS_t, RHS_t >::match(), llvm::PatternMatch::SelectLike_match< CondTy, LTy, RTy >::match(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), matchAddCC(), matchAndCC(), matchAndOrChain(), matchBitmaskMul(), matchDeMorgansLaws(), MatchDiv(), matchDot4Pattern(), matchesAdd(), matchesOr(), matchesSquareSum(), matchExpandedRem(), matchFPExtFromF16(), matchICmpOperand(), matchIntPart(), matchLogicBlend(), MatchMul(), matchOrCC(), matchOrConcat(), matchPartStore(), matchPMADDWD(), matchPMADDWD_2(), matchPopCountBytes(), matchRdxBop(), MatchRem(), matchSelectPattern(), matchSelectWithOptionalNotCond(), matchSignedNewValueCC(), llvm::matchSimpleRecurrence(), matchSubCC(), matchSubIntegerPackFromVector(), llvm::InstCombinerImpl::matchThreeWayIntCompare(), matchVPMADD52(), matchXorCC(), matchZExtedSubInteger(), moveAddAfterMinMax(), narrowBitOpRMW(), narrowInsElt(), narrowUDivURem(), narrowVectorSelect(), NegateValue(), OptimizeAndOrXor(), optimizeLoopExitWithUnknownExitCount(), optimizeShiftInOrChain(), optimizeSymmetricCall(), parseCondition(), llvm::parseWidenableBranch(), passingValueIsAlwaysUndefined(), performAddTruncShiftCombine(), performANDORDUPNOTCombine(), performAnyAllCombine(), performBitcastCombine(), performBitmaskCombine(), performCTPOPCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), performMINMAXCombine(), performPredicateLoadCombine(), performReverseEVLCombine(), PerformSELECTShiftCombine(), performVP_STORECombine(), processLoop(), processUse(), reassociateFCmps(), reassociateForUses(), reassociateMinMaxWithConstantInOperand(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::recognizeBSwapOrBitReverseIdiom(), recordCondition(), replaceSubOverflowUses(), reverseZExtICmpCombine(), setShiftFlags(), llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect(), ShouldBreakUpDistribution(), ShouldBreakUpSubtract(), shouldCanonicalizeGEPToPtrAdd(), llvm::TargetTransformInfoImplBase::shouldTreatInstructionLikeSelect(), shrinkInsertElt(), shrinkSplatShuffle(), simplifyAddInst(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfICmpsWithCtpop(), simplifyAndOrWithICmpEq(), simplifyAShrInst(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::simplifyBinOpSplats(), simplifyCastInst(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyDiv(), simplifyDivRem(), simplifyExtractValueInst(), simplifyFAddInst(), simplifyFCmpInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFNegInst(), simplifyFSubInst(), simplifyGEPInst(), simplifyICmpOfBools(), simplifyICmpWithBinOp(), simplifyICmpWithBinOpOnLHS(), simplifyICmpWithConstant(), simplifyICmpWithMinMax(), llvm::simplifyInstruction(), llvm::simplifyIntrinsic(), simplifyIRemMulShl(), simplifyLogicOfAddSub(), llvm::simplifyLoopAfterUnroll(), simplifyLShrInst(), simplifyMulInst(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedBits(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass(), simplifyOperationIntoSelectOperand(), simplifyOrInst(), simplifyOrLogic(), simplifyOrOfICmpsWithAdd(), simplifyReductionOperand(), simplifyRem(), simplifySelectInst(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySelectWithFCmp(), simplifySelectWithICmpCond(), simplifyShift(), simplifyShiftSelectingPackedElement(), simplifyShlInst(), simplifyShuffleVectorInst(), simplifySRemInst(), simplifySubInst(), simplifySwitchWhenUMin(), simplifyUnaryIntrinsic(), simplifyUnsignedRangeCheck(), simplifyValueKnownNonZero(), simplifyXorInst(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), skipTrivialSelect(), splitMergedValStore(), llvm::stripNullTest(), llvm::InstCombiner::stripSignOnlyFPOps(), takeInexpensiveLog2(), llvm::InstCombinerImpl::takeLog2(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), trySimplifyICmpWithAdds(), tryToFoldExtendSelectLoad(), tryToFPToSat(), tryToImproveAlign(), tryToRecognizePopCount(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedCttz(), tryToRecognizeTableBasedLog2(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitCondBrInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitPtrToAddr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), llvm::InstCombinerImpl::visitZExt(), and widenBuildVector().

◆ m_Value() [2/5]

match_bind< const Value > llvm::PatternMatch::m_Value ( const Value *& V)
inline

Definition at line 829 of file PatternMatch.h.

◆ m_Value() [3/5]

template<typename Pattern>
auto llvm::PatternMatch::m_Value ( const Value *& V,
const Pattern & P )
inline

Match against the nested pattern, and capture the value if we match.

Definition at line 838 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineAnd(), and P.

◆ m_Value() [4/5]

match_bind< Value > llvm::PatternMatch::m_Value ( Value *& V)
inline

Match a value, capturing it if we match.

Definition at line 828 of file PatternMatch.h.

◆ m_Value() [5/5]

template<typename Pattern>
auto llvm::PatternMatch::m_Value ( Value *& V,
const Pattern & P )
inline

Match against the nested pattern, and capture the value if we match.

Definition at line 832 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineAnd(), and P.

◆ m_VecReverse()

template<typename Opnd0>
auto llvm::PatternMatch::m_VecReverse ( const Opnd0 & Op0)
inline

◆ m_VectorInsert()

template<typename Opnd0, typename Opnd1, typename Opnd2>
auto llvm::PatternMatch::m_VectorInsert ( const Opnd0 & Op0,
const Opnd1 & Op1,
const Opnd2 & Op2 )
inline

Definition at line 2939 of file PatternMatch.h.

References m_Intrinsic().

Referenced by llvm::InstCombinerImpl::foldVectorBinop().

◆ m_VScale()

◆ m_WithOverflowInst() [1/2]

match_bind< const WithOverflowInst > llvm::PatternMatch::m_WithOverflowInst ( const WithOverflowInst *& I)
inline

Definition at line 878 of file PatternMatch.h.

References I.

◆ m_WithOverflowInst() [2/2]

match_bind< WithOverflowInst > llvm::PatternMatch::m_WithOverflowInst ( WithOverflowInst *& I)
inline

Match a with overflow intrinsic, capturing it if we match.

Definition at line 874 of file PatternMatch.h.

References I.

Referenced by directlyImpliesPoison(), dominatesMergePoint(), isKnownNonZeroFromOperator(), llvm::patchReplacementInstruction(), and llvm::InstCombinerImpl::visitOr().

◆ m_Xor()

◆ m_Zero()

is_zero llvm::PatternMatch::m_Zero ( )
inline

Match any null constant or a vector with all elements equal to 0.

For vectors, this includes constants with undefined elements.

Definition at line 608 of file PatternMatch.h.

Referenced by areInverseVectorBitmasks(), canoncalizeSelectICmpMinMax(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeForInvariantConditionInjection(), canonicalizeICmpBool(), canonicalizeSaturatedSubtractUnsigned(), cmpExcludesZero(), combineAdd(), combineConcatVectorOps(), combineOr(), combineTargetShuffle(), combineVTRUNCSAT(), llvm::InstCombinerImpl::commonIDivRemTransforms(), computeKnownBitsFromCmp(), llvm::ConstantFoldBinaryInstruction(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), detectSSatUPattern(), llvm::findValuesAffectedByCondition(), FlattenLoopPair(), foldAddSubBoolOfMaskedVal(), foldAndOrOfICmpsWithPow2AndWithZero(), foldCttzCtlz(), llvm::InstCombinerImpl::foldDivCeil(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpInvariantGroup(), foldICmpOrChain(), foldICmpWithLowBitMaskedVal(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldICmpWithZero(), foldIdentityExtractShuffle(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldMulHigh(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldReductionIdiom(), foldSelectICmpAndAnd(), foldSelectICmpAndZeroShl(), foldSelectZeroOrFixedOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstCombinerImpl::foldSignBitTest(), foldUnsignedUnderflowCheck(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::AArch64TargetLowering::getJumpConditionMergingParams(), handleOtherCmpSelSimplifications(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEPairwiseAddLong(), instCombineZExtSVECmpNE(), llvm::isCheckForZeroAndMulWithOverflow(), isFirstIndexZero(), isMaskOrZero(), isNeutralValue(), llvm::isOnlyUsedInZeroComparison(), isTruncateOf(), lowerBUILD_VECTOR(), llvm::SDPatternMatch::m_Neg(), m_ZeroOrPoison(), markAliveBlocks(), matchEquivZeroRHS(), matchOpWithOpEqZero(), matchSubIntegerPackFromVector(), llvm::InstCombinerImpl::OptimizePointerDifference(), optimizeUniformIntrinsic(), perfomPextFirstTrueVectorCombine(), performANDORDUPNOTCombine(), performAnyAllCombine(), performBitmaskCombine(), llvm::RISCVTargetLowering::PerformDAGCombine(), PerformSELECTShiftCombine(), replaceConditionalBranchesOnConstant(), simplifyAddInst(), simplifyAndInst(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyDivRem(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), simplifyGEPInst(), simplifyICmpInst(), simplifyICmpOfBools(), llvm::simplifyIntrinsic(), simplifyMulInst(), simplifyOrInst(), simplifySelectInst(), simplifySelectWithICmpCond(), simplifyShift(), simplifySubInst(), simplifyUnsignedRangeCheck(), simplifyWithOpsReplaced(), simplifyXorInst(), skipTrivialSelect(), llvm::stripNullTest(), tryToMoveFreeBeforeNullTest(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitZExt().

◆ m_ZeroInt()

cst_pred_ty< is_zero_int > llvm::PatternMatch::m_ZeroInt ( )
inline

Match an integer 0 or a vector with all elements equal to 0.

For vectors, this includes constants with undefined elements.

Definition at line 586 of file PatternMatch.h.

Referenced by m_Neg(), m_NSWNeg(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), and simplifyLdexp().

◆ m_ZeroOrPoison()

auto llvm::PatternMatch::m_ZeroOrPoison ( )
inline

Definition at line 610 of file PatternMatch.h.

References llvm::PatternMatchHelpers::m_CombineOr(), m_Poison(), and m_Zero().

Referenced by llvm::simplifyIntrinsic().

◆ m_ZExt()

template<typename OpTy>
CastInst_match< OpTy, ZExtInst > llvm::PatternMatch::m_ZExt ( const OpTy & Op)
inline

Matches ZExt.

Definition at line 2266 of file PatternMatch.h.

Referenced by canSafelyConvertTo16Bit(), collectBitParts(), combineAdd(), combineBasicSADPattern(), ComputeNumSignBitsImpl(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), decompose(), detectPMADDUBSW(), llvm::InstCombinerImpl::foldAddWithConstant(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldDivCeil(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldLoadsRecursive(), foldLogicCastConstant(), foldNoWrapAdd(), foldSubCtlzNot(), llvm::vputils::getSCEVExprForVPValue(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineZExtSVECmpNE(), m_ZExtOrSelf(), m_ZExtOrSExt(), m_ZExtOrTruncOrSelf(), llvm::PatternMatch::SelectLike_match< CondTy, LTy, RTy >::match(), matchDot4Pattern(), matchOrConcat(), matchZExtedSubInteger(), narrowInsElt(), narrowUDivURem(), shouldSinkVScale(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpWithBinOp(), simplifyOperationIntoSelectOperand(), splitMergedValStore(), llvm::stripNullTest(), llvm::InstCombinerImpl::takeLog2(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), visitORCommutative(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().

◆ m_ZExtOrSelf()

◆ m_ZExtOrSExt()

◆ m_ZExtOrSExtOrSelf()

template<typename OpTy>
match_combine_or< match_combine_or< CastInst_match< OpTy, ZExtInst >, CastInst_match< OpTy, SExtInst > >, OpTy > llvm::PatternMatch::m_ZExtOrSExtOrSelf ( const OpTy & Op)
inline

◆ m_ZExtOrTruncOrSelf()

template<typename OpTy>
auto llvm::PatternMatch::m_ZExtOrTruncOrSelf ( const OpTy & Op)
inline

◆ match() [1/2]

template<typename Pattern>
bool llvm::PatternMatch::match ( ArrayRef< int > Mask,
const Pattern & P )

Definition at line 65 of file PatternMatch.h.

References P.

◆ match() [2/2]

template<typename Val, typename Pattern>
bool llvm::PatternMatch::match ( Val * V,
const Pattern & P )

Definition at line 54 of file PatternMatch.h.

References P.

Referenced by llvm::AliasSetTracker::add(), addNoFPClassAttrsTopDown(), AddParamAndFnBasicAttributes(), addSaturatedDecorationToIntrinsic(), addValueAffectedByCondition(), llvm::VPlanTransforms::adjustFirstOrderRecurrenceMiddleUsers(), analyzeCostOfVecReduction(), analyzeICmp(), annotateNonNullAndDereferenceable(), areBothVScale(), areExtractExts(), areExtractExts(), areExtractShuffleVectors(), areInverseVectorBitmasks(), bitTrackingDCE(), breakSelfRecursivePHI(), llvm::calculateRegisterUsageForPlan(), llvm::InstCombiner::canBeCastedExactlyIntToFP(), llvm::canConvertToMinOrMaxIntrinsic(), canEvaluateShiftedShift(), llvm::InstCombiner::canFreelyInvertAllUsersOf(), llvm::VPIntrinsic::canIgnoreVectorLengthParam(), canNarrowShiftAmt(), canoncalizeSelectICmpMinMax(), canonicalizeAbs(), canonicalizeBitCastExtElt(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeForInvariantConditionInjection(), canonicalizeGEPOfConstGEPI8(), canonicalizeICmpBool(), canonicalizeInsertSplat(), canonicalizeLogicFirst(), canonicalizeLowbitMask(), canonicalizeSaturatedAddSigned(), canonicalizeSaturatedAddUnsigned(), canonicalizeSaturatedSubtractSigned(), canonicalizeSaturatedSubtractUnsigned(), canProveExitOnFirstIteration(), llvm::SCEVExpander::canReuseFlagsFromOriginalIVInc(), canSafelyConvertTo16Bit(), canScalarizeAccess(), canShiftBinOpWithConstantRHS(), llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), llvm::canSinkOrHoistInst(), canSkipDemandedEltsInInsertChain(), cheapToScalarize(), checkForNegativeOperand(), checkOrAndOpImpliedByOther(), checkOuterLoopInsts(), cloneForLane(), cmpExcludesZero(), collectBitParts(), collectComplementaryPredicatedMemOps(), collectDivisibilityInformation(), llvm::collectEphemeralRecipesForVPlan(), collectHomogenousInstGraphLoopInvariants(), collectInsertionElements(), llvm::collectPossibleValues(), collectShuffleElements(), collectSingleShuffleElements(), collectUnswitchCandidates(), collectUnswitchCandidatesWithInjections(), combineAddSubWithShlAddSub(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonIRemTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::BaseIndexOffset::computeAliasing(), llvm::ScalarEvolution::computeConstantDifference(), llvm::computeConstantRange(), llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::VPWidenMemIntrinsicRecipe::computeCost(), computeKnownBits(), computeKnownBitsAddSub(), computeKnownBitsFromCmp(), computeKnownBitsFromCond(), llvm::computeKnownBitsFromContext(), computeKnownBitsFromICmpCond(), computeKnownBitsFromLerpPattern(), computeKnownBitsFromOperator(), computeKnownExponentRangeFromContext(), computeKnownFPClass(), computeKnownFPClassFromCond(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedSub(), llvm::computeOverflowForUnsignedSub(), computeShapeInfoForInst(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::ScalarEvolution::containsUndefs(), llvm::VPlanTransforms::convertEVLExitCond(), convertFSqrtDivIntoFMul(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), convertRecipesInRegionBlocksToSingleScalar(), llvm::VPlanTransforms::convertToConcreteRecipes(), llvm::VPlanTransforms::convertToStridedAccesses(), llvm::VPlanTransforms::createInLoopReductionRecipes(), createLoopRegion(), llvm::VPlanTransforms::createPartialReductions(), createWidenInductionRecipe(), decompose(), llvm::decomposeBitTest(), llvm::decomposeBitTestICmp(), despeculateCountZeros(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), directlyImpliesPoison(), dominatesMergePoint(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), dropRedundantMaskingOfLeftShiftInput(), evaluateInDifferentElementOrder(), llvm::VPVectorPointerRecipe::execute(), llvm::VPlanTransforms::expandBranchOnTwoConds(), factorizeFAddFSub(), factorizeLerp(), factorizeMathWithShlOps(), findBestNonTrivialUnswitchCandidate(), llvm::vputils::findCanonicalIVIncrement(), llvm::findHistogram(), llvm::vputils::findIncomingAliasMask(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::findScalarElement(), FindSingleBitChange(), llvm::findValuesAffectedByCondition(), fixupVFUsersForEVL(), FlattenLoopPair(), foldAbsDiff(), llvm::InstCombinerImpl::foldAddLikeCommutative(), foldAddToAshr(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfICmpsWithPow2AndWithZero(), foldAndToXor(), foldAnyOrAllBitsSet(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpSelectBinOp(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBitOrderCrossLogicOp(), foldBitwiseLogicWithIntrinsics(), foldBoxMultiply(), foldClampRangeOfTwo(), llvm::InstCombinerImpl::foldCmpSelectOfConstants(), foldComplexAndOrPatterns(), foldConstantInsEltIntoShuffle(), foldCopySignIdioms(), foldCtpop(), foldCttzCtlz(), foldDependentIVs(), llvm::InstCombinerImpl::foldDivCeil(), foldFabsWithFcmpZero(), foldFCmpFAbsFSubIntToFP(), foldFCmpFNegCommonOp(), foldFCmpFpTrunc(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), foldFCmpReciprocalAndZero(), foldFCmpWithFloorAndCeil(), foldFDivConstantDividend(), foldFDivSqrtDivisor(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFNegIntoConstant(), foldFPtoI(), foldFrexpOfSelect(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpEqualityWithOffset(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), foldICmpIntrinsicWithIntrinsic(), foldICmpInvariantGroup(), llvm::InstCombinerImpl::foldICmpMulConstant(), foldICmpOfUAddOv(), foldICmpOfVectorReduce(), foldICmpOrChain(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXorSubChain(), foldICmpOrXX(), foldICmpPow2Test(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldICmpShlLHSC(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUDivConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldICmpUSubSatOrUAddSatWithConstant(), llvm::InstCombinerImpl::foldICmpWithClamp(), llvm::InstCombinerImpl::foldICmpWithConstant(), foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), foldICmpWithHighBitMask(), foldICmpWithLowBitMaskedVal(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpWithTruncSignExtendedVal(), llvm::InstCombinerImpl::foldICmpWithZero(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldICmpXNegX(), llvm::InstCombinerImpl::foldICmpXorConstant(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), foldICmpXorXX(), foldIdentityExtractShuffle(), foldIdentityPaddedShuffles(), foldIDivShl(), foldInsEltIntoIdentityShuffle(), foldInsEltIntoSplat(), foldInsSequenceIntoSplat(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldIsPowerOf2(), foldIsPowerOf2OrZero(), foldLoadsRecursive(), foldLogicCastConstant(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldMaskedAddXorPattern(), foldMinimumOverTrailingOrLeadingZeroCount(), foldMinMaxSharedOp(), foldMulHigh(), foldMulSelectToNegate(), foldMulShl1(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldNegativePower2AndShiftedMask(), foldNotXor(), foldNoWrapAdd(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldOrOfInversions(), llvm::InstCombinerImpl::FoldOrOfLogicalAnds(), FoldOrOfSelectSmaxToAbs(), foldOrToXor(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldPtrToIntOrAddrOfGEP(), foldReductionIdiom(), llvm::InstCombinerImpl::foldReversedIntrinsicOperands(), foldSelectBinOpIdentity(), foldSelectGEP(), llvm::InstCombinerImpl::foldSelectICmp(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpAndBinOp(), foldSelectICmpAndZeroShl(), foldSelectICmpLshrAshr(), foldSelectICmpMinMax(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectShuffleWith1Binop(), foldSelectSplitCTLZ(), foldSelectSplitCTLZCTTZ(), foldSelectSplitCTTZ(), foldSelectZeroOrFixedOp(), foldSetClearBits(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldShuffledIntrinsicOperands(), foldShuffleOfUnaryOps(), foldShuffleWithInsert(), llvm::InstCombinerImpl::foldSignBitTest(), foldSignedTruncationCheck(), foldSpliceBinOp(), foldSqrtWithFcmpZero(), foldSubOfMinMax(), llvm::VPlanTransforms::foldTailByMasking(), foldToUnsignedSaturatedAdd(), foldTruncInsEltPair(), foldTruncShuffle(), foldTwoEntryPHINode(), foldUnsignedUnderflowCheck(), foldURemOfLoopIncrement(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), foldVecExtTruncToExtElt(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), foldXorToXor(), llvm::VPTransformState::get(), llvm::ScalarEvolution::getAddExpr(), getAlternateBinop(), getAppleRuntimeUnrollPreferences(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::GCNTTIImpl::getArithmeticInstrCost(), getBinOpsForFactorization(), getBoolVecFromMask(), getBundleFromUse(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::InstCombiner::getComplexity(), llvm::PredicateBase::getConstraint(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), getDemandedBitsLHSMask(), getDomPredecessorCondition(), llvm::ConstantExpr::getExactLogBase2(), llvm::InstCombiner::getFreelyInvertedImpl(), getFSqrtDivOptPattern(), llvm::ARMTTIImpl::getGatherScatterOpCost(), getHashValueImpl(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::X86TTIImpl::getIntrinsicInstrCost(), getInvertibleOperands(), llvm::AArch64TargetLowering::getJumpConditionMergingParams(), llvm::SystemZTargetLowering::getJumpConditionMergingParams(), llvm::X86TargetLowering::getJumpConditionMergingParams(), getKnownBitsFromAndXorOr(), getKnownSign(), getKnownSignOrZero(), getKnownTypeFromMaskedOp(), getMaskedICmpType(), getMaskedTypeForICmpPair(), getMinimumFPType(), getMinMaxRecurrence(), llvm::ScalarEvolution::getMulExpr(), getNegatibleInsts(), getNextSCEVDivisibleByDivisor(), getNotValue(), getOptimizableIVOf(), llvm::AMDGPUTargetMachine::getPredicatedAddrSpace(), getPreviousSCEVDivisibleByDivisor(), getRangeForIntrinsic(), getRangeForSelectPattern(), getRecipesForUncountableExit(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), llvm::X86TTIImpl::getShuffleCost(), llvm::getSplatValue(), llvm::getStrideFromAddRec(), getStrideFromPointer(), llvm::ScalarEvolution::getUDivExpr(), getUnsignedMonotonicValues(), getValueFromOverflowCondition(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::ScalarEvolution::getZeroExtendExprImpl(), llvm::VPlanTransforms::handleFindLastReductions(), handleFirstArgMinOrMax(), llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleMultiUseReductions(), handleOtherCmpSelSimplifications(), llvm::VPlanTransforms::handleUncountableEarlyExits(), handleUncountableExitsWithSideEffects(), hasConditionalTerminator(), hasNonZeroFPOperands(), llvm::SCEVExpander::hasRelatedExistingExpansion(), hasRequiredFastMathFlags(), haveNoCommonBitsSetSpecialCases(), hoistAdd(), hoistAddSub(), hoistInsEltConst(), hoistMinMax(), llvm::hoistRegion(), hoistSub(), hoistSubAddAssociation(), INITIALIZE_PASS(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::RISCVTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), instCombineSVEDup(), instCombineSVEDupqLane(), instCombineSVELast(), instCombineSVEPairwiseAddLong(), instCombineSVESrshl(), instCombineSVEUzp1(), instCombineSVEVectorFuseMulAddSub(), instCombineSVEVectorMlaU(), instCombineSVEZip(), instCombineXorSVECmpCC(), instCombineZExtSVECmpNE(), llvm::invertCondition(), isAbsoluteValueULEOne(), isAllActivePredicate(), isAllocSiteRemovable(), llvm::SCEV::isAllOnesValue(), isAMXCast(), llvm::RecurrenceDescriptor::isAnyOfPattern(), isBigEndianBitShift(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::isCheckForZeroAndMulWithOverflow(), isConditionalOnXorOfPHIs(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), isConditionTrueViaVFAndUF(), isDeadRecipe(), isDivisibilityGuard(), isDivZero(), llvm::Constant::isElementWiseEqual(), isEqualImpl(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), llvm::RecurrenceDescriptor::isFindPattern(), isFirstIndexZero(), isFNeg(), llvm::isGuard(), llvm::isGuardAsWidenableBranch(), llvm::PatternMatch::immconstant_ty::isImmConstant(), isImpliedCondAndOr(), isImpliedCondFCmps(), isImpliedCondICmps(), llvm::isImpliedCondition(), llvm::isImpliedCondition(), isImpliedToBeAPowerOfTwoFromCond(), llvm::InductionDescriptor::isInductionPHI(), isInstructionPairMul(), llvm::ConstantPtrAuth::isKnownCompatibleWith(), llvm::isKnownIntegral(), llvm::isKnownInversion(), isKnownMonotonic(), llvm::isKnownNegation(), isKnownNonEqual(), isKnownNonNullFromDominatingCondition(), isKnownNonPositive(), isKnownNonZeroFromAssume(), isKnownNonZeroFromOperator(), isKnownPredicateExtendIdiom(), IsKnownPredicateViaAddRecStart(), llvm::isKnownToBeAPowerOfTwo(), isLoopNeverExecuted(), isMaskOrZero(), isMinMaxCmpSelectEliminable(), isMultipleOfN(), isNeg(), isNeutralValue(), isNonEqualMul(), isNonEqualPHIs(), isNonEqualShl(), isNonZeroRecurrence(), llvm::SCEV::isOne(), isOperandOfVmullHighP64(), isPoisonShift(), isPowerOfTwoRecurrence(), isProcessableCondBI(), llvm::AArch64TTIImpl::isProfitableToSinkOperands(), llvm::ARMTTIImpl::isProfitableToSinkOperands(), llvm::GCNTTIImpl::isProfitableToSinkOperands(), llvm::RISCVTTIImpl::isProfitableToSinkOperands(), llvm::WebAssemblyTTIImpl::isProfitableToSinkOperands(), llvm::X86TTIImpl::isProfitableToSinkOperands(), isPTruePromoted(), isReductionCandidate(), isRemOfLoopIncrementWithLoopInvariant(), llvm::isSafeToSpeculativelyExecuteWithOpcode(), isSignedMinMaxClamp(), isSignedMinMaxIntrinsicClamp(), isSimpleCastedPHI(), llvm::MemoryWriteTracking::isSpecialInstruction(), llvm::isSplatValue(), isSpvAggrPlaceholder(), isSSATMinMaxPattern(), isSupportedMemset(), isThreadID(), isTruePredicate(), llvm::SimplifyQuery::isUndefValue(), llvm::vputils::isUsedByLoadStoreAddress(), isUsedWithinShuffleVector(), llvm::isWidenableCondition(), llvm::SCEV::isZero(), legalizeAndOptimizeInductions(), likeBitCastFromVector(), LinearizeExprTree(), lookThroughAnd(), lookThroughCast(), lookThroughCastConst(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), maintainNoSignedWrap(), markAliveBlocks(), llvm::maskContainsAllOneOrUndef(), llvm::PatternMatch::ICmpLike_match< LHS_t, RHS_t >::match(), llvm::PatternMatch::SelectLike_match< CondTy, LTy, RTy >::match(), llvm::PatternMatch::XorLike_match< LHS, RHS >::match(), matchAddCC(), matchAndCC(), matchAndOrChain(), MatchBinarySub(), matchBitmaskMul(), matchClamp(), matchDeMorgansLaws(), MatchDiv(), matchDot4Pattern(), matchEquivZeroRHS(), matchesAdd(), matchesOr(), matchesSquareSum(), matchExpandedRem(), matchFastFloatClamp(), matchFPExtFromF16(), matchICmpOperand(), matchIncrement(), matchIntPart(), matchIsNotNaN(), matchMinMax(), matchMinMaxOfMinMax(), MatchMul(), MatchNotExpr(), matchOpWithOpEqZero(), matchOrCC(), matchOrConcat(), matchPartStore(), matchPopCountBytes(), matchRdxBop(), MatchRem(), matchSelectPattern(), matchSelectWithOptionalNotCond(), matchSignedNewValueCC(), llvm::matchSimpleRecurrence(), matchStridedStart(), matchSubCC(), matchSubIntegerPackFromVector(), llvm::InstCombinerImpl::matchThreeWayIntCompare(), matchUAddWithOverflowConstantEdgeCases(), matchUnorderedInfCompare(), matchXorCC(), matchZExtedSubInteger(), llvm::VPlanTransforms::materializeVectorTripCount(), mayLoopAccessLocation(), llvm::Constant::mergeUndefsWith(), moveAddAfterMinMax(), narrowInsElt(), llvm::VPlanTransforms::narrowInterleaveGroups(), narrowUDivURem(), narrowVectorSelect(), NegateValue(), OptimizeAndOrXor(), optimizeBranch(), optimizeEarlyExitInductionUser(), llvm::VPlanTransforms::optimizeEVLMasks(), llvm::VPlanTransforms::optimizeFindIVReductions(), llvm::VPlanTransforms::optimizeInductionLiveOutUsers(), optimizeLatchExitInductionUser(), optimizeMaskToEVL(), llvm::InstCombinerImpl::OptimizePointerDifference(), optimizeShiftInOrChain(), optimizeSymmetricCall(), optimizeUniformIntrinsic(), optimizeVectorInductionWidthForTCAndVFUF(), parseCondition(), llvm::parseWidenableBranch(), passingValueIsAlwaysUndefined(), llvm::patchReplacementInstruction(), preparePlanForMainVectorLoop(), processAnd(), processLaneForReplicateRegion(), llvm::LoopVectorizePass::processLoop(), processLoop(), processUse(), pullOutPermutations(), reassociateFCmps(), reassociateForUses(), reassociateHeaderMask(), reassociateMinMaxWithConstantInOperand(), reassociateMinMaxWithConstants(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::recognizeBSwapOrBitReverseIdiom(), recordCondition(), llvm::AssumptionCache::registerAssumption(), llvm::VPlanTransforms::removeBranchOnConst(), removeCommonBlendMask(), llvm::VPlanTransforms::removeDeadRecipes(), replaceConditionalBranchesOnConstant(), replaceSubOverflowUses(), llvm::VPlanTransforms::replaceSymbolicStrides(), llvm::Constant::replaceUndefsWith(), llvm::VPlanTransforms::replaceWideCanonicalIVWithWideIV(), requireAssignType(), llvm::AssumptionPrinterPass::run(), llvm::DropUnnecessaryAssumesPass::run(), llvm::LoopVectorizationPlanner::selectBestEpiloguePlan(), setLimitsForBinOp(), setShiftFlags(), llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect(), ShouldBreakUpDistribution(), ShouldBreakUpSubtract(), shouldCanonicalizeGEPToPtrAdd(), shouldSinkVScale(), llvm::TargetTransformInfoImplBase::shouldTreatInstructionLikeSelect(), ShrinkDemandedConstant(), shrinkFPConstantVector(), shrinkInsertElt(), shrinkSplatShuffle(), simplifyAddInst(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfFCmps(), simplifyAndOrOfFCmpsWithConstants(), simplifyAndOrOfICmpsWithConstants(), simplifyAndOrOfICmpsWithCtpop(), simplifyAndOrWithICmpEq(), simplifyAShrInst(), simplifyAssocCastAssoc(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::simplifyBinOpSplats(), simplifyBlends(), simplifyBranchConditionForVFAndUF(), simplifyCastInst(), simplifyCmpSelOfMaxMin(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyDiv(), simplifyDivRem(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), simplifyExtractValueInst(), simplifyFAddInst(), simplifyFCmpInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFNegInst(), simplifyFPOp(), simplifyFRemInst(), simplifyFSubInst(), simplifyGEPInst(), simplifyICmpInst(), simplifyICmpOfBools(), llvm::ScalarEvolution::SimplifyICmpOperands(), simplifyICmpWithBinOp(), simplifyICmpWithBinOpOnLHS(), simplifyICmpWithConstant(), simplifyICmpWithIntrinsicOnLHS(), simplifyICmpWithMinMax(), llvm::simplifyInsertElementInst(), llvm::simplifyInstruction(), simplifyInstructionWithPHI(), llvm::simplifyIntrinsic(), simplifyIRemMulShl(), llvm::VPlanTransforms::simplifyKnownEVL(), simplifyLdexp(), simplifyLogicalRecipe(), simplifyLogicOfAddSub(), llvm::simplifyLoopAfterUnroll(), simplifyLShrInst(), simplifyMulInst(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedBits(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass(), simplifyOperationIntoSelectOperand(), simplifyOrInst(), simplifyOrLogic(), simplifyOrOfICmpsWithAdd(), llvm::InstCombinerImpl::simplifyRangeCheck(), simplifyRecipe(), simplifyReductionOperand(), simplifyRem(), llvm::VPlanTransforms::simplifyReverses(), simplifySelectBitTest(), simplifySelectInst(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySelectWithFCmp(), simplifySelectWithICmpCond(), simplifyShift(), simplifyShiftSelectingPackedElement(), simplifyShlInst(), simplifyShuffleVectorInst(), simplifySRemInst(), simplifySubInst(), simplifySVEIntrinsic(), simplifySwitchOnSelectUsingRanges(), simplifySwitchWhenUMin(), simplifyTernarylogic(), simplifyUnaryIntrinsic(), simplifyUnsignedRangeCheck(), simplifyValueKnownNonZero(), simplifyWithOpsReplaced(), simplifyX86addcarry(), simplifyX86pmulh(), simplifyXorInst(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), skipTrivialSelect(), splitMergedValStore(), llvm::stripNullTest(), llvm::InstCombiner::stripSignOnlyFPOps(), swapICmpOperandsToExposeCSEOpportunities(), llvm::InstCombinerImpl::takeLog2(), tracesToPointerAlloca(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryFactorization(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), trySimplifyICmpWithAdds(), tryToComputeEndValueForInduction(), tryToFoldLiveIns(), tryToFPToSat(), tryToImproveAlign(), tryToMatchAndCreateExtendedReduction(), tryToMatchAndCreateMulAccumulateReduction(), tryToMoveFreeBeforeNullTest(), tryToRecognizePopCount(), tryToRecognizePopCount1(), tryToRecognizePopCount2n3(), tryToRecognizeTableBasedCttz(), tryToRecognizeTableBasedLog2(), tryToReplaceALMWithWideALM(), llvm::JumpThreadingPass::tryToUnfoldSelectInCurrBB(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitCondBrInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToAddr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitStoreInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), llvm::InstCombinerImpl::visitZExt(), and llvm::reassociate::XorOpnd::XorOpnd().

◆ match_fn()

template<typename Val = const Value, typename Pattern>
auto llvm::PatternMatch::match_fn ( const Pattern & P)