29 #ifndef LLVM_SUPPORT_PATTERNMATCH_H
30 #define LLVM_SUPPORT_PATTERNMATCH_H
39 namespace PatternMatch {
41 template<
typename Val,
typename Pattern>
42 bool match(Val *V,
const Pattern &
P) {
43 return const_cast<Pattern&
>(
P).
match(V);
47 template<
typename SubPattern_t>
53 template<
typename OpTy>
63 template<
typename Class>
65 template<
typename ITy>
66 bool match(ITy *V) {
return isa<Class>(V); }
81 template<
typename LTy,
typename RTy>
88 template<
typename ITy>
98 template<
typename LTy,
typename RTy>
105 template<
typename ITy>
115 template<
typename LTy,
typename RTy>
121 template<
typename LTy,
typename RTy>
127 template<
typename ITy>
129 if (
const Constant *
C = dyn_cast<Constant>(V))
130 return C->isNullValue();
140 template<
typename ITy>
142 if (
const Constant *
C = dyn_cast<Constant>(V))
143 return C->isNegativeZeroValue();
164 template<
typename ITy>
167 Res = &CI->getValue();
170 if (V->getType()->isVectorTy())
171 if (
const Constant *
C = dyn_cast<Constant>(V))
173 dyn_cast_or_null<ConstantInt>(
C->getSplatValue())) {
174 Res = &CI->getValue();
186 template<
int64_t Val>
188 template<
typename ITy>
190 if (
const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
191 const APInt &CIV = CI->getValue();
193 return CIV ==
static_cast<uint64_t
>(Val);
204 template<
int64_t Val>
206 return constantint_match<Val>();
211 template<
typename Predicate>
213 template<
typename ITy>
215 if (
const ConstantInt *CI = dyn_cast<ConstantInt>(V))
216 return this->isValue(CI->getValue());
217 if (V->getType()->isVectorTy())
218 if (
const Constant *
C = dyn_cast<Constant>(V))
220 dyn_cast_or_null<ConstantInt>(
C->getSplatValue()))
221 return this->isValue(CI->getValue());
228 template<
typename Predicate>
232 template<
typename ITy>
234 if (
const ConstantInt *CI = dyn_cast<ConstantInt>(V))
235 if (this->isValue(CI->getValue())) {
236 Res = &CI->getValue();
239 if (V->getType()->isVectorTy())
240 if (
const Constant *
C = dyn_cast<Constant>(V))
241 if (
ConstantInt *CI = dyn_cast_or_null<ConstantInt>(
C->getSplatValue()))
242 if (this->isValue(CI->getValue())) {
243 Res = &CI->getValue();
284 template<
typename Class>
289 template<
typename ITy>
291 if (
Class *CV = dyn_cast<Class>(V)) {
316 template<
typename ITy>
331 template<
typename ITy>
333 if (
const ConstantFP *CFP = dyn_cast<ConstantFP>(V))
334 return CFP->isExactlyValue(
Val);
335 if (V->getType()->isVectorTy())
336 if (
const Constant *
C = dyn_cast<Constant>(V))
337 if (
ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(
C->getSplatValue()))
338 return CFP->isExactlyValue(
Val);
354 template<
typename ITy>
357 if (CV->getBitWidth() <= 64) {
358 VR = CV->getZExtValue();
373 template<
typename LHS_t,
typename RHS_t,
unsigned Opcode>
380 template<
typename OpTy>
387 return CE->getOpcode() == Opcode &&
L.match(CE->getOperand(0)) &&
388 R.match(CE->getOperand(1));
393 template<
typename LHS,
typename RHS>
394 inline BinaryOp_match<LHS, RHS, Instruction::Add>
399 template<
typename LHS,
typename RHS>
400 inline BinaryOp_match<LHS, RHS, Instruction::FAdd>
405 template<
typename LHS,
typename RHS>
406 inline BinaryOp_match<LHS, RHS, Instruction::Sub>
411 template<
typename LHS,
typename RHS>
412 inline BinaryOp_match<LHS, RHS, Instruction::FSub>
417 template<
typename LHS,
typename RHS>
418 inline BinaryOp_match<LHS, RHS, Instruction::Mul>
423 template<
typename LHS,
typename RHS>
424 inline BinaryOp_match<LHS, RHS, Instruction::FMul>
429 template<
typename LHS,
typename RHS>
430 inline BinaryOp_match<LHS, RHS, Instruction::UDiv>
435 template<
typename LHS,
typename RHS>
436 inline BinaryOp_match<LHS, RHS, Instruction::SDiv>
441 template<
typename LHS,
typename RHS>
442 inline BinaryOp_match<LHS, RHS, Instruction::FDiv>
447 template<
typename LHS,
typename RHS>
448 inline BinaryOp_match<LHS, RHS, Instruction::URem>
453 template<
typename LHS,
typename RHS>
454 inline BinaryOp_match<LHS, RHS, Instruction::SRem>
459 template<
typename LHS,
typename RHS>
460 inline BinaryOp_match<LHS, RHS, Instruction::FRem>
465 template<
typename LHS,
typename RHS>
466 inline BinaryOp_match<LHS, RHS, Instruction::And>
471 template<
typename LHS,
typename RHS>
472 inline BinaryOp_match<LHS, RHS, Instruction::Or>
473 m_Or(
const LHS &L,
const RHS &R) {
477 template<
typename LHS,
typename RHS>
478 inline BinaryOp_match<LHS, RHS, Instruction::Xor>
483 template<
typename LHS,
typename RHS>
484 inline BinaryOp_match<LHS, RHS, Instruction::Shl>
489 template<
typename LHS,
typename RHS>
490 inline BinaryOp_match<LHS, RHS, Instruction::LShr>
495 template<
typename LHS,
typename RHS>
496 inline BinaryOp_match<LHS, RHS, Instruction::AShr>
504 template<
typename LHS_t,
typename RHS_t,
unsigned Opc1,
unsigned Opc2>
511 template<
typename OpTy>
519 return (CE->getOpcode() == Opc1 || CE->getOpcode() == Opc2) &&
520 L.match(CE->getOperand(0)) &&
R.match(CE->getOperand(1));
526 template<
typename LHS,
typename RHS>
527 inline BinOp2_match<LHS, RHS, Instruction::LShr, Instruction::AShr>
533 template<
typename LHS,
typename RHS>
534 inline BinOp2_match<LHS, RHS, Instruction::LShr, Instruction::Shl>
540 template<
typename LHS,
typename RHS>
541 inline BinOp2_match<LHS, RHS, Instruction::SDiv, Instruction::UDiv>
549 template<
typename SubPattern_t>
555 template<
typename OpTy>
570 template<
typename LHS_t,
typename RHS_t,
typename Class,
typename PredicateTy>
579 template<
typename OpTy>
581 if (
Class *
I = dyn_cast<Class>(V))
582 if (
L.match(
I->getOperand(0)) &&
R.match(
I->getOperand(1))) {
590 template<
typename LHS,
typename RHS>
591 inline CmpClass_match<LHS, RHS, ICmpInst, ICmpInst::Predicate>
597 template<
typename LHS,
typename RHS>
598 inline CmpClass_match<LHS, RHS, FCmpInst, FCmpInst::Predicate>
608 template<
typename Cond_t,
typename LHS_t,
typename RHS_t>
616 :
C(Cond),
L(LHS),
R(RHS) {}
618 template<
typename OpTy>
621 return C.match(
I->getOperand(0)) &&
622 L.match(
I->getOperand(1)) &&
623 R.match(
I->getOperand(2));
628 template<
typename Cond,
typename LHS,
typename RHS>
629 inline SelectClass_match<Cond, LHS, RHS>
636 template<
int64_t L,
int64_t R,
typename Cond>
637 inline SelectClass_match<Cond, constantint_match<L>, constantint_match<R> >
639 return m_Select(C, m_ConstantInt<L>(), m_ConstantInt<R>());
647 template<
typename Op_t,
unsigned Opcode>
653 template<
typename OpTy>
655 if (
Operator *O = dyn_cast<Operator>(V))
656 return O->getOpcode() == Opcode &&
Op.match(O->getOperand(0));
662 template<
typename OpTy>
663 inline CastClass_match<OpTy, Instruction::BitCast>
669 template<
typename OpTy>
670 inline CastClass_match<OpTy, Instruction::PtrToInt>
676 template<
typename OpTy>
677 inline CastClass_match<OpTy, Instruction::Trunc>
683 template<
typename OpTy>
684 inline CastClass_match<OpTy, Instruction::SExt>
690 template<
typename OpTy>
691 inline CastClass_match<OpTy, Instruction::ZExt>
697 template<
typename OpTy>
698 inline CastClass_match<OpTy, Instruction::UIToFP>
704 template<
typename OpTy>
705 inline CastClass_match<OpTy, Instruction::SIToFP>
714 template<
typename LHS_t>
720 template<
typename OpTy>
722 if (
Operator *O = dyn_cast<Operator>(V))
724 return matchIfNot(O->getOperand(0), O->getOperand(1));
729 return (isa<ConstantInt>(RHS) || isa<ConstantDataVector>(RHS) ||
731 isa<ConstantVector>(RHS)) &&
732 cast<Constant>(RHS)->isAllOnesValue() &&
737 template<
typename LHS>
741 template<
typename LHS_t>
747 template<
typename OpTy>
749 if (
Operator *O = dyn_cast<Operator>(V))
750 if (O->getOpcode() == Instruction::Sub)
751 return matchIfNeg(O->getOperand(0), O->getOperand(1));
756 return ((isa<ConstantInt>(LHS) && cast<ConstantInt>(LHS)->
isZero()) ||
757 isa<ConstantAggregateZero>(LHS)) &&
763 template<
typename LHS>
767 template<
typename LHS_t>
773 template<
typename OpTy>
775 if (
Operator *O = dyn_cast<Operator>(V))
776 if (O->getOpcode() == Instruction::FSub)
777 return matchIfFNeg(O->getOperand(0), O->getOperand(1));
783 return C->isNegativeZeroValue() &&
L.match(RHS);
789 template<
typename LHS>
803 template<
typename OpTy>
806 if (BI->isUnconditional()) {
807 Succ = BI->getSuccessor(0);
816 template<
typename Cond_t>
824 template<
typename OpTy>
827 if (BI->isConditional() &&
Cond.match(BI->getCondition())) {
828 T = BI->getSuccessor(0);
829 F = BI->getSuccessor(1);
836 template<
typename Cond_t>
846 template<
typename CmpInst_t,
typename LHS_t,
typename RHS_t,
typename Pred_t>
854 template<
typename OpTy>
867 Value *LHS = Cmp->getOperand(0);
868 Value *RHS = Cmp->getOperand(1);
869 if ((TrueVal != LHS || FalseVal != RHS) &&
870 (TrueVal != RHS || FalseVal != LHS))
873 Cmp->getPredicate() : Cmp->getSwappedPredicate();
878 return L.match(LHS) &&
R.match(RHS);
938 template<
typename LHS,
typename RHS>
939 inline MaxMin_match<ICmpInst, LHS, RHS, smax_pred_ty>
944 template<
typename LHS,
typename RHS>
945 inline MaxMin_match<ICmpInst, LHS, RHS, smin_pred_ty>
950 template<
typename LHS,
typename RHS>
951 inline MaxMin_match<ICmpInst, LHS, RHS, umax_pred_ty>
956 template<
typename LHS,
typename RHS>
957 inline MaxMin_match<ICmpInst, LHS, RHS, umin_pred_ty>
971 template<
typename LHS,
typename RHS>
972 inline MaxMin_match<FCmpInst, LHS, RHS, ofmax_pred_ty>
986 template<
typename LHS,
typename RHS>
987 inline MaxMin_match<FCmpInst, LHS, RHS, ofmin_pred_ty>
1001 template<
typename LHS,
typename RHS>
1002 inline MaxMin_match<FCmpInst, LHS, RHS, ufmax_pred_ty>
1016 template<
typename LHS,
typename RHS>
1017 inline MaxMin_match<FCmpInst, LHS, RHS, ufmin_pred_ty>
1022 template<
typename Opnd_t>
1028 template<
typename OpTy>
1036 template<
unsigned OpI,
typename Opnd_t>
1046 template<
typename OpTy>
1057 template <
typename T0 = void,
typename T1 = void,
typename T2 = void,
1058 typename T3 = void,
typename T4 = void,
typename T5 = void,
1059 typename T6 = void,
typename T7 = void,
typename T8 = void,
1061 template <
typename T0>
1065 template <
typename T0,
typename T1>
1070 template <
typename T0,
typename T1,
typename T2>
1075 template <
typename T0,
typename T1,
typename T2,
typename T3>
1083 template <Intrinsic::ID IntrID>
1087 template<Intrinsic::ID IntrID,
typename T0>
1090 return m_CombineAnd(m_Intrinsic<IntrID>(), m_Argument<0>(Op0));
1093 template<Intrinsic::ID IntrID,
typename T0,
typename T1>
1096 return m_CombineAnd(m_Intrinsic<IntrID>(Op0), m_Argument<1>(Op1));
1099 template<Intrinsic::ID IntrID,
typename T0,
typename T1,
typename T2>
1102 return m_CombineAnd(m_Intrinsic<IntrID>(Op0, Op1), m_Argument<2>(Op2));
1105 template<Intrinsic::ID IntrID,
typename T0,
typename T1,
typename T2,
typename T3>
1108 return m_CombineAnd(m_Intrinsic<IntrID>(Op0, Op1, Op2), m_Argument<3>(Op3));
1112 template<
typename Opnd0>
1113 inline typename m_Intrinsic_Ty<Opnd0>::Ty
1115 return m_Intrinsic<Intrinsic::bswap>(Op0);
MaxMin_match< ICmpInst, LHS, RHS, umin_pred_ty > m_UMin(const LHS &L, const RHS &R)
BinaryOp_match< LHS, RHS, Instruction::And > m_And(const LHS &L, const RHS &R)
static bool match(FCmpInst::Predicate Pred)
class_match< Value > m_Value()
m_Value() - Match an arbitrary value and ignore it.
cst_pred_ty< is_sign_bit > m_SignBit()
m_SignBit() - Match an integer or vector with only the sign bit(s) set.
class_match< UndefValue > m_Undef()
m_Undef() - Match an arbitrary undef constant.
BinaryOp_match< LHS, RHS, Instruction::Sub > m_Sub(const LHS &L, const RHS &R)
br_match(BasicBlock *&Succ)
BinaryOp_match< LHS, RHS, Instruction::FAdd > m_FAdd(const LHS &L, const RHS &R)
BinaryOp_match< LHS, RHS, Instruction::FDiv > m_FDiv(const LHS &L, const RHS &R)
Intrinsic::ID getIntrinsicID() const
BinaryOp_match< LHS, RHS, Instruction::SRem > m_SRem(const LHS &L, const RHS &R)
Exact_match(const SubPattern_t &SP)
api_pred_ty(const APInt *&R)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
BinaryOp_match< LHS, RHS, Instruction::Mul > m_Mul(const LHS &L, const RHS &R)
br_match m_UnconditionalBr(BasicBlock *&Succ)
class_match< Constant > m_Constant()
m_Intrinsic_Ty< Opnd0 >::Ty m_BSwap(const Opnd0 &Op0)
match_combine_and< typename m_Intrinsic_Ty< T0, T1 >::Ty, Argument_match< T2 > > Ty
BinaryOp_match< LHS, RHS, Instruction::AShr > m_AShr(const LHS &L, const RHS &R)
apint_match(const APInt *&R)
static bool match(ICmpInst::Predicate Pred)
0 1 0 0 True if ordered and less than
match_combine_or(const LTy &Left, const RTy &Right)
BinaryOp_match< LHS, RHS, Instruction::FSub > m_FSub(const LHS &L, const RHS &R)
MaxMin_match< FCmpInst, LHS, RHS, ufmax_pred_ty > m_UnordFMax(const LHS &L, const RHS &R)
Match an 'unordered' floating point maximum function. Floating point has one special value 'NaN'...
fneg_match< LHS > m_FNeg(const LHS &L)
m_FNeg - Match a floating point negate.
Argument_match(unsigned OpIdx, const Opnd_t &V)
ValTy * getArgument(unsigned ArgNo) const
specific_fpval m_SpecificFP(double V)
bool match(Val *V, const Pattern &P)
CmpClass_match< LHS, RHS, FCmpInst, FCmpInst::Predicate > m_FCmp(FCmpInst::Predicate &Pred, const LHS &L, const RHS &R)
smin_pred_ty - Helper class for identifying signed min predicates.
BinaryOp_match< LHS, RHS, Instruction::Xor > m_Xor(const LHS &L, const RHS &R)
Exact_match< T > m_Exact(const T &SubPattern)
BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::AShr > m_Shr(const LHS &L, const RHS &R)
m_Shr - Matches LShr or AShr.
specificval_ty(const Value *V)
match_combine_and< typename m_Intrinsic_Ty< T0 >::Ty, Argument_match< T1 > > Ty
CastClass_match< OpTy, Instruction::Trunc > m_Trunc(const OpTy &Op)
m_Trunc
0 1 0 1 True if ordered and less than or equal
MaxMin_match< FCmpInst, LHS, RHS, ufmin_pred_ty > m_UnordFMin(const LHS &L, const RHS &R)
Match an 'unordered' floating point minimum function. Floating point has one special value 'NaN'...
not_match< LHS > m_Not(const LHS &L)
BinaryOp_match< LHS, RHS, Instruction::Add > m_Add(const LHS &L, const RHS &R)
bind_ty< ConstantFP > m_ConstantFP(ConstantFP *&C)
m_ConstantFP - Match a ConstantFP, capturing the value if we match.
match_combine_or< LTy, RTy > m_CombineOr(const LTy &L, const RTy &R)
Combine two pattern matchers matching L || R.
CastClass_match(const Op_t &OpMatch)
CastClass_match< OpTy, Instruction::ZExt > m_ZExt(const OpTy &Op)
m_ZExt
Represents a floating point comparison operator.
MaxMin_match< FCmpInst, LHS, RHS, ofmin_pred_ty > m_OrdFMin(const LHS &L, const RHS &R)
Match an 'ordered' floating point minimum function. Floating point has one special value 'NaN'...
MaxMin_match< ICmpInst, LHS, RHS, smin_pred_ty > m_SMin(const LHS &L, const RHS &R)
class_match< ConstantInt > m_ConstantInt()
m_ConstantInt() - Match an arbitrary ConstantInt and ignore it.
IntrinsicID_match(Intrinsic::ID IntrID)
SelectClass_match< Cond, LHS, RHS > m_Select(const Cond &C, const LHS &L, const RHS &R)
cst_pred_ty< is_power2 > m_Power2()
m_Power2() - Match an integer or vector power of 2.
static bool match(FCmpInst::Predicate Pred)
ofmin_pred_ty - Helper class for identifying ordered min predicates.
match_combine_and(const LTy &Left, const RTy &Right)
OneUse_match< T > m_OneUse(const T &SubPattern)
BinaryOp_match< LHS, RHS, Instruction::LShr > m_LShr(const LHS &L, const RHS &R)
smax_pred_ty - Helper class for identifying signed max predicates.
MaxMin_match< ICmpInst, LHS, RHS, umax_pred_ty > m_UMax(const LHS &L, const RHS &R)
apint_match m_APInt(const APInt *&Res)
BinaryOp_match< LHS, RHS, Instruction::SDiv > m_SDiv(const LHS &L, const RHS &R)
BinaryOp_match< LHS, RHS, Instruction::FRem > m_FRem(const LHS &L, const RHS &R)
LLVM Basic Block Representation.
BinaryOp_match< LHS, RHS, Instruction::Or > m_Or(const LHS &L, const RHS &R)
CastClass_match< OpTy, Instruction::BitCast > m_BitCast(const OpTy &Op)
m_BitCast
LLVM Constant Representation.
const Value * getCondition() const
match_combine_and< typename m_Intrinsic_Ty< T0, T1, T2 >::Ty, Argument_match< T3 > > Ty
APInt Xor(const APInt &LHS, const APInt &RHS)
Bitwise XOR function for APInt.
cst_pred_ty< is_all_ones > m_AllOnes()
m_AllOnes() - Match an integer or vector with all bits set to true.
bind_const_intval_ty(uint64_t &V)
specificval_ty m_Specific(const Value *V)
m_Specific - Match if we have a specific specified value.
brc_match< Cond_t > m_Br(const Cond_t &C, BasicBlock *&T, BasicBlock *&F)
BinaryOp_match< LHS, RHS, Instruction::Shl > m_Shl(const LHS &L, const RHS &R)
Represent an integer comparison operator.
umin_pred_ty - Helper class for identifying unsigned min predicates.
Value * getOperand(unsigned i) const
match_combine_or< match_zero, match_neg_zero > m_AnyZero()
match_combine_and< IntrinsicID_match, Argument_match< T0 > > Ty
ufmin_pred_ty - Helper class for identifying unordered min predicates.
const Value * getTrueValue() const
bool isPowerOf2() const
Check if this APInt's value is a power of two greater than zero.
1 1 0 1 True if unordered, less than, or equal
Argument_match< Opnd_t > m_Argument(const Opnd_t &Op)
Match an argument.
neg_match< LHS > m_Neg(const LHS &L)
m_Neg - Match an integer negate.
CastClass_match< OpTy, Instruction::SExt > m_SExt(const OpTy &Op)
m_SExt
OneUse_match(const SubPattern_t &SP)
MaxMin_match(const LHS_t &LHS, const RHS_t &RHS)
static bool isZero(Value *V, DataLayout *DL)
0 0 1 0 True if ordered and greater than
BinaryOp_match(const LHS_t &LHS, const RHS_t &RHS)
static bool match(ICmpInst::Predicate Pred)
Class for constant integers.
static bool match(ICmpInst::Predicate Pred)
bool isValue(const APInt &C)
specificval_ty - Match a specified Value*.
bool isValue(const APInt &C)
1 1 0 0 True if unordered or less than
BinOp2_match< LHS, RHS, Instruction::LShr, Instruction::Shl > m_LogicalShift(const LHS &L, const RHS &R)
m_LogicalShift - Matches LShr or Shl.
brc_match(const Cond_t &C, BasicBlock *&t, BasicBlock *&f)
BinaryOp_match< LHS, RHS, Instruction::URem > m_URem(const LHS &L, const RHS &R)
Predicate
Predicate - These are "(BI << 5) | BO" for various predicates.
BinaryOp_match< LHS, RHS, Instruction::UDiv > m_UDiv(const LHS &L, const RHS &R)
CastClass_match< OpTy, Instruction::UIToFP > m_UIToFP(const OpTy &Op)
m_UIToFP
BinaryOp_match< LHS, RHS, Instruction::FMul > m_FMul(const LHS &L, const RHS &R)
Class for arbitrary precision integers.
not_match(const LHS_t &LHS)
CastClass_match< OpTy, Instruction::PtrToInt > m_PtrToInt(const OpTy &Op)
m_PtrToInt
umax_pred_ty - Helper class for identifying unsigned max predicates.
ofmax_pred_ty - Helper class for identifying ordered max predicates.
specific_fpval m_FPOne()
Match a float 1.0 or vector with all elements equal to 1.0.
bool isAllOnesValue() const
Determine if all bits are set.
CmpClass_match(PredicateTy &Pred, const LHS_t &LHS, const RHS_t &RHS)
neg_match(const LHS_t &LHS)
unsigned greater or equal
MaxMin_match< ICmpInst, LHS, RHS, smax_pred_ty > m_SMax(const LHS &L, const RHS &R)
bool isSignBit() const
Check if the APInt's value is returned by getSignBit.
CastClass_match< OpTy, Instruction::SIToFP > m_SIToFP(const OpTy &Op)
m_SIToFP
1 0 1 0 True if unordered or greater than
fneg_match(const LHS_t &LHS)
SelectClass_match< Cond, constantint_match< L >, constantint_match< R > > m_SelectCst(const Cond &C)
BinOp2_match< LHS, RHS, Instruction::SDiv, Instruction::UDiv > m_IDiv(const LHS &L, const RHS &R)
m_IDiv - Matches UDiv and SDiv.
match_neg_zero m_NegZero()
static bool match(FCmpInst::Predicate Pred)
MaxMin_match< FCmpInst, LHS, RHS, ofmax_pred_ty > m_OrdFMax(const LHS &L, const RHS &R)
Match an 'ordered' floating point maximum function. Floating point has one special value 'NaN'...
ufmax_pred_ty - Helper class for identifying unordered max predicates.
LLVM Value Representation.
bool isValue(const APInt &C)
1 0 1 1 True if unordered, greater than, or equal
cst_pred_ty< is_one > m_One()
m_One() - Match an integer 1 or a vector with all elements equal to 1.
static bool match(ICmpInst::Predicate Pred)
match_combine_and< LTy, RTy > m_CombineAnd(const LTy &L, const RTy &R)
Combine two pattern matchers matching L && R.
static bool match(FCmpInst::Predicate Pred)
const Value * getFalseValue() const
IntrinsicID_match m_Intrinsic()
bool isValue(const APInt &C)
SelectClass_match(const Cond_t &Cond, const LHS_t &LHS, const RHS_t &RHS)
0 0 1 1 True if ordered and greater than or equal
BinOp2_match(const LHS_t &LHS, const RHS_t &RHS)
CmpClass_match< LHS, RHS, ICmpInst, ICmpInst::Predicate > m_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R)