|
LLVM
4.0.0
|
Classes | |
| struct | OneUse_match |
| struct | class_match |
| struct | match_combine_or |
| Matching combinators. More... | |
| struct | match_combine_and |
| struct | match_zero |
| struct | match_neg_zero |
| struct | apint_match |
| struct | constantint_match |
| struct | cst_pred_ty |
| This helper class is used to match scalar and vector constants that satisfy a specified predicate. 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 | is_one |
| struct | is_all_ones |
| struct | is_sign_bit |
| struct | is_power2 |
| struct | is_maxsignedvalue |
| struct | bind_ty |
| struct | specificval_ty |
| Match a specified Value*. More... | |
| struct | specific_fpval |
| Match a specified floating point value or vector of all elements of that value. More... | |
| struct | bind_const_intval_ty |
| struct | specific_intval |
| Match a specified integer value or vector of all elements of that. More... | |
| struct | AnyBinaryOp_match |
| struct | BinaryOp_match |
| struct | OverflowingBinaryOp_match |
| struct | BinOp2_match |
| struct | Exact_match |
| struct | CmpClass_match |
| struct | SelectClass_match |
| struct | CastClass_match |
| struct | not_match |
| struct | neg_match |
| struct | fneg_match |
| struct | br_match |
| struct | brc_match |
| struct | MaxMin_match |
| struct | smax_pred_ty |
| Helper class for identifying signed max predicates. More... | |
| struct | smin_pred_ty |
| Helper class for identifying signed min predicates. More... | |
| struct | umax_pred_ty |
| Helper class for identifying unsigned max predicates. More... | |
| struct | umin_pred_ty |
| Helper class for identifying unsigned min predicates. More... | |
| 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 | ufmax_pred_ty |
| Helper class for identifying unordered max predicates. More... | |
| struct | ufmin_pred_ty |
| Helper class for identifying unordered min predicates. More... | |
| struct | UAddWithOverflow_match |
| struct | Argument_match |
| struct | IntrinsicID_match |
| Intrinsic matchers. More... | |
| struct | m_Intrinsic_Ty |
| Intrinsic matches are combinations of ID matchers, and argument matchers. More... | |
| struct | m_Intrinsic_Ty< T0 > |
| struct | m_Intrinsic_Ty< T0, T1 > |
| struct | m_Intrinsic_Ty< T0, T1, T2 > |
| struct | m_Intrinsic_Ty< T0, T1, T2, T3 > |
| struct | Signum_match |
Functions | |
| template<typename Val , typename Pattern > | |
| bool | match (Val *V, const Pattern &P) |
| template<typename T > | |
| OneUse_match< T > | m_OneUse (const T &SubPattern) |
| class_match< Value > | m_Value () |
| Match an arbitrary value and ignore it. More... | |
| class_match< BinaryOperator > | m_BinOp () |
| Match an arbitrary binary operation and ignore it. More... | |
| class_match< CmpInst > | m_Cmp () |
| Matches any compare instruction and ignore it. More... | |
| class_match< ConstantInt > | m_ConstantInt () |
| Match an arbitrary ConstantInt and ignore it. More... | |
| class_match< UndefValue > | m_Undef () |
| Match an arbitrary undef constant. More... | |
| class_match< Constant > | m_Constant () |
| Match an arbitrary Constant and ignore it. More... | |
| template<typename LTy , typename RTy > | |
| match_combine_or< LTy, RTy > | m_CombineOr (const LTy &L, const RTy &R) |
| Combine two pattern matchers matching L || R. More... | |
| template<typename LTy , typename RTy > | |
| match_combine_and< LTy, RTy > | m_CombineAnd (const LTy &L, const RTy &R) |
| Combine two pattern matchers matching L && R. More... | |
| match_zero | m_Zero () |
| Match an arbitrary zero/null constant. More... | |
| match_neg_zero | m_NegZero () |
| Match an arbitrary zero/null constant. More... | |
| match_combine_or< match_zero, match_neg_zero > | m_AnyZero () |
| |
| apint_match | m_APInt (const APInt *&Res) |
| Match a ConstantInt or splatted ConstantVector, binding the specified pointer to the contained APInt. More... | |
| cst_pred_ty< is_one > | m_One () |
| Match an integer 1 or a vector with all elements equal to 1. More... | |
| api_pred_ty< is_one > | m_One (const APInt *&V) |
| cst_pred_ty< is_all_ones > | m_AllOnes () |
| Match an integer or vector with all bits set to true. More... | |
| api_pred_ty< is_all_ones > | m_AllOnes (const APInt *&V) |
| cst_pred_ty< is_sign_bit > | m_SignBit () |
| Match an integer or vector with only the sign bit(s) set. More... | |
| api_pred_ty< is_sign_bit > | m_SignBit (const APInt *&V) |
| cst_pred_ty< is_power2 > | m_Power2 () |
| Match an integer or vector power of 2. More... | |
| api_pred_ty< is_power2 > | m_Power2 (const APInt *&V) |
| cst_pred_ty< is_maxsignedvalue > | m_MaxSignedValue () |
| api_pred_ty< is_maxsignedvalue > | m_MaxSignedValue (const APInt *&V) |
| bind_ty< Value > | m_Value (Value *&V) |
| Match a value, capturing it if we match. More... | |
| bind_ty< const Value > | m_Value (const Value *&V) |
| bind_ty< Instruction > | m_Instruction (Instruction *&I) |
| Match an instruction, capturing it if we match. More... | |
| bind_ty< BinaryOperator > | m_BinOp (BinaryOperator *&I) |
| Match a binary operator, capturing it if we match. More... | |
| bind_ty< ConstantInt > | m_ConstantInt (ConstantInt *&CI) |
| Match a ConstantInt, capturing the value if we match. More... | |
| bind_ty< Constant > | m_Constant (Constant *&C) |
| Match a Constant, capturing the value if we match. More... | |
| bind_ty< ConstantFP > | m_ConstantFP (ConstantFP *&C) |
| Match a ConstantFP, capturing the value if we match. More... | |
| specificval_ty | m_Specific (const Value *V) |
| Match if we have a specific specified value. More... | |
| specific_fpval | m_SpecificFP (double V) |
| Match a specific floating point value or vector with all elements equal to the value. More... | |
| specific_fpval | m_FPOne () |
| Match a float 1.0 or vector with all elements equal to 1.0. More... | |
| specific_intval | m_SpecificInt (uint64_t V) |
| Match a specific integer value or vector with all elements equal to the value. More... | |
| bind_const_intval_ty | m_ConstantInt (uint64_t &V) |
| Match a ConstantInt and bind to its value. More... | |
| template<typename LHS , typename RHS > | |
| AnyBinaryOp_match< LHS, RHS > | m_BinOp (const LHS &L, const RHS &R) |
| 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 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 , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoSignedWrap > | m_NSWAdd (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoSignedWrap > | m_NSWSub (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoSignedWrap > | m_NSWMul (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoSignedWrap > | m_NSWShl (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Add, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWAdd (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Sub, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWSub (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Mul, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWMul (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| OverflowingBinaryOp_match< LHS, RHS, Instruction::Shl, OverflowingBinaryOperator::NoUnsignedWrap > | m_NUWShl (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::AShr > | m_Shr (const LHS &L, const RHS &R) |
| Matches LShr or AShr. More... | |
| template<typename LHS , typename RHS > | |
| BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::Shl > | m_LogicalShift (const LHS &L, const RHS &R) |
| Matches LShr or Shl. More... | |
| template<typename LHS , typename RHS > | |
| BinOp2_match< LHS, RHS, Instruction::SDiv, Instruction::UDiv > | m_IDiv (const LHS &L, const RHS &R) |
| Matches UDiv and SDiv. More... | |
| template<typename T > | |
| Exact_match< T > | m_Exact (const T &SubPattern) |
| template<typename LHS , typename RHS > | |
| CmpClass_match< LHS, RHS, CmpInst, CmpInst::Predicate > | m_Cmp (CmpInst::Predicate &Pred, const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| CmpClass_match< LHS, RHS, ICmpInst, ICmpInst::Predicate > | m_ICmp (ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| CmpClass_match< LHS, RHS, FCmpInst, FCmpInst::Predicate > | m_FCmp (FCmpInst::Predicate &Pred, const LHS &L, const RHS &R) |
| template<typename Cond , typename LHS , typename RHS > | |
| SelectClass_match< Cond, LHS, RHS > | m_Select (const Cond &C, const LHS &L, const RHS &R) |
| template<int64_t L, int64_t R, typename Cond > | |
| SelectClass_match< Cond, constantint_match< L > , constantint_match< R > > | m_SelectCst (const Cond &C) |
| This matches a select of two constants, e.g. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::BitCast > | m_BitCast (const OpTy &Op) |
| Matches BitCast. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::PtrToInt > | m_PtrToInt (const OpTy &Op) |
| Matches PtrToInt. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::Trunc > | m_Trunc (const OpTy &Op) |
| Matches Trunc. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::SExt > | m_SExt (const OpTy &Op) |
| Matches SExt. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::ZExt > | m_ZExt (const OpTy &Op) |
| Matches ZExt. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::UIToFP > | m_UIToFP (const OpTy &Op) |
| Matches UIToFP. More... | |
| template<typename OpTy > | |
| CastClass_match< OpTy, Instruction::SIToFP > | m_SIToFP (const OpTy &Op) |
| Matches SIToFP. More... | |
| template<typename LHS > | |
| not_match< LHS > | m_Not (const LHS &L) |
| template<typename LHS > | |
| neg_match< LHS > | m_Neg (const LHS &L) |
| Match an integer negate. More... | |
| template<typename LHS > | |
| fneg_match< LHS > | m_FNeg (const LHS &L) |
| Match a floating point negate. More... | |
| br_match | m_UnconditionalBr (BasicBlock *&Succ) |
| template<typename Cond_t > | |
| brc_match< Cond_t > | m_Br (const Cond_t &C, BasicBlock *&T, BasicBlock *&F) |
| template<typename LHS , typename RHS > | |
| MaxMin_match< ICmpInst, LHS, RHS, smax_pred_ty > | m_SMax (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| MaxMin_match< ICmpInst, LHS, RHS, smin_pred_ty > | m_SMin (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| MaxMin_match< ICmpInst, LHS, RHS, umax_pred_ty > | m_UMax (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| MaxMin_match< ICmpInst, LHS, RHS, umin_pred_ty > | m_UMin (const LHS &L, const RHS &R) |
| template<typename LHS , typename RHS > | |
| MaxMin_match< FCmpInst, LHS, RHS, ofmax_pred_ty > | m_OrdFMax (const LHS &L, const RHS &R) |
| Match an 'ordered' floating point maximum function. More... | |
| template<typename LHS , typename RHS > | |
| MaxMin_match< FCmpInst, LHS, RHS, ofmin_pred_ty > | m_OrdFMin (const LHS &L, const RHS &R) |
| Match an 'ordered' floating point minimum function. More... | |
| template<typename LHS , typename RHS > | |
| MaxMin_match< FCmpInst, LHS, RHS, ufmax_pred_ty > | m_UnordFMax (const LHS &L, const RHS &R) |
| Match an 'unordered' floating point maximum function. More... | |
| 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. More... | |
| template<typename LHS , typename RHS > | |
| MaxMin_match< FCmpInst, LHS, RHS, ufmin_pred_ty > | m_UnordFMin (const LHS &L, const RHS &R) |
| Match an 'unordered' floating point minimum function. More... | |
| template<unsigned OpI, typename Opnd_t > | |
| Argument_match< Opnd_t > | m_Argument (const Opnd_t &Op) |
| Match an argument. More... | |
| template<Intrinsic::ID IntrID> | |
| IntrinsicID_match | m_Intrinsic () |
| Match intrinsic calls like this: m_Intrinsic<Intrinsic::fabs>(m_Value(X)) More... | |
| template<Intrinsic::ID IntrID, typename T0 > | |
| m_Intrinsic_Ty< T0 >::Ty | m_Intrinsic (const T0 &Op0) |
| template<Intrinsic::ID IntrID, typename T0 , typename T1 > | |
| m_Intrinsic_Ty< T0, T1 >::Ty | m_Intrinsic (const T0 &Op0, const T1 &Op1) |
| template<Intrinsic::ID IntrID, typename T0 , typename T1 , typename T2 > | |
| m_Intrinsic_Ty< T0, T1, T2 >::Ty | m_Intrinsic (const T0 &Op0, const T1 &Op1, const T2 &Op2) |
| template<Intrinsic::ID IntrID, typename T0 , typename T1 , typename T2 , typename T3 > | |
| m_Intrinsic_Ty< T0, T1, T2, T3 > ::Ty | m_Intrinsic (const T0 &Op0, const T1 &Op1, const T2 &Op2, const T3 &Op3) |
| template<typename Opnd0 > | |
| m_Intrinsic_Ty< Opnd0 >::Ty | m_BSwap (const Opnd0 &Op0) |
| template<typename Opnd0 , typename Opnd1 > | |
| m_Intrinsic_Ty< Opnd0, Opnd1 >::Ty | m_FMin (const Opnd0 &Op0, const Opnd1 &Op1) |
| template<typename Opnd0 , typename Opnd1 > | |
| m_Intrinsic_Ty< Opnd0, Opnd1 >::Ty | m_FMax (const Opnd0 &Op0, const Opnd1 &Op1) |
| template<typename Val_t > | |
| Signum_match< Val_t > | m_Signum (const Val_t &V) |
| Matches a signum pattern. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or < CmpClass_match< LHS, RHS, ICmpInst, ICmpInst::Predicate > , CmpClass_match< RHS, LHS, ICmpInst, ICmpInst::Predicate > > | m_c_ICmp (ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) |
| Matches an ICmp with a predicate over LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or < BinaryOp_match< LHS, RHS, Instruction::And > , BinaryOp_match< RHS, LHS, Instruction::And > > | m_c_And (const LHS &L, const RHS &R) |
| Matches an And with LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or < BinaryOp_match< LHS, RHS, Instruction::Or > , BinaryOp_match< RHS, LHS, Instruction::Or > > | m_c_Or (const LHS &L, const RHS &R) |
| Matches an Or with LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or < BinaryOp_match< LHS, RHS, Instruction::Xor > , BinaryOp_match< RHS, LHS, Instruction::Xor > > | m_c_Xor (const LHS &L, const RHS &R) |
| Matches an Xor with LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or< MaxMin_match < ICmpInst, LHS, RHS, smin_pred_ty >, MaxMin_match < ICmpInst, RHS, LHS, smin_pred_ty > > | m_c_SMin (const LHS &L, const RHS &R) |
| Matches an SMin with LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or< MaxMin_match < ICmpInst, LHS, RHS, smax_pred_ty >, MaxMin_match < ICmpInst, RHS, LHS, smax_pred_ty > > | m_c_SMax (const LHS &L, const RHS &R) |
| Matches an SMax with LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or< MaxMin_match < ICmpInst, LHS, RHS, umin_pred_ty >, MaxMin_match < ICmpInst, RHS, LHS, umin_pred_ty > > | m_c_UMin (const LHS &L, const RHS &R) |
| Matches a UMin with LHS and RHS in either order. More... | |
| template<typename LHS , typename RHS > | |
| match_combine_or< MaxMin_match < ICmpInst, LHS, RHS, umax_pred_ty >, MaxMin_match < ICmpInst, RHS, LHS, umax_pred_ty > > | m_c_UMax (const LHS &L, const RHS &R) |
| Matches a UMax with LHS and RHS in either order. More... | |
|
inline |
Definition at line 434 of file PatternMatch.h.
References L.
Referenced by checkForNegativeOperand(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsFromOperator(), llvm::findScalarElement(), llvm::InstCombiner::FoldOrOfICmps(), getValueFromICmpCondition(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), matchesAdd(), SimplifyAndOfICmps(), SimplifyOrInst(), SimplifyOrOfICmps(), SimplifySubInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitSwitchInst().
|
inline |
Match an integer or vector with all bits set to true.
Definition at line 252 of file PatternMatch.h.
Referenced by areInverseVectorBitmasks(), SimplifyAndInst(), SimplifyAShrInst(), SimplifyGEPInst(), SimplifyOrInst(), simplifySelectWithICmpCond(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSub().
|
inline |
Definition at line 255 of file PatternMatch.h.
|
inline |
Definition at line 506 of file PatternMatch.h.
References L.
Referenced by checkForNegativeOperand(), llvm::InstCombiner::FoldAndOfICmps(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), llvm::InstCombiner::FoldXorWithConstants(), isKnownToBeAPowerOfTwo(), llvm::RecurrenceDescriptor::lookThroughAnd(), m_c_And(), processUMulZExtIdiom(), simplifyICmpWithBinOp(), simplifyICmpWithConstant(), SimplifyOrInst(), simplifySelectBitTest(), simplifySelectWithICmpCond(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
|
inline |
This includes zero_initializer for vectors and ConstantPointerNull for pointers. For floating point constants, this will match negative zero and positive zero
Definition at line 156 of file PatternMatch.h.
References m_CombineOr(), m_NegZero(), and m_Zero().
Referenced by SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMulInst(), SimplifyFRemInst(), SimplifyFSubInst(), and llvm::InstCombiner::visitFAdd().
|
inline |
Match a ConstantInt or splatted ConstantVector, binding the specified pointer to the contained APInt.
Definition at line 180 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), computeKnownBits(), ComputeNumSignBits(), llvm::ConstantFoldBinaryInstruction(), foldUDivShl(), getLogBase2Vector(), isKnownToBeAPowerOfTwo(), llvm::isSafeToSpeculativelyExecute(), isTruePredicate(), llvm::RecurrenceDescriptor::lookThroughAnd(), MaintainNoSignedWrap(), matchMinMax(), matchSelectPattern(), SimplifyAndOfICmps(), SimplifyICmpInst(), simplifyICmpWithBinOp(), simplifyICmpWithConstant(), SimplifyOrOfICmps(), simplifySelectBitTest(), simplifySelectWithICmpCond(), tryFactorization(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitUDiv(), and llvm::InstCombiner::visitURem().
|
inline |
Match an argument.
Definition at line 1183 of file PatternMatch.h.
|
inline |
Definition at line 536 of file PatternMatch.h.
References L.
Referenced by computeKnownBitsFromAssume(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), SimplifyGEPInst(), simplifyICmpWithConstant(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitSExt(), and llvm::InstCombiner::visitSub().
|
inline |
Match an arbitrary binary operation and ignore it.
Definition at line 67 of file PatternMatch.h.
Referenced by foldBitCastBitwiseLogic().
|
inline |
Match a binary operator, capturing it if we match.
Definition at line 302 of file PatternMatch.h.
References I.
|
inline |
Definition at line 406 of file PatternMatch.h.
References L.
|
inline |
Matches BitCast.
Definition at line 789 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldLogicCastConstant(), foldVecTruncToExtElt(), and matchSelectFromAndOr().
|
inline |
Definition at line 942 of file PatternMatch.h.
Referenced by llvm::SCEVExpander::getRelatedExistingExpansion(), tryToMoveFreeBeforeNullTest(), and llvm::InstCombiner::visitBranchInst().
|
inline |
Definition at line 1259 of file PatternMatch.h.
Referenced by llvm::InstCombiner::visitCallInst().
|
inline |
Matches an And with LHS and RHS in either order.
Definition at line 1332 of file PatternMatch.h.
References m_And(), and m_CombineOr().
Referenced by computeKnownBitsFromAssume(), llvm::InstCombiner::visitOr(), and llvm::InstCombiner::visitXor().
|
inline |
Matches an ICmp with a predicate over LHS and RHS in either order.
Does not swap the predicate.
Definition at line 1324 of file PatternMatch.h.
References m_CombineOr(), and m_ICmp().
Referenced by computeKnownBitsFromAssume(), and isKnownNonNullFromDominatingCondition().
|
inline |
Matches an Or with LHS and RHS in either order.
Definition at line 1340 of file PatternMatch.h.
References m_CombineOr(), and m_Or().
Referenced by computeKnownBitsFromAssume(), simplifyICmpWithBinOp(), llvm::InstCombiner::visitAnd(), and llvm::InstCombiner::visitXor().
|
inline |
Matches an SMax with LHS and RHS in either order.
Definition at line 1363 of file PatternMatch.h.
References m_CombineOr(), and m_SMax().
Referenced by foldICmpWithMinMax().
|
inline |
Matches an SMin with LHS and RHS in either order.
Definition at line 1356 of file PatternMatch.h.
References m_CombineOr(), and m_SMin().
Referenced by foldICmpWithMinMax().
|
inline |
Matches a UMax with LHS and RHS in either order.
Definition at line 1377 of file PatternMatch.h.
References m_CombineOr(), and m_UMax().
Referenced by foldICmpWithMinMax().
|
inline |
Matches a UMin with LHS and RHS in either order.
Definition at line 1370 of file PatternMatch.h.
References m_CombineOr(), and m_UMin().
Referenced by foldICmpWithMinMax().
|
inline |
Matches an Xor with LHS and RHS in either order.
Definition at line 1348 of file PatternMatch.h.
References m_CombineOr(), and m_Xor().
Referenced by computeKnownBitsFromAssume(), and llvm::InstCombiner::visitOr().
|
inline |
Matches any compare instruction and ignore it.
Definition at line 72 of file PatternMatch.h.
|
inline |
Definition at line 720 of file PatternMatch.h.
References L.
|
inline |
Combine two pattern matchers matching L && R.
Definition at line 123 of file PatternMatch.h.
References L.
Referenced by m_Intrinsic().
|
inline |
Combine two pattern matchers matching L || R.
Definition at line 117 of file PatternMatch.h.
References L.
Referenced by computeKnownBitsFromAssume(), foldVecTruncToExtElt(), getSelectCondition(), llvm::RecurrenceDescriptor::lookThroughAnd(), m_AnyZero(), m_c_And(), m_c_ICmp(), m_c_Or(), m_c_SMax(), m_c_SMin(), m_c_UMax(), m_c_UMin(), m_c_Xor(), markAliveBlocks(), simplifyICmpWithBinOp(), and llvm::AssumptionCache::updateAffectedValues().
|
inline |
Match an arbitrary Constant and ignore it.
Definition at line 83 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonShiftTransforms(), llvm::findScalarElement(), foldConstantInsEltIntoShuffle(), foldLogicCastConstant(), getSelectCondition(), llvm::IsFreeToInvert(), simplifyAssocCastAssoc(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and llvm::InstCombiner::visitZExt().
Match a Constant, capturing the value if we match.
Definition at line 308 of file PatternMatch.h.
References C.
|
inline |
Match a ConstantFP, capturing the value if we match.
Definition at line 311 of file PatternMatch.h.
References C.
|
inline |
Match an arbitrary ConstantInt and ignore it.
Match a ConstantInt with a specific value.
Definition at line 75 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), computeKnownBitsFromAssume(), llvm::InstCombiner::FoldAndOfICmps(), foldConstantInsEltIntoShuffle(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldOrWithConstants(), llvm::InstCombiner::FoldShiftByConstant(), foldVecTruncToExtElt(), llvm::InstCombiner::FoldXorWithConstants(), getValueFromICmpCondition(), isKnownNonZero(), matchesAdd(), matchesOr(), processUMulZExtIdiom(), SimplifyDiv(), SimplifyGEPInst(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitSwitchInst(), and llvm::InstCombiner::visitTrunc().
|
inline |
Match a ConstantInt, capturing the value if we match.
Definition at line 305 of file PatternMatch.h.
|
inline |
Match a ConstantInt and bind to its value.
This does not match ConstantInts wider than 64-bits.
Definition at line 387 of file PatternMatch.h.
|
inline |
Definition at line 691 of file PatternMatch.h.
Referenced by isKnownNonZero(), isKnownToBeAPowerOfTwo(), SimplifyMulInst(), SimplifyShlInst(), and llvm::InstCombiner::visitUDiv().
|
inline |
Definition at line 440 of file PatternMatch.h.
References L.
|
inline |
Definition at line 732 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::visitBranchInst().
|
inline |
Definition at line 482 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::visitFDiv().
|
inline |
Definition at line 1270 of file PatternMatch.h.
Referenced by simplifyMinnumMaxnum().
|
inline |
Definition at line 1264 of file PatternMatch.h.
Referenced by simplifyMinnumMaxnum().
|
inline |
Definition at line 464 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::visitFDiv(), and llvm::InstCombiner::visitFMul().
|
inline |
Match a floating point negate.
Definition at line 900 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFCmpInst(), and llvm::InstCombiner::visitFDiv().
|
inline |
Match a float 1.0 or vector with all elements equal to 1.0.
Definition at line 346 of file PatternMatch.h.
References m_SpecificFP().
Referenced by SimplifyFDivInst(), SimplifyFMulInst(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 500 of file PatternMatch.h.
References L.
|
inline |
Definition at line 452 of file PatternMatch.h.
References L.
Referenced by SimplifyFAddInst(), and SimplifyFSubInst().
|
inline |
Definition at line 726 of file PatternMatch.h.
References L.
Referenced by computeKnownBitsFromAssume(), llvm::SCEVExpander::getRelatedExistingExpansion(), llvm::isImpliedCondition(), m_c_ICmp(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), SimplifyAndOfICmps(), simplifyAndOfICmpsWithSameOperands(), SimplifyOrOfICmps(), simplifyOrOfICmpsWithSameOperands(), simplifySelectWithICmpCond(), simplifyUnsignedRangeCheck(), tryToMoveFreeBeforeNullTest(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitBranchInst(), and llvm::InstCombiner::visitCallInst().
|
inline |
Matches UDiv and SDiv.
Definition at line 672 of file PatternMatch.h.
References L.
Referenced by isKnownNonZero(), and SimplifyMulInst().
|
inline |
Match an instruction, capturing it if we match.
Definition at line 300 of file PatternMatch.h.
References I.
Referenced by CombineUAddWithOverflow(), llvm::SCEVExpander::getRelatedExistingExpansion(), llvm::RecurrenceDescriptor::lookThroughAnd(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitICmpInst().
|
inline |
Match intrinsic calls like this: m_Intrinsic<Intrinsic::fabs>(m_Value(X))
Definition at line 1229 of file PatternMatch.h.
|
inline |
Definition at line 1234 of file PatternMatch.h.
References m_CombineAnd().
|
inline |
Definition at line 1239 of file PatternMatch.h.
References m_CombineAnd().
|
inline |
Definition at line 1246 of file PatternMatch.h.
References m_CombineAnd().
|
inline |
Definition at line 1253 of file PatternMatch.h.
References m_CombineAnd().
|
inline |
|
inline |
Definition at line 530 of file PatternMatch.h.
References L.
Referenced by CanEvaluateShifted(), computeKnownBitsFromAssume(), foldVecTruncToExtElt(), isKnownToBeAPowerOfTwo(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), simplifyICmpWithBinOp(), simplifyICmpWithConstant(), simplifyValueKnownNonZero(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and llvm::InstCombiner::visitUDiv().
|
inline |
Definition at line 279 of file PatternMatch.h.
|
inline |
Definition at line 280 of file PatternMatch.h.
|
inline |
Definition at line 458 of file PatternMatch.h.
References L.
Referenced by isKnownNonZero(), SimplifyDiv(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSub().
Match an integer negate.
Definition at line 877 of file PatternMatch.h.
References L.
Referenced by isKnownToBeAPowerOfTwo(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), matchSelectPattern(), SimplifyAndInst(), simplifyICmpWithBinOp(), llvm::InstCombiner::visitGetElementPtrInst(), and llvm::InstCombiner::visitSub().
|
inline |
Match an arbitrary zero/null constant.
This includes zero_initializer for vectors and ConstantPointerNull for pointers. For floating point constants, this will match negative zero but not positive zero
Definition at line 151 of file PatternMatch.h.
Referenced by m_AnyZero(), SimplifyFAddInst(), and SimplifyFSubInst().
Definition at line 854 of file PatternMatch.h.
References L.
Referenced by computeKnownBitsFromAssume(), foldBoolSextMaskToSelect(), getSelectCondition(), matchMinMax(), SimplifyAddInst(), SimplifyAndInst(), SimplifyOrInst(), SimplifyXorInst(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitXor().
|
inline |
Definition at line 569 of file PatternMatch.h.
References llvm::MCID::Add, L, and llvm::OverflowingBinaryOperator::NoSignedWrap.
Referenced by isKnownNonZero(), and isTruePredicate().
|
inline |
Definition at line 585 of file PatternMatch.h.
References L, and llvm::OverflowingBinaryOperator::NoSignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms().
|
inline |
Definition at line 593 of file PatternMatch.h.
References L, and llvm::OverflowingBinaryOperator::NoSignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms(), SimplifyAShrInst(), and simplifyICmpWithConstant().
|
inline |
Definition at line 577 of file PatternMatch.h.
References L, and llvm::OverflowingBinaryOperator::NoSignedWrap.
Referenced by matchMinMax(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSDiv().
|
inline |
Definition at line 602 of file PatternMatch.h.
References llvm::MCID::Add, L, and llvm::OverflowingBinaryOperator::NoUnsignedWrap.
Referenced by isKnownNonZero(), isTruePredicate(), simplifyICmpWithConstant(), and llvm::InstCombiner::visitAdd().
|
inline |
Definition at line 618 of file PatternMatch.h.
References L, and llvm::OverflowingBinaryOperator::NoUnsignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms().
|
inline |
Definition at line 626 of file PatternMatch.h.
References L, and llvm::OverflowingBinaryOperator::NoUnsignedWrap.
Referenced by llvm::InstCombiner::commonIDivTransforms(), simplifyICmpWithConstant(), and SimplifyLShrInst().
|
inline |
Definition at line 610 of file PatternMatch.h.
References L, and llvm::OverflowingBinaryOperator::NoUnsignedWrap.
|
inline |
Match an integer 1 or a vector with all elements equal to 1.
Definition at line 244 of file PatternMatch.h.
Referenced by checkForNegativeOperand(), llvm::ConstantFoldBinaryInstruction(), despeculateCountZeros(), foldCttzCtlz(), foldICmpShlOne(), isKnownToBeAPowerOfTwo(), SimplifyDiv(), simplifyICmpOfBools(), SimplifyMulInst(), SimplifyRem(), simplifyValueKnownNonZero(), ThreadCmpOverSelect(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitURem().
|
inline |
Definition at line 245 of file PatternMatch.h.
|
inline |
Definition at line 55 of file PatternMatch.h.
Referenced by foldBitCastBitwiseLogic(), foldBitCastSelect(), foldLogicCastConstant(), llvm::InstCombiner::FoldShiftByConstant(), matchSelectFromAndOr(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitZExt().
|
inline |
Definition at line 512 of file PatternMatch.h.
References L.
Referenced by checkForNegativeOperand(), foldSelectICmpAndOr(), isKnownNonZero(), isTruePredicate(), m_c_Or(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), matchesOr(), SimplifyAndInst(), simplifyICmpWithConstant(), simplifySelectBitTest(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitXor().
|
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 1074 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern().
|
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.
max(L, R) iff L and R are not NaN
m_OrdFMin(L, R) = R iff L or R are NaN
Definition at line 1089 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern().
|
inline |
Match an integer or vector power of 2.
Definition at line 272 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonShiftTransforms(), foldSelectICmpAndOr(), and visitUDivOperand().
|
inline |
Definition at line 273 of file PatternMatch.h.
|
inline |
Matches PtrToInt.
Definition at line 795 of file PatternMatch.h.
Referenced by computeKnownBitsFromAssume(), SimplifyGEPInst(), SimplifySubInst(), llvm::InstCombiner::visitGetElementPtrInst(), and llvm::InstCombiner::visitSub().
|
inline |
Definition at line 476 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::commonIDivTransforms(), SimplifyGEPInst(), simplifyICmpWithConstant(), llvm::InstCombiner::visitGetElementPtrInst(), and llvm::InstCombiner::visitSub().
|
inline |
Definition at line 758 of file PatternMatch.h.
Referenced by foldBitCastSelect(), m_SelectCst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitICmpInst(), and llvm::InstCombiner::visitOr().
|
inline |
This matches a select of two constants, e.g.
: m_SelectCst<-1, 0>(m_Value(V))
Definition at line 767 of file PatternMatch.h.
References m_Select().
|
inline |
Matches SExt.
Definition at line 807 of file PatternMatch.h.
Referenced by foldBoolSextMaskToSelect(), getSelectCondition(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitTrunc().
|
inline |
Definition at line 524 of file PatternMatch.h.
References L.
Referenced by CanEvaluateShifted(), computeKnownBitsFromAssume(), foldICmpShlOne(), foldUDivShl(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), simplifyICmpWithBinOp(), simplifyValueKnownNonZero(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and visitUDivOperand().
|
inline |
Matches LShr or AShr.
Definition at line 658 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::FoldShiftByConstant(), isKnownNonZero(), SimplifyShlInst(), and llvm::InstCombiner::visitTrunc().
|
inline |
Match an integer or vector with only the sign bit(s) set.
Definition at line 262 of file PatternMatch.h.
Referenced by isKnownToBeAPowerOfTwo().
|
inline |
Definition at line 265 of file PatternMatch.h.
|
inline |
Matches a signum pattern.
signum(x) = x > 0 -> 1 x == 0 -> 0 x < 0 -> -1
Definition at line 1311 of file PatternMatch.h.
|
inline |
Matches SIToFP.
Definition at line 825 of file PatternMatch.h.
|
inline |
Definition at line 1041 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), m_c_SMax(), and simplifyICmpWithMinMax().
|
inline |
Definition at line 1047 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), m_c_SMin(), and simplifyICmpWithMinMax().
|
inline |
Match if we have a specific specified value.
Definition at line 322 of file PatternMatch.h.
Referenced by llvm::InstCombiner::commonIDivTransforms(), computeKnownBitsFromAssume(), computeKnownBitsFromOperator(), llvm::InstCombiner::FoldAndOfICmps(), foldICmpWithMinMax(), llvm::InstCombiner::FoldOrOfICmps(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), getSelectCondition(), getValueFromICmpCondition(), isKnownNonNullFromDominatingCondition(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), isTruePredicate(), matchMinMax(), matchSelectPattern(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAndOfICmps(), simplifyAndOfICmpsWithSameOperands(), SimplifyAShrInst(), SimplifyDiv(), SimplifyFAddInst(), SimplifyGEPInst(), simplifyICmpWithBinOp(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyOrOfICmps(), simplifyOrOfICmpsWithSameOperands(), SimplifyRem(), simplifySelectBitTest(), SimplifyShlInst(), simplifyUnsignedRangeCheck(), SimplifyXorInst(), tryToMoveFreeBeforeNullTest(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
|
inline |
Match a specific floating point value or vector with all elements equal to the value.
Definition at line 343 of file PatternMatch.h.
Referenced by detectLog2OfHalf(), m_FPOne(), and llvm::InstCombiner::visitFMul().
|
inline |
Match a specific integer value or vector with all elements equal to the value.
Definition at line 383 of file PatternMatch.h.
Referenced by llvm::PatternMatch::Signum_match< Opnd_t >::match(), and SimplifyGEPInst().
|
inline |
Definition at line 494 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonShiftTransforms(), SimplifyDiv(), simplifyICmpWithConstant(), and SimplifyRem().
|
inline |
Definition at line 446 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::commonIDivTransforms(), SimplifyAddInst(), SimplifyGEPInst(), SimplifySubInst(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitMul(), and llvm::InstCombiner::visitSub().
|
inline |
Matches Trunc.
Definition at line 801 of file PatternMatch.h.
Referenced by llvm::InstCombiner::FoldAndOfICmps(), simplifySelectWithFakeICmpEq(), SimplifySubInst(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitZExt().
| 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 1151 of file PatternMatch.h.
References L.
Referenced by CombineUAddWithOverflow(), and llvm::InstCombiner::visitICmpInst().
|
inline |
Definition at line 470 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::commonIDivTransforms(), isKnownToBeAPowerOfTwo(), SimplifyDiv(), simplifyICmpWithBinOp(), and simplifyICmpWithConstant().
|
inline |
Matches UIToFP.
Definition at line 819 of file PatternMatch.h.
|
inline |
Definition at line 1053 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), m_c_UMax(), and simplifyICmpWithMinMax().
|
inline |
Definition at line 1059 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), m_c_UMin(), and simplifyICmpWithMinMax().
|
inline |
Definition at line 922 of file PatternMatch.h.
Referenced by tryToMoveFreeBeforeNullTest().
|
inline |
Match an arbitrary undef constant.
Definition at line 80 of file PatternMatch.h.
Referenced by llvm::ConstantFoldBinaryInstruction(), markAliveBlocks(), SimplifyAddInst(), SimplifyAndInst(), SimplifyDiv(), SimplifyFDivInst(), SimplifyFRemInst(), SimplifyInsertValueInst(), SimplifyIntrinsic(), SimplifyMulInst(), SimplifyOrInst(), SimplifyRem(), SimplifyRightShift(), SimplifyShlInst(), SimplifySubInst(), and SimplifyXorInst().
|
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_UnordFMin(L, R) = L iff L or R are NaN
Definition at line 1105 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern().
|
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.
max(L, R) iff L and R are not NaN
m_UnordFMin(L, R) = L iff L or R are NaN
Definition at line 1166 of file PatternMatch.h.
References L.
Referenced by llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern().
|
inline |
Definition at line 488 of file PatternMatch.h.
References L.
Referenced by llvm::InstCombiner::commonIDivTransforms(), SimplifyDiv(), simplifyICmpWithBinOp(), simplifyICmpWithConstant(), and SimplifyRem().
|
inline |
Match an arbitrary value and ignore it.
Definition at line 64 of file PatternMatch.h.
Referenced by CanEvaluateShifted(), checkForNegativeOperand(), CombineUAddWithOverflow(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsFromAssume(), computeKnownBitsFromOperator(), llvm::findScalarElement(), llvm::InstCombiner::FoldAndOfICmps(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBoolSextMaskToSelect(), foldICmpShlOne(), foldICmpWithMinMax(), foldLogicCastConstant(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), foldUDivShl(), foldVecTruncToExtElt(), llvm::InstCombiner::FoldXorWithConstants(), getSelectCondition(), llvm::isImpliedCondition(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), isTruePredicate(), llvm::PatternMatch::UAddWithOverflow_match< LHS_t, RHS_t, Sum_t >::match(), llvm::PatternMatch::Signum_match< Opnd_t >::match(), matchesAdd(), matchesOr(), matchSelectFromAndOr(), processUMulZExtIdiom(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAndOfICmps(), simplifyAndOfICmpsWithSameOperands(), SimplifyAShrInst(), SimplifyDiv(), SimplifyFSubInst(), SimplifyGEPInst(), simplifyICmpWithBinOp(), simplifyICmpWithConstant(), simplifyICmpWithMinMax(), SimplifyLShrInst(), simplifyMinnumMaxnum(), SimplifyMulInst(), SimplifyOrInst(), SimplifyOrOfICmps(), simplifyOrOfICmpsWithSameOperands(), SimplifyRem(), simplifySelectWithFakeICmpEq(), simplifySelectWithICmpCond(), SimplifyShlInst(), SimplifySubInst(), simplifyUnsignedRangeCheck(), simplifyValueKnownNonZero(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitSwitchInst(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitUDiv(), visitUDivOperand(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
Match a value, capturing it if we match.
Definition at line 296 of file PatternMatch.h.
Definition at line 297 of file PatternMatch.h.
|
inline |
Definition at line 518 of file PatternMatch.h.
References L.
Referenced by checkForNegativeOperand(), getSelectCondition(), m_c_Xor(), SimplifyGEPInst(), llvm::AssumptionCache::updateAffectedValues(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
|
inline |
Match an arbitrary zero/null constant.
This includes zero_initializer for vectors and ConstantPointerNull for pointers.
Definition at line 137 of file PatternMatch.h.
Referenced by areInverseVectorBitmasks(), llvm::ConstantFoldBinaryInstruction(), foldSelectICmpAndOr(), llvm::getGEPInductionOperand(), isKnownNonNullFromDominatingCondition(), m_AnyZero(), markAliveBlocks(), matchMinMax(), SimplifyAddInst(), SimplifyAndInst(), SimplifyDiv(), SimplifyFAddInst(), SimplifyFSubInst(), SimplifyGEPInst(), simplifyICmpOfBools(), simplifyICmpWithZero(), SimplifyIntrinsic(), SimplifyMulInst(), SimplifyOrInst(), SimplifyRem(), simplifySelectWithICmpCond(), SimplifyShift(), SimplifySubInst(), simplifyUnsignedRangeCheck(), SimplifyXorInst(), ThreadCmpOverSelect(), tryToMoveFreeBeforeNullTest(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFSub(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitSDiv(), and llvm::InstCombiner::visitSub().
|
inline |
Matches ZExt.
Definition at line 813 of file PatternMatch.h.
Referenced by foldLogicCastConstant(), foldUDivShl(), simplifyICmpWithBinOp(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and visitUDivOperand().
| bool llvm::PatternMatch::match | ( | Val * | V, |
| const Pattern & | P | ||
| ) |
Definition at line 41 of file PatternMatch.h.
References P.
Referenced by areInverseVectorBitmasks(), CanEvaluateShifted(), checkForNegativeOperand(), combineInstructionsOverFunction(), CombineUAddWithOverflow(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBits(), computeKnownBitsFromAssume(), computeKnownBitsFromOperator(), ComputeNumSignBits(), llvm::ConstantFoldBinaryInstruction(), despeculateCountZeros(), detectLog2OfHalf(), llvm::findScalarElement(), llvm::InstCombiner::FoldAndOfICmps(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBoolSextMaskToSelect(), foldConstantInsEltIntoShuffle(), foldCttzCtlz(), foldICmpShlOne(), foldICmpWithMinMax(), foldLogicCastConstant(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldOrWithConstants(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), foldUDivShl(), foldVecTruncToExtElt(), llvm::InstCombiner::FoldXorWithConstants(), llvm::getGEPInductionOperand(), getLogBase2Vector(), llvm::SCEVExpander::getRelatedExistingExpansion(), getSelectCondition(), getValueFromICmpCondition(), llvm::IsFreeToInvert(), llvm::isGuaranteedToTransferExecutionToSuccessor(), llvm::isImpliedCondition(), isKnownNonNullFromDominatingCondition(), isKnownNonZero(), isKnownToBeAPowerOfTwo(), llvm::isSafeToSpeculativelyExecute(), isTruePredicate(), llvm::RecurrenceDescriptor::lookThroughAnd(), MaintainNoSignedWrap(), markAliveBlocks(), llvm::PatternMatch::MaxMin_match< CmpInst_t, LHS_t, RHS_t, Pred_t >::match(), matchesAdd(), matchesOr(), matchMinMax(), matchSelectFromAndOr(), matchSelectPattern(), processUMulZExtIdiom(), llvm::AssumptionCache::registerAssumption(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAndOfICmps(), simplifyAndOfICmpsWithSameOperands(), SimplifyAShrInst(), simplifyAssocCastAssoc(), SimplifyDiv(), SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMulInst(), SimplifyFRemInst(), SimplifyFSubInst(), SimplifyGEPInst(), SimplifyICmpInst(), simplifyICmpOfBools(), simplifyICmpWithBinOp(), simplifyICmpWithConstant(), simplifyICmpWithMinMax(), simplifyICmpWithZero(), SimplifyInsertValueInst(), SimplifyIntrinsic(), SimplifyLShrInst(), simplifyMinnumMaxnum(), SimplifyMulInst(), SimplifyOrInst(), SimplifyOrOfICmps(), simplifyOrOfICmpsWithSameOperands(), SimplifyRem(), SimplifyRightShift(), simplifySelectBitTest(), simplifySelectWithFakeICmpEq(), simplifySelectWithICmpCond(), SimplifyShift(), SimplifyShlInst(), SimplifySubInst(), simplifyUnsignedRangeCheck(), simplifyValueKnownNonZero(), SimplifyXorInst(), ThreadCmpOverSelect(), tryFactorization(), tryToMoveFreeBeforeNullTest(), llvm::AssumptionCache::updateAffectedValues(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFSub(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitSwitchInst(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitUDiv(), visitUDivOperand(), llvm::InstCombiner::visitURem(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
1.8.6