reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/IR/PatternMatch.h
 1623     if (!m_ICmp(Pred, m_Value(ICmpLHS), m_Value(ICmpRHS)).match(V))
 1623     if (!m_ICmp(Pred, m_Value(ICmpLHS), m_Value(ICmpRHS)).match(V))
 1627     auto AddExpr = m_Add(m_Value(AddLHS), m_Value(AddRHS));
 1627     auto AddExpr = m_Add(m_Value(AddLHS), m_Value(AddRHS));
 1922     auto LHS = m_AShr(m_Value(OpL), m_SpecificInt(ShiftWidth));
 1923     auto RHS = m_LShr(m_Neg(m_Value(OpR)), m_SpecificInt(ShiftWidth));
lib/Analysis/AssumptionCache.cpp
   69       if (match(I, m_BitCast(m_Value(Op))) ||
   70           match(I, m_PtrToInt(m_Value(Op))) ||
   71           match(I, m_Not(m_Value(Op)))) {
   82   if (match(Cond, m_ICmp(Pred, m_Value(A), m_Value(B)))) {
   82   if (match(Cond, m_ICmp(Pred, m_Value(A), m_Value(B)))) {
   90         if (match(V, m_Not(m_Value(A)))) {
   98         if (match(V, m_BitwiseLogic(m_Value(A), m_Value(B)))) {
   98         if (match(V, m_BitwiseLogic(m_Value(A), m_Value(B)))) {
  102         } else if (match(V, m_Shift(m_Value(A), m_ConstantInt(C)))) {
lib/Analysis/CmpInstAnalysis.cpp
  136   if (LookThruTrunc && match(LHS, m_Trunc(m_Value(X)))) {
lib/Analysis/GuardUtils.cpp
   42   if (!match(U, m_Br(m_And(m_Value(Condition), m_Value(WidenableCondition)),
   42   if (!match(U, m_Br(m_And(m_Value(Condition), m_Value(WidenableCondition)),
lib/Analysis/IVDescriptors.cpp
  489   if (m_UMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  489   if (m_UMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  491   else if (m_UMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  491   else if (m_UMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  493   else if (m_SMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  493   else if (m_SMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  495   else if (m_SMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  495   else if (m_SMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  497   else if (m_OrdFMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  497   else if (m_OrdFMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  499   else if (m_OrdFMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  499   else if (m_OrdFMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  501   else if (m_UnordFMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  501   else if (m_UnordFMin(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  503   else if (m_UnordFMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  503   else if (m_UnordFMax(m_Value(CmpLeft), m_Value(CmpRight)).match(Select))
  545   if ((m_FAdd(m_Value(Op1), m_Value(Op2)).match(I1)  ||
  545   if ((m_FAdd(m_Value(Op1), m_Value(Op2)).match(I1)  ||
  546        m_FSub(m_Value(Op1), m_Value(Op2)).match(I1)) &&
  546        m_FSub(m_Value(Op1), m_Value(Op2)).match(I1)) &&
  550   if (m_FMul(m_Value(Op1), m_Value(Op2)).match(I1) && (I1->isFast()))
  550   if (m_FMul(m_Value(Op1), m_Value(Op2)).match(I1) && (I1->isFast()))
lib/Analysis/InstructionSimplify.cpp
  104                              m_ICmp(Pred2, m_Value(X), m_Value(Y)))) ||
  104                              m_ICmp(Pred2, m_Value(X), m_Value(Y)))) ||
  597   if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) ||
  598       match(Op0, m_Sub(m_Value(Y), m_Specific(Op1))))
  611       match(Op0, m_Xor(m_Value(Y), m_SignMask())))
  735   if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z
  735   if (MaxRecurse && match(Op0, m_Add(m_Value(X), m_Value(Y)))) { // (X + Y) - Z
  757   if (MaxRecurse && match(Op1, m_Add(m_Value(Y), m_Value(Z)))) { // X - (Y + Z)
  757   if (MaxRecurse && match(Op1, m_Add(m_Value(Y), m_Value(Z)))) { // X - (Y + Z)
  779   if (MaxRecurse && match(Op1, m_Sub(m_Value(X), m_Value(Y)))) // Z - (X - Y)
  779   if (MaxRecurse && match(Op1, m_Sub(m_Value(X), m_Value(Y)))) // Z - (X - Y)
  790   if (MaxRecurse && match(Op0, m_Trunc(m_Value(X))) &&
  791       match(Op1, m_Trunc(m_Value(Y))))
  802   if (match(Op0, m_PtrToInt(m_Value(X))) &&
  803       match(Op1, m_PtrToInt(m_Value(Y))))
  849              m_Exact(m_IDiv(m_Value(X), m_Specific(Op1)))) ||     // (X / Y) * Y
  850        match(Op1, m_Exact(m_IDiv(m_Value(X), m_Specific(Op0)))))) // Y * (X / Y)
  939       (match(Op1, m_ZExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)))
 1020   if (match(Op0, m_c_Mul(m_Value(X), m_Specific(Op1)))) {
 1039   if (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_ConstantInt(C1))) &&
 1141   if (match(Op1, m_SExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1))
 1209       (match(Op1, m_SExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)))
 1285       match(Op0, m_Exact(m_Shr(m_Value(X), m_Specific(Op1)))))
 1312   if (match(Op0, m_NUWShl(m_Value(X), m_Specific(Op1))))
 1323       match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) &&
 1323       match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) &&
 1355   if (Q.IIQ.UseInstrInfo && match(Op0, m_NSWShl(m_Value(X), m_Specific(Op1))))
 1379   if (!match(ZeroICmp, m_ICmp(EqPred, m_Value(Y), m_Zero())) ||
 1387   if (match(Y, m_Sub(m_Value(A), m_Value(B)))) {
 1387   if (match(Y, m_Sub(m_Value(A), m_Value(B)))) {
 1437   if (match(UnsignedICmp, m_ICmp(UnsignedPred, m_Value(X), m_Specific(Y))) &&
 1441                  m_ICmp(UnsignedPred, m_Specific(Y), m_Value(X))) &&
 1487   if (!match(Op0, m_ICmp(Pred0, m_Value(A), m_Value(B))) ||
 1487   if (!match(Op0, m_ICmp(Pred0, m_Value(A), m_Value(B))) ||
 1512   if (!match(Op0, m_ICmp(Pred0, m_Value(A), m_Value(B))) ||
 1512   if (!match(Op0, m_ICmp(Pred0, m_Value(A), m_Value(B))) ||
 1616   if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1))))
 1689   if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1))))
 1863   if (!match(Op0, m_ICmp(Pred, m_Value(X), m_Zero())) ||
 1887   if (!match(Op0, m_ICmp(Pred, m_Value(X), m_Zero())) ||
 1892   if (!match(NotOp1, m_Not(m_Value(Op1))))
 1944     if (match(Op0, m_Shl(m_Value(X), m_APInt(ShAmt))) &&
 1950     if (match(Op0, m_LShr(m_Value(X), m_APInt(ShAmt))) &&
 2028       match(Op0, m_c_Or(m_CombineAnd(m_NUWShl(m_Value(X), m_APInt(ShAmt)),
 2029                                      m_Value(XShifted)),
 2030                         m_Value(Y)))) {
 2101   if (match(Op1, m_Xor(m_Value(A), m_Value(B))) &&
 2101   if (match(Op1, m_Xor(m_Value(A), m_Value(B))) &&
 2111   if (match(Op0, m_Xor(m_Value(A), m_Value(B))) &&
 2111   if (match(Op0, m_Xor(m_Value(A), m_Value(B))) &&
 2120   if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 2120   if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 2129   if (match(Op1, m_And(m_Value(A), m_Value(B))) &&
 2129   if (match(Op1, m_And(m_Value(A), m_Value(B))) &&
 2164   if (match(Op0, m_And(m_Value(A), m_APInt(C1))) &&
 2165       match(Op1, m_And(m_Value(B), m_APInt(C2)))) {
 2173           match(A, m_c_Add(m_Specific(B), m_Value(N)))) {
 2180           match(B, m_c_Add(m_Specific(A), m_Value(N)))) {
 2632   if (match(LHS, m_BitCast(m_UIToFP(m_Value(X))))) {
 2742     if (LBO && match(LBO, m_c_Or(m_Value(Y), m_Specific(RHS)))) {
 2758     if (RBO && match(RBO, m_c_Or(m_Value(Y), m_Specific(LHS)))) {
 2987   if (match(LHS, m_SMax(m_Value(A), m_Value(B))) && (A == RHS || B == RHS)) {
 2987   if (match(LHS, m_SMax(m_Value(A), m_Value(B))) && (A == RHS || B == RHS)) {
 2993   } else if (match(RHS, m_SMax(m_Value(A), m_Value(B))) &&
 2993   } else if (match(RHS, m_SMax(m_Value(A), m_Value(B))) &&
 3000   } else if (match(LHS, m_SMin(m_Value(A), m_Value(B))) &&
 3000   } else if (match(LHS, m_SMin(m_Value(A), m_Value(B))) &&
 3008   } else if (match(RHS, m_SMin(m_Value(A), m_Value(B))) &&
 3008   } else if (match(RHS, m_SMin(m_Value(A), m_Value(B))) &&
 3061   if (match(LHS, m_UMax(m_Value(A), m_Value(B))) && (A == RHS || B == RHS)) {
 3061   if (match(LHS, m_UMax(m_Value(A), m_Value(B))) && (A == RHS || B == RHS)) {
 3067   } else if (match(RHS, m_UMax(m_Value(A), m_Value(B))) &&
 3067   } else if (match(RHS, m_UMax(m_Value(A), m_Value(B))) &&
 3074   } else if (match(LHS, m_UMin(m_Value(A), m_Value(B))) &&
 3074   } else if (match(LHS, m_UMin(m_Value(A), m_Value(B))) &&
 3082   } else if (match(RHS, m_UMin(m_Value(A), m_Value(B))) &&
 3082   } else if (match(RHS, m_UMin(m_Value(A), m_Value(B))) &&
 3135   if (match(LHS, m_SMax(m_Value(A), m_Value(B))) &&
 3135   if (match(LHS, m_SMax(m_Value(A), m_Value(B))) &&
 3136       match(RHS, m_SMin(m_Value(C), m_Value(D))) &&
 3136       match(RHS, m_SMin(m_Value(C), m_Value(D))) &&
 3145   } else if (match(LHS, m_SMin(m_Value(A), m_Value(B))) &&
 3145   } else if (match(LHS, m_SMin(m_Value(A), m_Value(B))) &&
 3146              match(RHS, m_SMax(m_Value(C), m_Value(D))) &&
 3146              match(RHS, m_SMax(m_Value(C), m_Value(D))) &&
 3155   } else if (match(LHS, m_UMax(m_Value(A), m_Value(B))) &&
 3155   } else if (match(LHS, m_UMax(m_Value(A), m_Value(B))) &&
 3156              match(RHS, m_UMin(m_Value(C), m_Value(D))) &&
 3156              match(RHS, m_UMin(m_Value(C), m_Value(D))) &&
 3165   } else if (match(LHS, m_UMin(m_Value(A), m_Value(B))) &&
 3165   } else if (match(LHS, m_UMin(m_Value(A), m_Value(B))) &&
 3166              match(RHS, m_UMax(m_Value(C), m_Value(D))) &&
 3166              match(RHS, m_UMax(m_Value(C), m_Value(D))) &&
 3818   if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS))))
 3818   if (!match(CondVal, m_ICmp(Pred, m_Value(CmpLHS), m_Value(CmpRHS))))
 3824     if (match(CmpLHS, m_And(m_Value(X), m_APInt(Y))))
 3831     auto isFsh = m_CombineOr(m_Intrinsic<Intrinsic::fshl>(m_Value(X), m_Value(),
 3832                                                           m_Value(ShAmt)),
 3833                              m_Intrinsic<Intrinsic::fshr>(m_Value(), m_Value(X),
 3834                                                           m_Value(ShAmt)));
 3851     auto isRotate = m_CombineOr(m_Intrinsic<Intrinsic::fshl>(m_Value(X),
 3853                                                              m_Value(ShAmt)),
 3854                                 m_Intrinsic<Intrinsic::fshr>(m_Value(X),
 3856                                                              m_Value(ShAmt)));
 4031           if (match(P, m_PtrToInt(m_Value(Temp))))
 4039             match(Ops[1], m_Sub(m_Value(P), m_PtrToInt(m_Specific(Ops[0])))))
 4046                   m_AShr(m_Sub(m_Value(P), m_PtrToInt(m_Specific(Ops[0]))),
 4055                   m_SDiv(m_Sub(m_Value(P), m_PtrToInt(m_Specific(Ops[0]))),
 4464   if (match(Op, m_FNeg(m_Value(X))))
 4539       (match(Op0, m_FSub(m_Value(X), m_Specific(Op1))) ||
 4540        match(Op1, m_FSub(m_Value(X), m_Specific(Op0)))))
 4569       match(Op1, m_FNeg(m_Value(X))))
 4575       (match(Op1, m_FSub(m_AnyZeroFP(), m_Value(X))) ||
 4576        match(Op1, m_FNeg(m_Value(X)))))
 4586       (match(Op1, m_FSub(m_Specific(Op0), m_Value(X))) ||
 4587        match(Op0, m_c_FAdd(m_Specific(Op1), m_Value(X)))))
 4619   if (Op0 == Op1 && match(Op0, m_Intrinsic<Intrinsic::sqrt>(m_Value(X))) &&
 4683     if (FMF.allowReassoc() && match(Op0, m_c_FMul(m_Value(X), m_Specific(Op1))))
 4945     if (match(Op0, m_BSwap(m_Value(X)))) return X;
 4949     if (match(Op0, m_BitReverse(m_Value(X)))) return X;
 4954         match(Op0, m_Intrinsic<Intrinsic::log>(m_Value(X)))) return X;
 4959         match(Op0, m_Intrinsic<Intrinsic::log2>(m_Value(X)))) return X;
 4964         match(Op0, m_Intrinsic<Intrinsic::exp>(m_Value(X)))) return X;
 4969         (match(Op0, m_Intrinsic<Intrinsic::exp2>(m_Value(X))) ||
 4971                                                 m_Value(X))))) return X;
 4977                                                m_Value(X)))) return X;
lib/Analysis/LazyValueInfo.cpp
  849     if (match(&I, m_Intrinsic<Intrinsic::experimental_guard>(m_Value(Cond))))
lib/Analysis/ScalarEvolution.cpp
 5893           !match(SU->getValue(), m_Select(m_Value(Condition), m_APInt(TrueVal),
 7588     if (match(V, m_LShr(m_Value(OutLHS), m_ConstantInt(ShiftAmt))))
 7590     else if (match(V, m_AShr(m_Value(OutLHS), m_ConstantInt(ShiftAmt))))
 7592     else if (match(V, m_Shl(m_Value(OutLHS), m_ConstantInt(ShiftAmt))))
 9443                          m_Value(Condition))) &&
10285     if (match(LHSUnknownExpr->getValue(), m_SDiv(m_Value(LL), m_Value(LR)))) {
10285     if (match(LHSUnknownExpr->getValue(), m_SDiv(m_Value(LL), m_Value(LR)))) {
lib/Analysis/TargetTransformInfo.cpp
  896   if (m_BinOp(m_Value(L), m_Value(R)).match(I))
  896   if (m_BinOp(m_Value(L), m_Value(R)).match(I))
  899     if (m_SMin(m_Value(L), m_Value(R)).match(SI) ||
  899     if (m_SMin(m_Value(L), m_Value(R)).match(SI) ||
  900         m_SMax(m_Value(L), m_Value(R)).match(SI) ||
  900         m_SMax(m_Value(L), m_Value(R)).match(SI) ||
  901         m_OrdFMin(m_Value(L), m_Value(R)).match(SI) ||
  901         m_OrdFMin(m_Value(L), m_Value(R)).match(SI) ||
  902         m_OrdFMax(m_Value(L), m_Value(R)).match(SI) ||
  902         m_OrdFMax(m_Value(L), m_Value(R)).match(SI) ||
  903         m_UnordFMin(m_Value(L), m_Value(R)).match(SI) ||
  903         m_UnordFMin(m_Value(L), m_Value(R)).match(SI) ||
  904         m_UnordFMax(m_Value(L), m_Value(R)).match(SI)) {
  904         m_UnordFMax(m_Value(L), m_Value(R)).match(SI)) {
  908     if (m_UMin(m_Value(L), m_Value(R)).match(SI) ||
  908     if (m_UMin(m_Value(L), m_Value(R)).match(SI) ||
  909         m_UMax(m_Value(L), m_Value(R)).match(SI)) {
  909         m_UMax(m_Value(L), m_Value(R)).match(SI)) {
lib/Analysis/ValueTracking.cpp
  199   if (match(LHS, m_c_And(m_Not(m_Value(M)), m_Value())) &&
  202   if (match(RHS, m_c_And(m_Not(m_Value(M)), m_Value())) &&
  638       if (match(Cmp, m_c_ICmp(Pred, m_V, m_Value(A))) &&
  646                        m_c_ICmp(Pred, m_c_And(m_V, m_Value(B)), m_Value(A))) &&
  646                        m_c_ICmp(Pred, m_c_And(m_V, m_Value(B)), m_Value(A))) &&
  658       } else if (match(Cmp, m_c_ICmp(Pred, m_Not(m_c_And(m_V, m_Value(B))),
  659                                      m_Value(A))) &&
  672                        m_c_ICmp(Pred, m_c_Or(m_V, m_Value(B)), m_Value(A))) &&
  672                        m_c_ICmp(Pred, m_c_Or(m_V, m_Value(B)), m_Value(A))) &&
  684       } else if (match(Cmp, m_c_ICmp(Pred, m_Not(m_c_Or(m_V, m_Value(B))),
  685                                      m_Value(A))) &&
  698                        m_c_ICmp(Pred, m_c_Xor(m_V, m_Value(B)), m_Value(A))) &&
  698                        m_c_ICmp(Pred, m_c_Xor(m_V, m_Value(B)), m_Value(A))) &&
  713       } else if (match(Cmp, m_c_ICmp(Pred, m_Not(m_c_Xor(m_V, m_Value(B))),
  714                                      m_Value(A))) &&
  730                                      m_Value(A))) &&
  742                                      m_Value(A))) &&
  754                                      m_Value(A))) &&
  764                                      m_Value(A))) &&
  776       if (match(Cmp, m_ICmp(Pred, m_V, m_Value(A))) &&
  789       if (match(Cmp, m_ICmp(Pred, m_V, m_Value(A))) &&
  802       if (match(Cmp, m_ICmp(Pred, m_V, m_Value(A))) &&
  815       if (match(Cmp, m_ICmp(Pred, m_V, m_Value(A))) &&
  828       if (match(Cmp, m_ICmp(Pred, m_V, m_Value(A))) &&
  839       if (match(Cmp, m_ICmp(Pred, m_V, m_Value(A))) &&
 1007         match(I, m_c_BinOp(m_Value(X), m_Add(m_Deferred(X), m_Value(Y))))) {
 1007         match(I, m_c_BinOp(m_Value(X), m_Add(m_Deferred(X), m_Value(Y))))) {
 1769   if (OrZero && (match(V, m_Shl(m_Value(X), m_Value())) ||
 1770                  match(V, m_LShr(m_Value(X), m_Value()))))
 1780   if (OrZero && match(V, m_And(m_Value(X), m_Value(Y)))) {
 1780   if (OrZero && match(V, m_And(m_Value(X), m_Value(Y)))) {
 1793   if (match(V, m_Add(m_Value(X), m_Value(Y)))) {
 1793   if (match(V, m_Add(m_Value(X), m_Value(Y)))) {
 2118   if (match(V, m_Or(m_Value(X), m_Value(Y))))
 2118   if (match(V, m_Or(m_Value(X), m_Value(Y))))
 2127   if (match(V, m_Shl(m_Value(X), m_Value(Y)))) {
 2127   if (match(V, m_Shl(m_Value(X), m_Value(Y)))) {
 2140   else if (match(V, m_Shr(m_Value(X), m_Value(Y)))) {
 2140   else if (match(V, m_Shr(m_Value(X), m_Value(Y)))) {
 2164   else if (match(V, m_Exact(m_IDiv(m_Value(X), m_Value())))) {
 2168   else if (match(V, m_Add(m_Value(X), m_Value(Y)))) {
 2168   else if (match(V, m_Add(m_Value(X), m_Value(Y)))) {
 2201   else if (match(V, m_Mul(m_Value(X), m_Value(Y)))) {
 2201   else if (match(V, m_Mul(m_Value(X), m_Value(Y)))) {
 4755   return (!NeedNSW && (match(X, m_Sub(m_Value(A), m_Value(B))) &&
 4755   return (!NeedNSW && (match(X, m_Sub(m_Value(A), m_Value(B))) &&
 4757          (NeedNSW && (match(X, m_NSWSub(m_Value(A), m_Value(B))) &&
 4757          (NeedNSW && (match(X, m_NSWSub(m_Value(A), m_Value(B))) &&
 5330   if ((!LHSIsTrue && match(LHS, m_Or(m_Value(ALHS), m_Value(ARHS)))) ||
 5330   if ((!LHSIsTrue && match(LHS, m_Or(m_Value(ALHS), m_Value(ARHS)))) ||
 5331       (LHSIsTrue && match(LHS, m_And(m_Value(ALHS), m_Value(ARHS))))) {
 5331       (LHSIsTrue && match(LHS, m_And(m_Value(ALHS), m_Value(ARHS))))) {
 5403   if (!match(PredBB->getTerminator(), m_Br(m_Value(PredCond), TrueBB, FalseBB)))
lib/Analysis/VectorUtils.cpp
  300   if (match(V, m_Add(m_Value(Val), m_Constant(C))))
  320   if (match(V, m_ShuffleVector(m_InsertElement(m_Value(), m_Value(Splat),
  354   if (match(V, m_BinOp(m_Value(X), m_Value(Y))))
  354   if (match(V, m_BinOp(m_Value(X), m_Value(Y))))
  358   if (match(V, m_Select(m_Value(X), m_Value(Y), m_Value(Z))))
  358   if (match(V, m_Select(m_Value(X), m_Value(Y), m_Value(Z))))
  358   if (match(V, m_Select(m_Value(X), m_Value(Y), m_Value(Z))))
lib/CodeGen/CodeGenPrepare.cpp
 1262   if (!match(Cmp, m_UAddWithOverflow(m_Value(A), m_Value(B), m_BinOp(Add))))
 1262   if (!match(Cmp, m_UAddWithOverflow(m_Value(A), m_Value(B), m_BinOp(Add))))
 3515       match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)))) {
 5916              m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))))
 5916              m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))))
 5916              m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))))
 6701              m_c_Or(m_OneUse(m_ZExt(m_Value(LValue))),
 6702                     m_OneUse(m_Shl(m_OneUse(m_ZExt(m_Value(HValue))),
 7206     if (match(LogicOp, m_And(m_OneUse(m_Value(Cond1)),
 7207                              m_OneUse(m_Value(Cond2)))))
 7209     else if (match(LogicOp, m_Or(m_OneUse(m_Value(Cond1)),
 7210                                  m_OneUse(m_Value(Cond2)))))
lib/CodeGen/SelectionDAG/FastISel.cpp
 1802     if (match(I, m_FNeg(m_Value(X))))
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 2081   if (match(Cond, m_OneUse(m_Not(m_Value(NotCond)))) &&
lib/Target/AArch64/AArch64ISelLowering.cpp
 8639   if (!match(Op1, m_ShuffleVector(m_Value(S1Op1), m_Undef(), m_Constant(M1))) ||
 8640       !match(Op2, m_ShuffleVector(m_Value(S2Op1), m_Undef(), m_Constant(M2))))
lib/Target/ARM/MVETailPredication.cpp
  230   if (!match(BECount, m_Add(m_Value(TripCount), m_AllOnes())))
lib/Target/Hexagon/HexagonGenExtract.cpp
  105   bool Match = match(In, m_And(m_Shl(m_LShr(m_Value(BF), m_ConstantInt(CSR)),
  112     Match = match(In, m_And(m_Shl(m_AShr(m_Value(BF), m_ConstantInt(CSR)),
  120     Match = match(In, m_And(m_Shl(m_Value(BF), m_ConstantInt(CSL)),
  129     Match = match(In, m_And(m_LShr(m_Value(BF), m_ConstantInt(CSR)),
  136     Match = match(In, m_And(m_AShr(m_Value(BF), m_ConstantInt(CSR)),
  143     Match = match(In, m_Shl(m_LShr(m_Value(BF), m_ConstantInt(CSR)),
  150     Match = match(In, m_Shl(m_AShr(m_Value(BF), m_ConstantInt(CSR)),
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
  683   if (!match(CondV, m_ICmp(P, m_And(m_Value(A), m_Value(B)), m_Value(C))) &&
  683   if (!match(CondV, m_ICmp(P, m_And(m_Value(A), m_Value(B)), m_Value(C))) &&
  683   if (!match(CondV, m_ICmp(P, m_And(m_Value(A), m_Value(B)), m_Value(C))) &&
  684       !match(CondV, m_ICmp(P, m_Value(C), m_And(m_Value(A), m_Value(B)))))
  684       !match(CondV, m_ICmp(P, m_Value(C), m_And(m_Value(A), m_Value(B)))))
  684       !match(CondV, m_ICmp(P, m_Value(C), m_And(m_Value(A), m_Value(B)))))
  730   if (match(ShouldXoredV, m_Xor(m_Value(Y), m_Value(Z)))) {
  730   if (match(ShouldXoredV, m_Xor(m_Value(Y), m_Value(Z)))) {
  755     if (!match(U, m_Xor(m_Specific(SelI), m_Value(R))) &&
  756         !match(U, m_Xor(m_Value(R), m_Specific(SelI))))
  767   if (!match(T, m_Shl(m_Value(Q), m_Specific(CIV))) &&
  768       !match(T, m_Shl(m_ZExt(m_Value(Q)), m_ZExt(m_Specific(CIV)))))
  799   if (match(CondV, m_ICmp(P, m_Value(C), m_Zero())) ||
  800       match(CondV, m_ICmp(P, m_Zero(), m_Value(C)))) {
  806   } else if (match(CondV, m_ICmp(P, m_Value(C), m_One())) ||
  807              match(CondV, m_ICmp(P, m_One(), m_Value(C)))) {
  817   if (!match(C, m_And(m_Value(X), m_One())) &&
  818       !match(C, m_And(m_One(), m_Value(X))))
  827     if (!match(TrueV, m_LShr(m_Value(R), m_One())))
  830     if (!match(FalseV, m_Xor(m_Specific(TrueV), m_Value(Q))) &&
  831         !match(FalseV, m_Xor(m_Value(Q), m_Specific(TrueV))))
  838     if (!match(FalseV, m_LShr(m_Value(R), m_One())))
  841     if (!match(TrueV, m_Xor(m_Specific(FalseV), m_Value(Q))) &&
  842         !match(TrueV, m_Xor(m_Value(Q), m_Specific(FalseV))))
  923         if (!match(PV.X, m_Xor(m_Value(X1), m_Value(X2))))
  923         if (!match(PV.X, m_Xor(m_Value(X1), m_Value(X2))))
 1309     if (!match(&I, m_LShr(m_Value(V), m_One())))
 1399     if (match(&*I, m_LShr(m_Value(V), m_One()))) {
lib/Target/WebAssembly/WebAssemblyFastISel.cpp
  428   if (match(V, m_Not(m_Value(NotV))) && V->getType()->isIntegerTy(32)) {
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
   80     auto Sub = m_Sub(m_SpecificInt(Width), m_Value(R1));
   84         m_c_Or(m_Shl(m_Value(L0), m_Value(L1)), m_LShr(m_Value(R0), Sub)));
   84         m_c_Or(m_Shl(m_Value(L0), m_Value(L1)), m_LShr(m_Value(R0), Sub)));
   84         m_c_Or(m_Shl(m_Value(L0), m_Value(L1)), m_LShr(m_Value(R0), Sub)));
   93         m_c_Or(m_LShr(m_Value(L0), m_Value(L1)), m_Shl(m_Value(R0), Sub)));
   93         m_c_Or(m_LShr(m_Value(L0), m_Value(L1)), m_Shl(m_Value(R0), Sub)));
   93         m_c_Or(m_LShr(m_Value(L0), m_Value(L1)), m_Shl(m_Value(R0), Sub)));
  181     if (match(V, m_And(m_Value(Op0), m_One()))) {
  185     if (match(V, m_And(m_Value(Op0), m_Value(Op1))))
  185     if (match(V, m_And(m_Value(Op0), m_Value(Op1))))
  189     if (match(V, m_Or(m_Value(Op0), m_Value(Op1))))
  189     if (match(V, m_Or(m_Value(Op0), m_Value(Op1))))
  197   if (!match(V, m_LShr(m_Value(Candidate), m_ConstantInt(BitIndex))))
  287   if ((match(Op0, m_Mul(m_Value(MulOp0), m_SpecificInt(Mask01)))) &&
  291     if (match(MulOp0, m_And(m_c_Add(m_LShr(m_Value(ShiftOp0), m_SpecificInt(4)),
  297                 m_c_Add(m_And(m_Value(AndOp0), m_SpecificInt(Mask33)),
  302         if (match(AndOp0, m_Sub(m_Value(Root), m_Value(SubOp1))) &&
  302         if (match(AndOp0, m_Sub(m_Value(Root), m_Value(SubOp1))) &&
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  782   if (match(RHS, m_Add(m_Value(X), m_One())))
  785   if (match(LHS, m_Add(m_Value(X), m_One()))) {
  787     if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1))))
  790     if (match(X, m_Xor(m_Value(Y), m_APInt(C1)))) {
  793       if (match(Y, m_Or(m_Value(Z), m_APInt(C2))) && (*C2 == ~(*C1))) {
  796       } else if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && (*C1 == *C2)) {
  810   if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1))))
  816   if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1))))
  818       if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && *C1 == (*C2 + 1)) {
  839       match(Op0, m_OneUse(m_ZExt(m_NUWAdd(m_Value(X), m_APInt(C2))))) &&
  849   if (match(Op0, m_OneUse(m_SExt(m_NSWAdd(m_Value(X), m_Constant(NarrowC)))))) {
  856   if (match(Op0, m_OneUse(m_ZExt(m_NUWAdd(m_Value(X), m_Constant(NarrowC)))))) {
  879   if (match(Op0, m_Sub(m_Constant(Op00C), m_Value(X))))
  885   if (match(Op0, m_OneUse(m_Sub(m_Value(X), m_Value(Y)))) &&
  885   if (match(Op0, m_OneUse(m_Sub(m_Value(X), m_Value(Y)))) &&
  890   if (match(Op0, m_ZExt(m_Value(X))) &&
  895   if (match(Op0, m_Not(m_Value(X))))
  921   if (match(Op0, m_ZExt(m_Xor(m_Value(X), m_APInt(C2)))) &&
  931     if (match(Op0, m_SExt(m_Value(X))) &&
  938     if (match(Op0, m_AShr(m_Shl(m_Value(X), m_APInt(C2)), m_APInt(C3))) &&
  953   if (match(E, m_Mul(m_Value(Op), m_APInt(AI)))) {
  957   if (match(E, m_Shl(m_Value(Op), m_APInt(AI)))) {
  972   if (match(E, m_SRem(m_Value(Op), m_APInt(AI)))) {
  977   if (match(E, m_URem(m_Value(Op), m_APInt(AI)))) {
  981   if (match(E, m_And(m_Value(Op), m_APInt(AI))) && (*AI + 1).isPowerOf2()) {
  993   if (IsSigned && match(E, m_SDiv(m_Value(Op), m_APInt(AI)))) {
  998     if (match(E, m_UDiv(m_Value(Op), m_APInt(AI)))) {
 1002     if (match(E, m_LShr(m_Value(Op), m_APInt(AI)))) {
 1063   if (!match(&I, m_Add(m_OneUse(m_Shl(m_One(), m_Value(NBits))), m_AllOnes())))
 1087   if (match(&I, m_c_Add(m_c_UMin(m_Value(X), m_Not(m_Value(Y))),
 1087   if (match(&I, m_c_Add(m_c_UMin(m_Value(X), m_Not(m_Value(Y))),
 1093   if (match(&I, m_Add(m_UMin(m_Value(X), m_APInt(NotC)), m_APInt(C))) &&
 1113                                m_LShr(m_Value(X), m_Instruction(LowBitsToSkip)),
 1115                            m_Value(Select))))
 1138           m_ZExtOrSelf(m_Sub(m_Constant(C), m_ZExtOrSelf(m_Value(NBits))))) ||
 1148       match(V, m_ZExtOrSelf(m_Value(V)));
 1150       match(V, m_SExtOrSelf(m_Value(V)));
 1165                               m_Value(SignExtendingValue), m_Value(Zero))) ||
 1165                               m_Value(SignExtendingValue), m_Value(Zero))) ||
 1229     if (match(LHS, m_Xor(m_Value(XorLHS), m_ConstantInt(XorRHS)))) {
 1282   if (match(LHS, m_Neg(m_Value(A)))) {
 1284     if (match(RHS, m_Neg(m_Value(B))))
 1293   if (match(&I, m_c_Add(m_Value(A), m_OneUse(m_SExt(m_Value(B))))) &&
 1293   if (match(&I, m_c_Add(m_Value(A), m_OneUse(m_SExt(m_Value(B))))) &&
 1298   if (match(RHS, m_Neg(m_Value(B))))
 1308   if (match(&I, m_c_BinOp(m_Add(m_Value(A), m_One()), m_Not(m_Value(B)))) ||
 1308   if (match(&I, m_c_BinOp(m_Add(m_Value(A), m_One()), m_Not(m_Value(B)))) ||
 1309       match(&I, m_BinOp(m_c_Add(m_Not(m_Value(B)), m_Value(A)), m_One())))
 1309       match(&I, m_BinOp(m_c_Add(m_Not(m_Value(B)), m_Value(A)), m_One())))
 1327         match(LHS, m_And(m_Value(X), m_ConstantInt(C2))) &&
 1362       if (match(FV, m_Zero()) && match(TV, m_Sub(m_Value(N), m_Specific(A))))
 1366       if (match(TV, m_Zero()) && match(FV, m_Sub(m_Value(N), m_Specific(A))))
 1377   if (match(&I, m_c_BinOp(m_Xor(m_Value(A), m_Value(B)),
 1377   if (match(&I, m_c_BinOp(m_Xor(m_Value(A), m_Value(B)),
 1383   if (match(&I, m_c_BinOp(m_Or(m_Value(A), m_Value(B)),
 1383   if (match(&I, m_c_BinOp(m_Or(m_Value(A), m_Value(B)),
 1420   if (!match(&I, m_c_FAdd(m_OneUse(m_c_FMul(m_Value(Y),
 1422                                                             m_Value(Z))))),
 1423                           m_OneUse(m_c_FMul(m_Value(X), m_Deferred(Z))))))
 1446   if ((match(Op0, m_OneUse(m_FMul(m_Value(X), m_Value(Z)))) &&
 1446   if ((match(Op0, m_OneUse(m_FMul(m_Value(X), m_Value(Z)))) &&
 1447        match(Op1, m_OneUse(m_c_FMul(m_Value(Y), m_Specific(Z))))) ||
 1448       (match(Op0, m_OneUse(m_FMul(m_Value(Z), m_Value(X)))) &&
 1448       (match(Op0, m_OneUse(m_FMul(m_Value(Z), m_Value(X)))) &&
 1449        match(Op1, m_OneUse(m_c_FMul(m_Value(Y), m_Specific(Z))))))
 1451   else if (match(Op0, m_OneUse(m_FDiv(m_Value(X), m_Value(Z)))) &&
 1451   else if (match(Op0, m_OneUse(m_FDiv(m_Value(X), m_Value(Z)))) &&
 1452            match(Op1, m_OneUse(m_FDiv(m_Value(Y), m_Specific(Z)))))
 1492   if (match(&I, m_c_FAdd(m_FNeg(m_Value(X)), m_Value(Y))))
 1492   if (match(&I, m_c_FAdd(m_FNeg(m_Value(X)), m_Value(Y))))
 1498   if (match(&I, m_c_FAdd(m_OneUse(m_c_FMul(m_FNeg(m_Value(X)), m_Value(Y))),
 1498   if (match(&I, m_c_FAdd(m_OneUse(m_c_FMul(m_FNeg(m_Value(X)), m_Value(Y))),
 1499                          m_Value(Z)))) {
 1505   if (match(&I, m_c_FAdd(m_OneUse(m_FDiv(m_FNeg(m_Value(X)), m_Value(Y))),
 1505   if (match(&I, m_c_FAdd(m_OneUse(m_FDiv(m_FNeg(m_Value(X)), m_Value(Y))),
 1506                          m_Value(Z))) ||
 1507       match(&I, m_c_FAdd(m_OneUse(m_FDiv(m_Value(X), m_FNeg(m_Value(Y)))),
 1507       match(&I, m_c_FAdd(m_OneUse(m_FDiv(m_Value(X), m_FNeg(m_Value(Y)))),
 1508                          m_Value(Z)))) {
 1712   if (match(Op0, m_Not(m_Value(X))) && match(Op1, m_Not(m_Value(Y))))
 1712   if (match(Op0, m_Not(m_Value(X))) && match(Op1, m_Not(m_Value(Y))))
 1716   if (match(Op0, m_OneUse(m_Add(m_Value(X), m_AllOnes()))))
 1720   if (match(Op1, m_OneUse(m_Add(m_Value(X), m_One()))))
 1724   if (match(Op1, m_OneUse(m_Not(m_Value(X))))) {
 1732     if (match(Op1, m_ZExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)) {
 1739     if (match(Op1, m_SExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)) {
 1748     if (match(Op1, m_Not(m_Value(X))))
 1764     if (match(Op1, m_Sub(m_Constant(C2), m_Value(X))))
 1768     if (match(Op1, m_Add(m_Value(X), m_Constant(C2))))
 1777       match(Op1, m_TruncOrSelf(m_Value(Op1Wide)));
 1786           match(Op1Wide, m_LShr(m_Value(X), m_APInt(ShAmt))) &&
 1798           match(Op1Wide, m_AShr(m_Value(X), m_APInt(ShAmt))) &&
 1834     if (match(Op1, m_c_Add(m_Specific(Op0), m_Value(Y))))
 1838     if (match(Op0, m_Sub(m_Specific(Op1), m_Value(Y))))
 1845     if (match(Op1, m_And(m_Value(A), m_Value(B))) &&
 1845     if (match(Op1, m_And(m_Value(A), m_Value(B))) &&
 1853     if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 1853     if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 1862     if (match(Op1, m_Xor(m_Value(A), m_Value(B))) &&
 1862     if (match(Op1, m_Xor(m_Value(A), m_Value(B))) &&
 1870     if (match(Op0, m_Xor(m_Value(A), m_Value(B))) &&
 1870     if (match(Op0, m_Xor(m_Value(A), m_Value(B))) &&
 1879     if (match(Op0, m_OneUse(m_c_Or(m_Value(Y), m_Specific(Op1)))))
 1889     if (match(Op1, m_Sub(m_Value(Y), m_Value(Z))))
 1889     if (match(Op1, m_Sub(m_Value(Y), m_Value(Z))))
 1894     if (match(Op1, m_c_And(m_Value(Y), m_Specific(Op0))))
 1901     if (match(Op0, m_Zero()) && match(Op1, m_SDiv(m_Value(X), m_APInt(DivC))) &&
 1910     if (match(Op1, m_Shl(m_Value(X), m_Value(Y))) && match(Op0, m_Zero()))
 1910     if (match(Op1, m_Shl(m_Value(X), m_Value(Y))) && match(Op0, m_Zero()))
 1917     if (match(Op1, m_SExt(m_Value(Y))) &&
 1928     if (match(Op1, m_c_Mul(m_Value(A), m_Neg(m_Value(B)))))
 1928     if (match(Op1, m_c_Mul(m_Value(A), m_Neg(m_Value(B)))))
 1934     if (match(Op1, m_Mul(m_Value(A), m_Constant(C))) && !isa<ConstantExpr>(C)) {
 1955         match(NotA, m_Not(m_Value(A))) && (NotA == LHS || NotA == RHS)) {
 1976   if (match(Op0, m_PtrToInt(m_Value(LHSOp))) &&
 1977       match(Op1, m_PtrToInt(m_Value(RHSOp))))
 1982   if (match(Op0, m_Trunc(m_PtrToInt(m_Value(LHSOp)))) &&
 1983       match(Op1, m_Trunc(m_PtrToInt(m_Value(RHSOp)))))
 1995   if (match(Op1, m_AShr(m_Value(A), m_APInt(ShAmt))) &&
 2039   if (match(&I, m_FNeg(m_OneUse(m_FMul(m_Value(X), m_Constant(C))))))
 2042   if (match(&I, m_FNeg(m_OneUse(m_FDiv(m_Value(X), m_Constant(C))))))
 2045   if (match(&I, m_FNeg(m_OneUse(m_FDiv(m_Constant(C), m_Value(X))))))
 2054   if (!match(&I, m_FNeg(m_Value(FNeg))))
 2058   if (match(FNeg, m_OneUse(m_FMul(m_Value(X), m_Value(Y)))))
 2058   if (match(FNeg, m_OneUse(m_FMul(m_Value(X), m_Value(Y)))))
 2061   if (match(FNeg, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))))
 2061   if (match(FNeg, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))))
 2081       match(Op, m_OneUse(m_FSub(m_Value(X), m_Value(Y)))))
 2081       match(Op, m_OneUse(m_FSub(m_Value(X), m_Value(Y)))))
 2121     if (match(Op1, m_OneUse(m_FSub(m_Value(X), m_Value(Y))))) {
 2121     if (match(Op1, m_OneUse(m_FSub(m_Value(X), m_Value(Y))))) {
 2139   if (match(Op1, m_FNeg(m_Value(Y))))
 2145   if (match(Op1, m_OneUse(m_FPTrunc(m_FNeg(m_Value(Y))))))
 2149   if (match(Op1, m_OneUse(m_FPExt(m_FNeg(m_Value(Y))))))
 2155   if (match(Op1, m_OneUse(m_c_FMul(m_FNeg(m_Value(X)), m_Value(Y))))) {
 2155   if (match(Op1, m_OneUse(m_c_FMul(m_FNeg(m_Value(X)), m_Value(Y))))) {
 2161   if (match(Op1, m_OneUse(m_FDiv(m_FNeg(m_Value(X)), m_Value(Y)))) ||
 2161   if (match(Op1, m_OneUse(m_FDiv(m_FNeg(m_Value(X)), m_Value(Y)))) ||
 2162       match(Op1, m_OneUse(m_FDiv(m_Value(X), m_FNeg(m_Value(Y)))))) {
 2162       match(Op1, m_OneUse(m_FDiv(m_Value(X), m_FNeg(m_Value(Y)))))) {
 2173     if (match(Op0, m_FSub(m_Specific(Op1), m_Value(X))))
 2178     if (match(Op1, m_c_FAdd(m_Specific(Op0), m_Value(X))))
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
   90   if (!match(OldLHS, m_BSwap(m_Value(NewLHS))))
   96   if (match(OldRHS, m_BSwap(m_Value(NewRHS)))) {
  335     if (!match(L1, m_And(m_Value(L11), m_Value(L12)))) {
  335     if (!match(L1, m_And(m_Value(L11), m_Value(L12)))) {
  342     if (!match(L2, m_And(m_Value(L21), m_Value(L22)))) {
  342     if (!match(L2, m_And(m_Value(L21), m_Value(L22)))) {
  370     if (!match(R1, m_And(m_Value(R11), m_Value(R12)))) {
  370     if (!match(R1, m_And(m_Value(R11), m_Value(R12)))) {
  396     if (!match(R2, m_And(m_Value(R11), m_Value(R12)))) {
  396     if (!match(R2, m_And(m_Value(R11), m_Value(R12)))) {
  878   if (match(LHS->getOperand(0), m_And(m_Value(A), m_Value(B))) &&
  878   if (match(LHS->getOperand(0), m_And(m_Value(A), m_Value(B))) &&
  879       match(RHS->getOperand(0), m_And(m_Value(C), m_Value(D)))) {
  879       match(RHS->getOperand(0), m_And(m_Value(C), m_Value(D)))) {
  939                 m_ICmp(Pred, m_Add(m_Value(X), m_Power2(I01)), m_Power2(I1))) &&
  973     if (match(ICmp, m_ICmp(Pred, m_And(m_Value(X), m_APInt(Mask)), m_Zero())) &&
 1034   if (JoinedByAnd && match(Cmp0, m_ICmp(Pred0, m_Value(X), m_ZeroInt())) &&
 1042   if (!JoinedByAnd && match(Cmp0, m_ICmp(Pred0, m_Value(X), m_ZeroInt())) &&
 1060   if (!match(ZeroICmp, m_ICmp(EqPred, m_Value(ZeroCmpOp), m_Zero())) ||
 1072             m_c_ICmp(UnsignedPred, m_Specific(ZeroCmpOp), m_Value(A))) &&
 1073       match(ZeroCmpOp, m_c_Add(m_Specific(A), m_Value(B))) &&
 1107   if (!match(ZeroCmpOp, m_Sub(m_Value(Base), m_Value(Offset))))
 1107   if (!match(ZeroCmpOp, m_Sub(m_Value(Base), m_Value(Offset))))
 1226     if (match(RHS0, m_Trunc(m_Value(V))) &&
 1230     } else if (match(LHS0, m_Trunc(m_Value(V))) &&
 1430   if (!match(Op0, m_FCmp(Pred, m_Value(X), m_AnyZeroFP())) || Pred != NanPred ||
 1436   if (!match(BO10, m_FCmp(Pred, m_Value(Y), m_AnyZeroFP())) ||
 1440   if (!match(BO10, m_FCmp(Pred, m_Value(Y), m_AnyZeroFP())) ||
 1468   if (match(I.getOperand(0), m_OneUse(m_Not(m_Value(A)))) &&
 1469       match(I.getOperand(1), m_OneUse(m_Not(m_Value(B)))) &&
 1511   if (match(Cast, m_OneUse(m_ZExt(m_Value(X))))) {
 1521   if (match(Cast, m_OneUse(m_SExt(m_Value(X))))) {
 1611   if (match(&I, m_BinOp(m_Or(m_Value(A), m_Value(B)),
 1611   if (match(&I, m_BinOp(m_Or(m_Value(A), m_Value(B)),
 1620     if (match(&I, m_BinOp(m_c_Or(m_Value(A), m_Not(m_Value(B))),
 1620     if (match(&I, m_BinOp(m_c_Or(m_Value(A), m_Not(m_Value(B))),
 1638     if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 1638     if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 1646   if (match(Op0, m_c_And(m_Value(A), m_Not(m_Value(B)))) &&
 1646   if (match(Op0, m_c_And(m_Value(A), m_Not(m_Value(B)))) &&
 1697   if (!match(Op1, m_ZExt(m_Value(X))) || Op1->hasNUsesOrMore(3))
 1754     if (match(Op0, m_OneUse(m_LogicalShift(m_One(), m_Value(X)))) &&
 1763     if (match(Op0, m_OneUse(m_Xor(m_Value(X), m_APInt(XorC))))) {
 1772     if (match(Op0, m_OneUse(m_Or(m_Value(X), m_APInt(OrC))))) {
 1788     if (match(Op0, m_OneUse(m_Xor(m_Value(X), m_Value(Y)))) ||
 1788     if (match(Op0, m_OneUse(m_Xor(m_Value(X), m_Value(Y)))) ||
 1789         match(Op0, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
 1789         match(Op0, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
 1828         if (match(Op0I, m_OneUse(m_c_BinOp(m_OneUse(m_ZExt(m_Value(X))),
 1854       if (match(Op0, m_Trunc(m_And(m_Value(X), m_ConstantInt(YC))))) {
 1879     if (match(Op1, m_OneUse(m_c_Xor(m_Specific(Op0), m_Value(B)))))
 1882     if (match(Op0, m_OneUse(m_c_Xor(m_Specific(Op1), m_Value(B)))))
 1886     if (match(Op0, m_Xor(m_Value(A), m_Value(B))))
 1886     if (match(Op0, m_Xor(m_Value(A), m_Value(B))))
 1887       if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
 1892     if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B))))
 1892     if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B))))
 1892     if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B))))
 1901     if (match(Op1, m_c_Xor(m_Not(m_Value(A)), m_Value(B))) &&
 1901     if (match(Op1, m_c_Xor(m_Not(m_Value(A)), m_Value(B))) &&
 1909     if (match(Op0, m_c_Xor(m_Not(m_Value(A)), m_Value(B))) &&
 1909     if (match(Op0, m_c_Xor(m_Not(m_Value(A)), m_Value(B))) &&
 1924     if (LHS && match(Op1, m_OneUse(m_And(m_Value(X), m_Value(Y))))) {
 1924     if (LHS && match(Op1, m_OneUse(m_And(m_Value(X), m_Value(Y))))) {
 1932     if (RHS && match(Op0, m_OneUse(m_And(m_Value(X), m_Value(Y))))) {
 1932     if (RHS && match(Op0, m_OneUse(m_And(m_Value(X), m_Value(Y))))) {
 1955   if (match(Op0, m_OneUse(m_SExt(m_Value(A)))) &&
 1958   if (match(Op1, m_OneUse(m_SExt(m_Value(A)))) &&
 1967     if (match(&I, m_c_And(m_OneUse(m_AShr(m_NSWSub(m_Value(Y), m_Value(X)),
 1967     if (match(&I, m_c_And(m_OneUse(m_AShr(m_NSWSub(m_Value(Y), m_Value(X)),
 2043   if (!match(Or0, m_OneUse(m_LogicalShift(m_Value(ShVal), m_Value(ShAmt0)))) ||
 2043   if (!match(Or0, m_OneUse(m_LogicalShift(m_Value(ShVal), m_Value(ShAmt0)))) ||
 2044       !match(Or1, m_OneUse(m_LogicalShift(m_Specific(ShVal), m_Value(ShAmt1)))))
 2059     if (match(L, m_And(m_Value(X), m_SpecificInt(Mask))) &&
 2065     if (match(L, m_ZExt(m_And(m_Value(X), m_SpecificInt(Mask)))) &&
 2138   if (match(A, m_SExt(m_Value(Cond))) &&
 2140       match(B, m_OneUse(m_Not(m_Value(NotB))))) {
 2154   if (match(A, (m_Xor(m_SExt(m_Value(Cond)), m_Constant(AConst)))) &&
 2222     if (match(LAdd, m_Add(m_Value(LAddOpnd), m_ConstantInt(LAddC))) &&
 2223         match(RAdd, m_Add(m_Value(RAddOpnd), m_ConstantInt(RAddC))) &&
 2486   if (match(&I, m_c_Or(m_OneUse(m_Xor(m_Value(X), m_APInt(CV))), m_Value(Y))) &&
 2486   if (match(&I, m_c_Or(m_OneUse(m_Xor(m_Value(X), m_APInt(CV))), m_Value(Y))) &&
 2497   if (match(Op0, m_And(m_Value(A), m_Value(C))) &&
 2497   if (match(Op0, m_And(m_Value(A), m_Value(C))) &&
 2498       match(Op1, m_And(m_Value(B), m_Value(D)))) {
 2498       match(Op1, m_And(m_Value(B), m_Value(D)))) {
 2506         if (match(A, m_Or(m_Value(V1), m_Value(V2))) &&
 2506         if (match(A, m_Or(m_Value(V1), m_Value(V2))) &&
 2514         if (match(B, m_Or(m_Value(V1), m_Value(V2))) &&
 2514         if (match(B, m_Or(m_Value(V1), m_Value(V2))) &&
 2525         if (match(A, m_Or(m_Value(V1), m_ConstantInt(C3))) &&
 2539         if (match(A, m_c_Or(m_Value(X), m_Specific(B))))
 2542         if (match(B, m_c_Or(m_Specific(A), m_Value(X))))
 2546         if (match(A, m_c_Xor(m_Value(X), m_Specific(B))))
 2549         if (match(B, m_c_Xor(m_Specific(A), m_Value(X))))
 2579   if (match(Op0, m_Xor(m_Value(A), m_Value(B))))
 2579   if (match(Op0, m_Xor(m_Value(A), m_Value(B))))
 2580     if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
 2584   if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B))))
 2584   if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B))))
 2584   if (match(Op0, m_Xor(m_Xor(m_Value(A), m_Value(C)), m_Value(B))))
 2589   if (match(Op0, m_And(m_Or(m_Specific(Op1), m_Value(C)), m_Value(A))))
 2589   if (match(Op0, m_And(m_Or(m_Specific(Op1), m_Value(C)), m_Value(A))))
 2605   if (match(Op1, m_Xor(m_Value(A), m_Value(B)))) {
 2605   if (match(Op1, m_Xor(m_Value(A), m_Value(B)))) {
 2625   if (match(Op1, m_Not(m_Value(A))))
 2649     if (LHS && match(Op1, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
 2649     if (LHS && match(Op1, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
 2657     if (RHS && match(Op0, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
 2657     if (RHS && match(Op0, m_OneUse(m_Or(m_Value(X), m_Value(Y))))) {
 2679   if (match(Op0, m_OneUse(m_SExt(m_Value(A)))) &&
 2682   if (match(Op1, m_OneUse(m_SExt(m_Value(A)))) &&
 2693       match(Op0, m_Or(m_Value(A), m_ConstantInt(CI)))) {
 2705         match(Op0, m_Select(m_Value(X), m_Value(A), m_Value(B))) &&
 2705         match(Op0, m_Select(m_Value(X), m_Value(A), m_Value(B))) &&
 2705         match(Op0, m_Select(m_Value(X), m_Value(A), m_Value(B))) &&
 2706         match(Op1, m_Select(m_Value(Y), m_Value(C), m_Value(D))) && X == Y) {
 2706         match(Op1, m_Select(m_Value(Y), m_Value(C), m_Value(D))) && X == Y) {
 2706         match(Op1, m_Select(m_Value(Y), m_Value(C), m_Value(D))) && X == Y) {
 2718     if (match(&I, m_c_Or(m_OneUse(m_AShr(m_NSWSub(m_Value(Y), m_Value(X)),
 2718     if (match(&I, m_c_Or(m_OneUse(m_AShr(m_NSWSub(m_Value(Y), m_Value(X)),
 2750   if (match(&I, m_c_Xor(m_And(m_Value(A), m_Value(B)),
 2750   if (match(&I, m_c_Xor(m_And(m_Value(A), m_Value(B)),
 2761   if (match(&I, m_Xor(m_c_Or(m_Value(A), m_Not(m_Value(B))),
 2761   if (match(&I, m_Xor(m_c_Or(m_Value(A), m_Not(m_Value(B))),
 2772   if (match(&I, m_Xor(m_c_And(m_Value(A), m_Not(m_Value(B))),
 2772   if (match(&I, m_Xor(m_c_And(m_Value(A), m_Not(m_Value(B))),
 2788   if ((match(Op0, m_Or(m_Value(A), m_Value(B))) &&
 2788   if ((match(Op0, m_Or(m_Value(A), m_Value(B))) &&
 2790       (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 2790       (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 2911   if (!match(&I, m_c_Xor(m_Value(B),
 2913                              m_CombineAnd(m_c_Xor(m_Deferred(B), m_Value(X)),
 2914                                           m_Value(D)),
 2915                              m_Value(M))))))
 2919   if (match(M, m_Not(m_Value(NotM)))) {
 2948   if (!match(&I, m_Not(m_OneUse(m_Xor(m_Value(X), m_Value(Y))))))
 2948   if (!match(&I, m_Not(m_OneUse(m_Xor(m_Value(X), m_Value(Y))))))
 2999   if (match(&I, m_c_Xor(m_c_And(m_Not(m_Value(M)), m_Value()),
 3010   if (match(&I, m_Not(m_OneUse(m_c_And(m_Not(m_Value(X)), m_Value(Y)))))) {
 3010   if (match(&I, m_Not(m_OneUse(m_c_And(m_Not(m_Value(X)), m_Value(Y)))))) {
 3016   if (match(&I, m_Not(m_OneUse(m_c_Or(m_Not(m_Value(X)), m_Value(Y)))))) {
 3016   if (match(&I, m_Not(m_OneUse(m_c_Or(m_Not(m_Value(X)), m_Value(Y)))))) {
 3045     if (match(NotVal, m_Sub(m_Value(X), m_Value(Y))))
 3045     if (match(NotVal, m_Sub(m_Value(X), m_Value(Y))))
 3050     if (match(NotVal, m_AShr(m_Not(m_Value(X)), m_Value(Y))))
 3050     if (match(NotVal, m_AShr(m_Not(m_Value(X)), m_Value(Y))))
 3060     if (match(NotVal, m_AShr(m_Constant(C), m_Value(Y))) &&
 3065     if (match(NotVal, m_LShr(m_Constant(C), m_Value(Y))) &&
 3070     if (match(Op0, m_Add(m_Value(X), m_Constant(C))))
 3078     if (match(Op0, m_OneUse(m_Or(m_Not(m_Value(X)), m_Constant(C2))))) {
 3083     if (match(Op0, m_OneUse(m_And(m_Not(m_Value(X)), m_Constant(C2))))) {
 3102       if (RHSC->isSignMask() && match(Op0, m_Sub(m_APInt(C), m_Value(X)))) {
 3107       if (RHSC->isSignMask() && match(Op0, m_Add(m_Value(X), m_APInt(C)))) {
 3114       if (match(Op0, m_Or(m_Value(X), m_APInt(C))) &&
 3159   if (match(Op1, m_OneUse(m_c_Or(m_Value(X), m_Specific(Op0)))))
 3163   if (match(Op0, m_OneUse(m_c_Or(m_Value(X), m_Specific(Op1)))))
 3168   if (match(Op1, m_OneUse(m_c_And(m_Value(X), m_Specific(Op0)))))
 3176       match(Op0, m_OneUse(m_c_And(m_Value(X), m_Specific(Op1)))))
 3181   if (match(&I, m_c_Xor(m_OneUse(m_Xor(m_Value(A), m_Value(B))),
 3181   if (match(&I, m_c_Xor(m_OneUse(m_Xor(m_Value(A), m_Value(B))),
 3182                         m_OneUse(m_c_Or(m_Deferred(A), m_Value(C))))))
 3187   if (match(&I, m_c_Xor(m_OneUse(m_Xor(m_Value(A), m_Value(B))),
 3187   if (match(&I, m_c_Xor(m_OneUse(m_Xor(m_Value(A), m_Value(B))),
 3188                         m_OneUse(m_c_Or(m_Deferred(B), m_Value(C))))))
 3193   if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 3193   if (match(Op0, m_And(m_Value(A), m_Value(B))) &&
 3197   if (match(Op0, m_Xor(m_Value(A), m_Value(B))) &&
 3197   if (match(Op0, m_Xor(m_Value(A), m_Value(B))) &&
 3203   if (match(Op0, m_c_And(m_Value(A), m_Not(m_Value(B)))) &&
 3203   if (match(Op0, m_c_And(m_Value(A), m_Not(m_Value(B)))) &&
 3225   if (match(Op1, m_AShr(m_Value(A), m_APInt(ShAmt))) &&
 3257       if (match(LHS, m_Not(m_Value(X))) && !isFreeToInvert(X, X->hasOneUse())) {
 3265       if (match(RHS, m_Not(m_Value(Y))) && !isFreeToInvert(Y, Y->hasOneUse())) {
lib/Transforms/InstCombine/InstCombineCalls.cpp
 1191   if (match(Op0, m_BitReverse(m_Value(X)))) {
 1199     if (match(Op0, m_Neg(m_Value(X)))) {
 1265   if (match(Op0, m_BitReverse(m_Value(X))) || match(Op0, m_BSwap(m_Value(X)))) {
 1265   if (match(Op0, m_BitReverse(m_Value(X))) || match(Op0, m_BSwap(m_Value(X)))) {
 1894     if (match(IIOperand, m_Trunc(m_BSwap(m_Value(X))))) {
 2025     bool HasNWAdd = IsSigned ? match(Arg0, m_NSWAdd(m_Value(X), m_APInt(C0)))
 2026                              : match(Arg0, m_NUWAdd(m_Value(X), m_APInt(C0)));
 2129           match(Other->getArgOperand(0), m_Value(X)) &&
 2163     if (match(Arg0, m_FNeg(m_Value(X))) && match(Arg1, m_FNeg(m_Value(Y))) &&
 2163     if (match(Arg0, m_FNeg(m_Value(X))) && match(Arg1, m_FNeg(m_Value(Y))) &&
 2195           ((match(M->getArgOperand(0), m_Value(X)) &&
 2197            (match(M->getArgOperand(1), m_Value(X)) &&
 2256     if (match(Src0, m_FNeg(m_Value(X))) && match(Src1, m_FNeg(m_Value(Y)))) {
 2256     if (match(Src0, m_FNeg(m_Value(X))) && match(Src1, m_FNeg(m_Value(Y)))) {
 2263     if (match(Src0, m_FAbs(m_Value(X))) &&
 2286               m_Select(m_Value(Cond), m_Constant(LHS), m_Constant(RHS)))) {
 2301     if (match(II->getArgOperand(0), m_OneUse(m_FPExt(m_Value(ExtSrc))))) {
 2312     if (match(Src, m_FNeg(m_Value(X))) || match(Src, m_FAbs(m_Value(X)))) {
 2312     if (match(Src, m_FNeg(m_Value(X))) || match(Src, m_FAbs(m_Value(X)))) {
 2322     if (match(II->getArgOperand(0), m_OneUse(m_FNeg(m_Value(X))))) {
 2612     if ((match(Arg0, m_OneUse(m_FSub(m_Value(A), m_Value(B)))) &&
 2612     if ((match(Arg0, m_OneUse(m_FSub(m_Value(A), m_Value(B)))) &&
 3066     if (match(Mask, m_SExt(m_Value(BoolVec))) &&
 3304         match(DataArg, m_Xor(m_Value(Data), m_Value(Key)))) {
 3304         match(DataArg, m_Xor(m_Value(Data), m_Value(Key)))) {
 3721         ((match(Src1, m_One()) && match(Src0, m_ZExt(m_Value(ExtSrc)))) ||
 3722          (match(Src1, m_AllOnes()) && match(Src0, m_SExt(m_Value(ExtSrc))))) &&
 3745               m_ZExtOrSExt(m_Cmp(SrcPred, m_Value(SrcLHS), m_Value(SrcRHS))))) {
 3745               m_ZExtOrSExt(m_Cmp(SrcPred, m_Value(SrcLHS), m_Value(SrcRHS))))) {
 3936     if (match(IIOperand, m_And(m_Value(A), m_Value(B)))) {
 3936     if (match(IIOperand, m_And(m_Value(A), m_Value(B)))) {
 3942     if (match(IIOperand, m_Not(m_Or(m_Value(A), m_Value(B))))) {
 3942     if (match(IIOperand, m_Not(m_Or(m_Value(A), m_Value(B))))) {
 4044               m_Intrinsic<Intrinsic::experimental_guard>(m_Value(NextCond)))) {
lib/Transforms/InstCombine/InstCombineCasts.cpp
  309   if ((match(V, m_ZExtOrSExt(m_Value(X))) || match(V, m_Trunc(m_Value(X)))) &&
  309   if ((match(V, m_ZExtOrSExt(m_Value(X))) || match(V, m_Trunc(m_Value(X)))) &&
  464   if (!match(TruncOp, m_CombineOr(m_BitCast(m_Value(VecInput)),
  465                                   m_LShr(m_BitCast(m_Value(VecInput)),
  510   if (!match(Trunc.getOperand(0), m_OneUse(m_Or(m_Value(Or0), m_Value(Or1)))))
  510   if (!match(Trunc.getOperand(0), m_OneUse(m_Or(m_Value(Or0), m_Value(Or1)))))
  514   if (!match(Or0, m_OneUse(m_LogicalShift(m_Value(ShVal), m_Value(ShAmt0)))) ||
  514   if (!match(Or0, m_OneUse(m_LogicalShift(m_Value(ShVal), m_Value(ShAmt0)))) ||
  515       !match(Or1, m_OneUse(m_LogicalShift(m_Specific(ShVal), m_Value(ShAmt1)))))
  535     if (match(L, m_And(m_Value(X), m_SpecificInt(Mask))) &&
  540     if (match(L, m_ZExt(m_And(m_Value(X), m_SpecificInt(Mask)))) &&
  612     if (match(BinOp0, m_ZExtOrSExt(m_Value(X))) && X->getType() == DestTy) {
  617     if (match(BinOp1, m_ZExtOrSExt(m_Value(X))) && X->getType() == DestTy) {
  739     if (match(Src, m_OneUse(m_LShr(m_Value(X), m_APInt(C))))) {
  745     if (match(Src, m_OneUse(m_c_Or(m_LShr(m_Value(X), m_APInt(C)),
  760       match(Src, m_LShr(m_ZExt(m_Value(A)), m_ConstantInt(Cst)))) {
  787       match(Src, m_LShr(m_SExt(m_Value(A)), m_ConstantInt(Cst)))) {
  825     if (match(Src, m_Shl(m_Value(A), m_ConstantInt(Cst))) &&
 1207       match(SrcI, m_OneUse(m_And(m_Trunc(m_Value(X)), m_Constant(C)))) &&
 1213   if (SrcI && match(SrcI, m_OneUse(m_Xor(m_Value(And), m_Constant(C)))) &&
 1214       match(And, m_OneUse(m_And(m_Trunc(m_Value(X)), m_Specific(C)))) &&
 1405   if (match(Src, m_OneUse(m_Trunc(m_Value(X)))) && X->getType() == DestTy) {
 1432   if (match(Src, m_AShr(m_Shl(m_Trunc(m_Value(A)), m_ConstantInt(BA)),
 1624     if (match(Op, m_FNeg(m_Value(X)))) {
 2072   if (match(BO->getOperand(0), m_OneUse(m_BitCast(m_Value(X)))) &&
 2079   if (match(BO->getOperand(1), m_OneUse(m_BitCast(m_Value(X)))) &&
 2106              m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))))
 2106              m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))))
 2106              m_OneUse(m_Select(m_Value(Cond), m_Value(TVal), m_Value(FVal)))))
 2128   if (match(TVal, m_OneUse(m_BitCast(m_Value(X)))) && X->getType() == DestTy &&
 2135   if (match(FVal, m_OneUse(m_BitCast(m_Value(X)))) && X->getType() == DestTy &&
lib/Transforms/InstCombine/InstCombineCompares.cpp
 1348   if (!match(&I, m_ICmp(Pred, m_OneUse(m_IRem(m_Value(X), m_Value(Y))),
 1348   if (!match(&I, m_ICmp(Pred, m_OneUse(m_IRem(m_Value(X), m_Value(Y))),
 1349                         m_CombineAnd(m_Zero(), m_Value(Zero)))))
 1371   if (match(Val, m_TruncOrSelf(m_Shr(m_Value(X), m_Constant(C))))) {
 1417   if (match(Cmp.getOperand(0), m_URem(m_Value(X), m_Value(Y))) &&
 1417   if (match(Cmp.getOperand(0), m_URem(m_Value(X), m_Value(Y))) &&
 1450       match(Op0, m_Add(m_Add(m_Value(A), m_Value(B)), m_ConstantInt(CI2))))
 1450       match(Op0, m_Add(m_Add(m_Value(A), m_Value(B)), m_ConstantInt(CI2))))
 1468   if (!match(DomBB->getTerminator(), m_Br(m_Value(DomCond), TrueBB, FalseBB)))
 1536     if (Pred == ICmpInst::ICMP_SLT && match(X, m_Signum(m_Value(V))))
 1730   if (!match(And, m_And(m_Value(X), m_APInt(C2))))
 1765   if (match(And->getOperand(0), m_OneUse(m_Trunc(m_Value(W)))) &&
 1792     if (match(Or, m_Or(m_Value(LShr), m_Value(A))) &&
 1792     if (match(Or, m_Or(m_Value(LShr), m_Value(A))) &&
 1793         match(LShr, m_LShr(m_Specific(A), m_Value(B)))) {
 1885     if (Pred == ICmpInst::ICMP_SLT && match(Or, m_Signum(m_Value(V))))
 1912   if (match(Or, m_Or(m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(Q))))) {
 1912   if (match(Or, m_Or(m_PtrToInt(m_Value(P)), m_PtrToInt(m_Value(Q))))) {
 1926   if (match(OrOp0, m_OneUse(m_Xor(m_Value(X1), m_Value(X2)))) &&
 1926   if (match(OrOp0, m_OneUse(m_Xor(m_Value(X1), m_Value(X2)))) &&
 1927       match(OrOp1, m_OneUse(m_Xor(m_Value(X3), m_Value(X4))))) {
 1927       match(OrOp1, m_OneUse(m_Xor(m_Value(X3), m_Value(X4))))) {
 1964   if (!match(Shl, m_Shl(m_One(), m_Value(Y))))
 2634   if (!match(SI->getCondition(), m_ICmp(PredA, m_Value(LHS), m_Value(RHS))) ||
 2634   if (!match(SI->getCondition(), m_ICmp(PredA, m_Value(LHS), m_Value(RHS))) ||
 2646   if (!match(UnequalVal, m_Select(m_ICmp(PredB, m_Value(LHS2), m_Value(RHS2)),
 2646   if (!match(UnequalVal, m_Select(m_ICmp(PredB, m_Value(LHS2), m_Value(RHS2)),
 2740     if (match(BCSrcOp, m_SIToFP(m_Value(X)))) {
 2763     if (match(BCSrcOp, m_UIToFP(m_Value(X))))
 2797             m_ShuffleVector(m_Value(Vec), m_Undef(), m_Constant(Mask)))) {
 3286                   m_LShr(m_Shl(m_AllOnes(), m_Value(Y)), m_Deferred(Y))));
 3289                           m_c_And(m_CombineAnd(m_Mask, m_Value(M)), m_Value(X)),
 3289                           m_c_And(m_CombineAnd(m_Mask, m_Value(M)), m_Value(X)),
 3386                           m_OneUse(m_AShr(m_Shl(m_Value(X), m_APInt(C0)),
 3494   match(XShift, m_BinOp(m_Value(X), m_ZExtOrSelf(m_Value(XShAmt))));
 3494   match(XShift, m_BinOp(m_Value(X), m_ZExtOrSelf(m_Value(XShAmt))));
 3495   match(YShift, m_BinOp(m_Value(Y), m_ZExtOrSelf(m_Value(YShAmt))));
 3495   match(YShift, m_BinOp(m_Value(Y), m_ZExtOrSelf(m_Value(YShAmt))));
 3610       match(&I, m_c_ICmp(Pred, m_OneUse(m_UDiv(m_AllOnes(), m_Value(X))),
 3611                          m_Value(Y)))) {
 3630           match(&I, m_c_ICmp(Pred, m_Value(Y),
 3632                                                                   m_Value(X)),
 3682   if (match(Op0, m_OneUse(m_c_Add(m_Specific(Op1), m_Value(X)))) &&
 3686   if (match(Op1, m_OneUse(m_c_Add(m_Specific(Op0), m_Value(X)))) &&
 3890     if (match(BO0, m_Neg(m_Value(X))))
 4050   if (match(Op0, m_c_SMin(m_Specific(X), m_Value(Y)))) {
 4067   if (match(Op0, m_c_SMax(m_Specific(X), m_Value(Y)))) {
 4084   if (match(Op0, m_c_UMin(m_Specific(X), m_Value(Y)))) {
 4101   if (match(Op0, m_c_UMax(m_Specific(X), m_Value(Y)))) {
 4128   if (match(Op0, m_Xor(m_Value(A), m_Value(B)))) {
 4128   if (match(Op0, m_Xor(m_Value(A), m_Value(B)))) {
 4134     if (match(Op1, m_Xor(m_Value(C), m_Value(D)))) {
 4134     if (match(Op1, m_Xor(m_Value(C), m_Value(D)))) {
 4156   if (match(Op1, m_Xor(m_Value(A), m_Value(B))) && (A == Op0 || B == Op0)) {
 4156   if (match(Op1, m_Xor(m_Value(A), m_Value(B))) && (A == Op0 || B == Op0)) {
 4163   if (match(Op0, m_OneUse(m_And(m_Value(A), m_Value(B)))) &&
 4163   if (match(Op0, m_OneUse(m_And(m_Value(A), m_Value(B)))) &&
 4164       match(Op1, m_OneUse(m_And(m_Value(C), m_Value(D))))) {
 4164       match(Op1, m_OneUse(m_And(m_Value(C), m_Value(D))))) {
 4197   if ((Op0->hasOneUse() && match(Op0, m_ZExt(m_Value(A))) &&
 4198        match(Op1, m_And(m_Value(B), m_ConstantInt(Cst1)))) ||
 4199       (Op1->hasOneUse() && match(Op0, m_And(m_Value(B), m_ConstantInt(Cst1))) &&
 4200        match(Op1, m_ZExt(m_Value(A))))) {
 4209   if ((match(Op0, m_OneUse(m_LShr(m_Value(A), m_ConstantInt(Cst1)))) &&
 4210        match(Op1, m_OneUse(m_LShr(m_Value(B), m_Specific(Cst1))))) ||
 4211       (match(Op0, m_OneUse(m_AShr(m_Value(A), m_ConstantInt(Cst1)))) &&
 4212        match(Op1, m_OneUse(m_AShr(m_Value(B), m_Specific(Cst1)))))) {
 4225   if (match(Op0, m_OneUse(m_Shl(m_Value(A), m_ConstantInt(Cst1)))) &&
 4226       match(Op1, m_OneUse(m_Shl(m_Value(B), m_Specific(Cst1))))) {
 4242       match(Op0, m_Trunc(m_OneUse(m_LShr(m_Value(A), m_ConstantInt(ShAmt))))) &&
 4266   if ((match(Op0, m_BSwap(m_Value(A))) && match(Op1, m_BSwap(m_Value(B)))) ||
 4266   if ((match(Op0, m_BSwap(m_Value(A))) && match(Op1, m_BSwap(m_Value(B)))) ||
 4267       (match(Op0, m_BitReverse(m_Value(A))) &&
 4268        match(Op1, m_BitReverse(m_Value(B)))))
 4274   if (!match(Op0, m_OneUse(m_c_And(m_Add(m_Value(A), m_AllOnes()),
 4303   if (!match(CastOp0, m_ZExtOrSExt(m_Value(X))))
 4613     if (match(OtherVal, m_And(m_Value(ValToMask), m_ConstantInt(CI)))) {
 4992       if (!match(Op0, m_And(m_Value(LHS), m_APInt(LHSC))) ||
 4997       if (match(LHS, m_Shl(m_One(), m_Value(X)))) {
 5019           match(LHS, m_LShr(m_Power2(CI), m_Value(X)))) {
 5311             m_c_ICmp(Pred, m_OneUse(m_Shl(m_One(), m_Value(Y))), m_Value(X)))) {
 5311             m_c_ICmp(Pred, m_OneUse(m_Shl(m_One(), m_Value(Y))), m_Value(X)))) {
 5328                                       m_Not(m_Shl(m_AllOnes(), m_Value(Y))),
 5329                                       m_Add(m_Shl(m_One(), m_Value(Y)),
 5331                                   m_Value(X)))) {
 5364   if (match(LHS, m_ShuffleVector(m_Value(V1), m_Undef(), m_Constant(M))) &&
 5365       match(RHS, m_ShuffleVector(m_Value(V2), m_Undef(), m_Specific(M))) &&
 5401     if (match(Op0, m_Select(m_Value(Cond), m_Value(SelectTrue),
 5401     if (match(Op0, m_Select(m_Value(Cond), m_Value(SelectTrue),
 5402                             m_Value(SelectFalse)))) {
 5520     if (match(Op0, m_And(m_Value(A), m_Not(m_Value(B)))) &&
 5520     if (match(Op0, m_And(m_Value(A), m_Not(m_Value(B)))) &&
 5528     if (match(Op0, m_Not(m_Value(A)))) {
 5529       if (match(Op1, m_Not(m_Value(B))))
 5539     if (match(&I, m_UAddWithOverflow(m_Value(A), m_Value(B),
 5539     if (match(&I, m_UAddWithOverflow(m_Value(A), m_Value(B),
 5552     if (match(Op0, m_Mul(m_ZExt(m_Value(A)), m_ZExt(m_Value(B))))) {
 5552     if (match(Op0, m_Mul(m_ZExt(m_Value(A)), m_ZExt(m_Value(B))))) {
 5556     if (match(Op1, m_Mul(m_ZExt(m_Value(A)), m_ZExt(m_Value(B))))) {
 5556     if (match(Op1, m_Mul(m_ZExt(m_Value(A)), m_ZExt(m_Value(B))))) {
 5585     if (match(Op0, m_Add(m_Value(X), m_APInt(C))) && Op1 == X)
 5589     if (match(Op1, m_Add(m_Value(X), m_APInt(C))) && Op0 == X)
 5892   if (!match(I.getOperand(0), m_Intrinsic<Intrinsic::fabs>(m_Value(X))) ||
 6011   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
 6011   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
 6072   if (match(Op0, m_FNeg(m_Value(X)))) {
 6081   if (match(Op0, m_FPExt(m_Value(X)))) {
 6083     if (match(Op1, m_FPExt(m_Value(Y))) && X->getType() == Y->getType())
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  460   if (!(match(Ptr, m_BitCast(m_Value(NewPtr))) &&
  541                          m_Value(LHS), m_Value(RHS))))
  541                          m_Value(LHS), m_Value(RHS))))
 1320   if (!match(SI.getValueOperand(), m_Load(m_BitCast(m_Value(LoadAddr)))))
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
   61   if (match(V, m_LShr(m_OneUse(m_Shl(m_Value(One), m_Value(A))), m_Value(B))) &&
   61   if (match(V, m_LShr(m_OneUse(m_Shl(m_Value(One), m_Value(A))), m_Value(B))) &&
   61   if (match(V, m_LShr(m_OneUse(m_Shl(m_Value(One), m_Value(A))), m_Value(B))) &&
  138   if (match(&I, m_c_Mul(m_OneUse(m_Select(m_Value(Cond), m_One(), m_AllOnes())),
  139                         m_Value(OtherOp))))
  144   if (match(&I, m_c_Mul(m_OneUse(m_Select(m_Value(Cond), m_AllOnes(), m_One())),
  145                         m_Value(OtherOp))))
  150   if (match(&I, m_c_FMul(m_OneUse(m_Select(m_Value(Cond), m_SpecificFP(1.0),
  152                          m_Value(OtherOp)))) {
  160   if (match(&I, m_c_FMul(m_OneUse(m_Select(m_Value(Cond), m_SpecificFP(-1.0),
  162                          m_Value(OtherOp)))) {
  199     if (match(&I, m_Mul(m_Shl(m_Value(NewOp), m_Constant(C2)),
  214     if (match(&I, m_Mul(m_Value(NewOp), m_Constant(C1)))) {
  244           if (match(Op0, m_Sub(m_Value(Y), m_Value(X))))
  244           if (match(Op0, m_Sub(m_Value(Y), m_Value(X))))
  246           else if (match(Op0, m_Add(m_Value(Y), m_ConstantInt(C1))))
  268     if (match(Op0, m_OneUse(m_Add(m_Value(X), m_Constant(C1))))) {
  280   if (match(Op0, m_Neg(m_Value(X))) && match(Op1, m_Constant(Op1C)))
  284   if (match(Op0, m_Neg(m_Value(X))) && match(Op1, m_Neg(m_Value(Y)))) {
  284   if (match(Op0, m_Neg(m_Value(X))) && match(Op1, m_Neg(m_Value(Y)))) {
  295   if (match(&I, m_c_Mul(m_OneUse(m_Neg(m_Value(X))), m_Value(Y))))
  295   if (match(&I, m_c_Mul(m_OneUse(m_Neg(m_Value(X))), m_Value(Y))))
  341     if (match(Op0, m_Shl(m_One(), m_Value(Y)))) {
  344     } else if (match(Op1, m_Shl(m_One(), m_Value(Y)))) {
  359   if (match(Op0, m_ZExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1))
  361   if (match(Op1, m_ZExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1))
  371   if (match(Op0, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1)
  373   if (match(Op1, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1)
  418   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
  418   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y))))
  423   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_Constant(C)))
  427   if (Op0 == Op1 && match(Op0, m_Intrinsic<Intrinsic::fabs>(m_Value(X))))
  439       if (match(Op0, m_OneUse(m_FDiv(m_Constant(C1), m_Value(X))))) {
  445       if (match(Op0, m_FDiv(m_Value(X), m_Constant(C1)))) {
  461       if (match(Op0, m_OneUse(m_FAdd(m_Value(X), m_Constant(C1))))) {
  467       if (match(Op0, m_OneUse(m_FSub(m_Constant(C1), m_Value(X))))) {
  476     if (match(&I, m_c_FMul(m_OneUse(m_FDiv(m_Value(X), m_Value(Y))),
  476     if (match(&I, m_c_FMul(m_OneUse(m_FDiv(m_Value(X), m_Value(Y))),
  477                            m_Value(Z)))) {
  487         match(Op0, m_OneUse(m_Intrinsic<Intrinsic::sqrt>(m_Value(X)))) &&
  488         match(Op1, m_OneUse(m_Intrinsic<Intrinsic::sqrt>(m_Value(Y))))) {
  500       if (match(Op0, m_FDiv(m_Value(X),
  501                             m_Intrinsic<Intrinsic::sqrt>(m_Value(Y))))) {
  506       if (match(Op0, m_FDiv(m_Intrinsic<Intrinsic::sqrt>(m_Value(Y)),
  507                             m_Value(X)))) {
  515     if (match(Op0, m_Intrinsic<Intrinsic::exp>(m_Value(X))) &&
  516         match(Op1, m_Intrinsic<Intrinsic::exp>(m_Value(Y))) &&
  525     if (match(Op0, m_Intrinsic<Intrinsic::exp2>(m_Value(X))) &&
  526         match(Op1, m_Intrinsic<Intrinsic::exp2>(m_Value(Y))) &&
  540     if (match(Op0, m_OneUse(m_c_FMul(m_Specific(Op1), m_Value(Y)))) &&
  545     if (match(Op1, m_OneUse(m_c_FMul(m_Specific(Op0), m_Value(Y)))) &&
  556             m_OneUse(m_FMul(m_Value(X), m_SpecificFP(0.5))))))) {
  561             m_OneUse(m_FMul(m_Value(X), m_SpecificFP(0.5))))))) {
  702     if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) ||
  703         (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) {
  710     if ((IsSigned && match(Op0, m_NSWMul(m_Value(X), m_APInt(C1)))) ||
  711         (!IsSigned && match(Op0, m_NUWMul(m_Value(X), m_APInt(C1))))) {
  733     if ((IsSigned && match(Op0, m_NSWShl(m_Value(X), m_APInt(C1))) &&
  735         (!IsSigned && match(Op0, m_NUWShl(m_Value(X), m_APInt(C1))))) {
  786   if (match(Op0, m_Sub(m_Value(X), m_Value(Z)))) // (X - Z) / Y; Y = Op1
  786   if (match(Op0, m_Sub(m_Value(X), m_Value(Z)))) // (X - Z) / Y; Y = Op1
  793   if (IsSigned && match(Op0, m_NSWShl(m_Specific(Op1), m_Value(Y))))
  795   if (!IsSigned && match(Op0, m_NUWShl(m_Specific(Op1), m_Value(Y))))
  799   if (match(Op1, m_c_Mul(m_Specific(Op0), m_Value(Y)))) {
  862   if (!match(Op1, m_ZExt(m_Value(ShiftLeft))))
  867   if (!match(ShiftLeft, m_Shl(m_Constant(CI), m_Value(N))))
  926   if (match(N, m_ZExt(m_Value(X))) && match(D, m_ZExt(m_Value(Y))) &&
  926   if (match(N, m_ZExt(m_Value(X))) && match(D, m_ZExt(m_Value(Y))) &&
  935   if ((match(N, m_OneUse(m_ZExt(m_Value(X)))) && match(D, m_Constant(C))) ||
  936       (match(D, m_OneUse(m_ZExt(m_Value(X)))) && match(N, m_Constant(C)))) {
  969   if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && match(Op1, m_APInt(C2))) {
  991   if (match(Op1, m_SExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)) {
 1005   if (match(Op0, m_NUWMul(m_Value(A), m_Value(B)))) {
 1005   if (match(Op0, m_NUWMul(m_Value(A), m_Value(B)))) {
 1006     if (match(Op1, m_NUWMul(m_Specific(A), m_Value(X))) ||
 1007         match(Op1, m_NUWMul(m_Value(X), m_Specific(A))))
 1009     if (match(Op1, m_NUWMul(m_Specific(B), m_Value(X))) ||
 1010         match(Op1, m_NUWMul(m_Value(X), m_Specific(B))))
 1065       (match(Op1, m_SExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)))
 1084     if (match(Op0, m_OneUse(m_SExt(m_Value(Op0Src)))) &&
 1101         match(Op0, m_NSWSub(m_Zero(), m_Value(X)))) {
 1111   if (match(&I, m_SDiv(m_OneUse(m_NSWSub(m_Zero(), m_Value(X))), m_Value(Y))))
 1111   if (match(&I, m_SDiv(m_OneUse(m_NSWSub(m_Zero(), m_Value(X))), m_Value(Y))))
 1148   if (match(I.getOperand(0), m_FNeg(m_Value(X))))
 1177   if (match(I.getOperand(1), m_FNeg(m_Value(X))))
 1185   if (match(I.getOperand(1), m_FMul(m_Value(X), m_Constant(C2)))) {
 1188   } else if (match(I.getOperand(1), m_FDiv(m_Value(X), m_Constant(C2)))) {
 1230     if (match(Op0, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) &&
 1230     if (match(Op0, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) &&
 1236     if (match(Op1, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) &&
 1236     if (match(Op1, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) &&
 1248     bool IsTan = match(Op0, m_Intrinsic<Intrinsic::sin>(m_Value(X))) &&
 1251         !IsTan && match(Op0, m_Intrinsic<Intrinsic::cos>(m_Value(X))) &&
 1271   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y)))) {
 1271   if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_FNeg(m_Value(Y)))) {
 1281       match(Op1, m_c_FMul(m_Specific(Op0), m_Value(Y)))) {
 1291              m_FDiv(m_Value(X), m_Intrinsic<Intrinsic::fabs>(m_Deferred(X)))) ||
 1292        match(&I, m_FDiv(m_Intrinsic<Intrinsic::fabs>(m_Value(X)),
 1386   if (match(Op1, m_SExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)) {
 1419   if (match(&I, m_SRem(m_OneUse(m_NSWSub(m_Zero(), m_Value(X))), m_Value(Y))))
 1419   if (match(&I, m_SRem(m_OneUse(m_NSWSub(m_Zero(), m_Value(X))), m_Value(Y))))
lib/Transforms/InstCombine/InstCombineSelect.cpp
   64   if (!match(Sel.getCondition(), m_Cmp(Pred, m_Value(X), m_Constant(C))))
   95   if (!BO->isCommutative() && !match(BO, m_BinOp(m_Value(Y), m_Specific(X))))
   97   if (!match(BO, m_c_BinOp(m_Value(Y), m_Specific(X))))
  338   if (match(TI, m_FNeg(m_Value(X))) && match(FI, m_FNeg(m_Value(Y))) &&
  338   if (match(TI, m_FNeg(m_Value(X))) && match(FI, m_FNeg(m_Value(Y))) &&
  511   if (!match(TVal, m_OneUse(m_And(m_Value(B), m_One()))))
  516   const bool HasShift = match(B, m_OneUse(m_LShr(m_Value(X), m_Value(Z))));
  516   const bool HasShift = match(B, m_OneUse(m_LShr(m_Value(X), m_Value(Z))));
  521   if (!match(Cmp->getOperand(0), m_c_And(m_Specific(X), m_Value(Y))))
  562   if (match(TrueVal, m_LShr(m_Value(X), m_Value(Y))) &&
  562   if (match(TrueVal, m_LShr(m_Value(X), m_Value(Y))) &&
  623     if (!match(CmpLHS, m_OneUse(m_Trunc(m_Value(V)))))
  739       match(TVal, m_Add(m_Value(X), m_APInt(C))) && X == Cmp0 &&
  768   if (match(Cmp0, m_Not(m_Value(X))) &&
  769       match(FVal, m_c_Add(m_Specific(X), m_Value(Y))) && Y == Cmp1) {
  785   if (match(Cmp0, m_c_Add(m_Specific(Cmp1), m_Value(Y))) &&
  859   if (match(Count, m_ZExt(m_Value(V))) ||
  860       match(Count, m_Trunc(m_Value(V))))
 1240   if (!match(Sel1, m_Select(m_Value(Cmp1), m_Value(ReplacementLow),
 1240   if (!match(Sel1, m_Select(m_Value(Cmp1), m_Value(ReplacementLow),
 1241                             m_Value(ReplacementHigh))) ||
 1322                        Pred, m_Value(X),
 1343   match(&Sel, m_Select(m_Value(), m_Value(SelVal0), m_Value(SelVal1)));
 1343   match(&Sel, m_Select(m_Value(), m_Value(SelVal0), m_Value(SelVal1)));
 1435         match(CmpLHS, m_And(m_Value(X), m_Power2(Y))) &&
 1615     if (match(V, m_Not(m_Value(NotV)))) {
 1869   if (!match(Cond, m_Cmp(Pred, m_Value(A), m_Value(B))))
 1869   if (!match(Cond, m_Cmp(Pred, m_Value(A), m_Value(B))))
 1878   if (!match(A, m_BitCast(m_Value(C))) || !match(B, m_BitCast(m_Value(D))))
 1878   if (!match(A, m_BitCast(m_Value(C))) || !match(B, m_BitCast(m_Value(D))))
 1883   if (!match(TVal, m_BitCast(m_Value(TSrc))) ||
 1884       !match(FVal, m_BitCast(m_Value(FSrc))))
 1987   if (IsUnsigned && match(X, m_NUWAdd(m_Value(A), m_APInt(C1))) &&
 1997   if (!IsUnsigned && match(X, m_NSWAdd(m_Value(A), m_APInt(C1))) &&
 2054   if(!match(AddSub, m_BinOp(m_SExt(m_Value(A)), m_SExt(m_Value(B)))))
 2054   if(!match(AddSub, m_BinOp(m_SExt(m_Value(A)), m_SExt(m_Value(B)))))
 2143   if (!match(Sel.getFalseValue(), m_OneUse(m_Or(m_Value(Or0), m_Value(Or1)))))
 2143   if (!match(Sel.getFalseValue(), m_OneUse(m_Or(m_Value(Or0), m_Value(Or1)))))
 2148   if (!match(Or0, m_OneUse(m_LogicalShift(m_Specific(TVal), m_Value(SA0)))) ||
 2149       !match(Or1, m_OneUse(m_LogicalShift(m_Specific(TVal), m_Value(SA1)))))
 2474         if (match(X, m_Not(m_Value(A))) && !X->hasNUsesOrMore(3) &&
 2514     if (match(&SI, m_OrdFMax(m_Value(X), m_Value(Y))))
 2514     if (match(&SI, m_OrdFMax(m_Value(X), m_Value(Y))))
 2518     if (match(&SI, m_OrdFMin(m_Value(X), m_Value(Y))))
 2518     if (match(&SI, m_OrdFMin(m_Value(X), m_Value(Y))))
 2626   if (match(CondVal, m_Not(m_Value(NotCond)))) {
lib/Transforms/InstCombine/InstCombineShifts.cpp
   38              m_Shift(m_Instruction(Sh0Op0), m_ZExtOrSelf(m_Value(ShAmt0)))))
   47         m_CombineOr(m_CombineAnd(m_Trunc(m_Instruction(Sh1)), m_Value(Trunc)),
   53   if (!match(Sh1, m_Shift(m_Value(X), m_ZExtOrSelf(m_Value(ShAmt1)))))
   53   if (!match(Sh1, m_Shift(m_Value(X), m_ZExtOrSelf(m_Value(ShAmt1)))))
  183   match(OuterShift, m_Shift(m_Value(Masked), m_Value(ShiftShAmt)));
  183   match(OuterShift, m_Shift(m_Value(Masked), m_Value(ShiftShAmt)));
  194   auto MaskA = m_Add(m_Shl(m_One(), m_Value(MaskShAmt)), m_AllOnes());
  196   auto MaskB = m_Xor(m_Shl(m_AllOnes(), m_Value(MaskShAmt)), m_AllOnes());
  198   auto MaskC = m_Shr(m_AllOnes(), m_Value(MaskShAmt));
  201       m_Shr(m_Shl(m_AllOnes(), m_Value(MaskShAmt)), m_Deferred(MaskShAmt));
  206   if (match(Masked, m_c_And(m_CombineOr(MaskA, MaskB), m_Value(X)))) {
  228   } else if (match(Masked, m_c_And(m_CombineOr(MaskC, MaskD), m_Value(X))) ||
  229              match(Masked, m_Shr(m_Shl(m_Value(X), m_Value(MaskShAmt)),
  229              match(Masked, m_Shr(m_Shl(m_Value(X), m_Value(MaskShAmt)),
  292   if (match(Op1, m_OneUse(m_SExt(m_Value(Y))))) {
  319   if (match(Op0, m_Constant()) && match(Op1, m_Add(m_Value(A), m_Constant(C))))
  329   if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Power2(B)))) {
  692             match(Op0BO->getOperand(1), m_Shr(m_Value(V1),
  712                   m_And(m_OneUse(m_Shr(m_Value(V1), m_Specific(Op1))),
  727             match(Op0BO->getOperand(0), m_Shr(m_Value(V1),
  746                   m_And(m_OneUse(m_Shr(m_Value(V1), m_Value(V2))),
  746                   m_And(m_OneUse(m_Shr(m_Value(V1), m_Value(V2))),
  805     if (match(Op0, m_Select(m_Value(Cond), m_OneUse(m_BinOp(TBO)),
  806                             m_Value(FalseVal)))) {
  824     if (match(Op0, m_Select(m_Value(Cond), m_Value(TrueVal),
  824     if (match(Op0, m_Select(m_Value(Cond), m_Value(TrueVal),
  872     if (match(Op0, m_OneUse(m_ZExt(m_Value(X))))) {
  880     if (match(Op0, m_Shr(m_Value(X), m_Specific(Op1)))) {
  888     if (match(Op0, m_Exact(m_Shr(m_Value(X), m_APInt(ShOp1))))) {
  908     if (match(Op0, m_Shl(m_Value(X), m_APInt(ShOp1)))) {
  933   if (match(Op0, m_OneUse(m_Shr(m_Value(X), m_Specific(Op1))))) {
  944     if (match(Op0, m_OneUse(m_Shl(m_Constant(C2), m_Value(X)))))
  948     if (match(Op0, m_Mul(m_Value(X), m_Constant(C2))))
  952     if (match(Op0, m_ZExt(m_Value(X))) && X->getType()->isIntOrIntVectorTy(1)) {
  960       match(Op1, m_Sub(m_SpecificInt(BitWidth - 1), m_Value(X))))
 1000     if (match(Op0, m_Shl(m_Value(X), m_APInt(ShOp1))) && ShOp1->ult(BitWidth)) {
 1035     if (match(Op0, m_OneUse(m_ZExt(m_Value(X)))) &&
 1044     if (match(Op0, m_SExt(m_Value(X))) &&
 1069     if (match(Op0, m_LShr(m_Value(X), m_APInt(ShOp1)))) {
 1087   if (match(Op0, m_OneUse(m_Shl(m_Value(X), m_Specific(Op1))))) {
 1118                                              m_ZExtOrSelf(m_Value(NBits))))),
 1131   if (!match(HighBitExtract, m_Shr(m_Value(X), m_Value(NumLowBitsToSkip))))
 1131   if (!match(HighBitExtract, m_Shr(m_Value(X), m_Value(NumLowBitsToSkip))))
 1187     if (match(Op0, m_Shl(m_ZExt(m_Value(X)), m_Specific(Op1))) &&
 1194     if (match(Op0, m_NSWShl(m_Value(X), m_APInt(ShOp1))) &&
 1213     if (match(Op0, m_AShr(m_Value(X), m_APInt(ShOp1))) &&
 1222     if (match(Op0, m_OneUse(m_SExt(m_Value(X)))) &&
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
   67   if (match(V, m_OneUse(m_BinOp(m_Value(V0), m_Value(V1)))))
   67   if (match(V, m_OneUse(m_BinOp(m_Value(V0), m_Value(V1)))))
   73   if (match(V, m_OneUse(m_Cmp(UnusedPred, m_Value(V0), m_Value(V1)))))
   73   if (match(V, m_OneUse(m_Cmp(UnusedPred, m_Value(V0), m_Value(V1)))))
  167   if (!match(Ext.getVectorOperand(), m_BitCast(m_Value(X))) ||
  188     if (!match(X, m_InsertElement(m_Value(), m_Value(Scalar),
  387   if (match(SrcVec, m_Cmp(Pred, m_Value(X), m_Value(Y))) &&
  387   if (match(SrcVec, m_Cmp(Pred, m_Value(X), m_Value(Y))) &&
  915   if (match(InsElt1->getOperand(0), m_Value(X)) &&
  916       match(InsElt1->getOperand(1), m_Value(Y)) && !isa<Constant>(Y) &&
 1038   if (match(VecOp, m_BitCast(m_Value(VecSrc))) &&
 1039       match(ScalarOp, m_BitCast(m_Value(ScalarSrc))) &&
 1054       match(ScalarOp, m_ExtractElement(m_Value(ExtVecOp),
 1533   if (!match(Op0, m_OneUse(m_InsertElement(m_Undef(), m_Value(X),
 1583   if (match(B0, m_BinOp(m_Value(X), m_Constant(C0))) &&
 1584       match(B1, m_BinOp(m_Value(Y), m_Constant(C1))))
 1586   else if (match(B0, m_BinOp(m_Constant(C0), m_Value(X))) &&
 1587            match(B1, m_BinOp(m_Constant(C1), m_Value(Y))))
 1695              m_OneUse(m_Select(m_Value(Cond), m_Value(X), m_Value(Y)))))
 1695              m_OneUse(m_Select(m_Value(Cond), m_Value(X), m_Value(Y)))))
 1695              m_OneUse(m_Select(m_Value(Cond), m_Value(X), m_Value(Y)))))
 1702   if (!match(Cond, m_OneUse(m_ShuffleVector(m_Value(NarrowCond), m_Undef(),
 1724   if (!match(Op0, m_ShuffleVector(m_Value(X), m_Value(Y), m_Constant(Mask))))
 1724   if (!match(Op0, m_ShuffleVector(m_Value(X), m_Value(Y), m_Constant(Mask))))
 1771     if (!match(V0, m_InsertElement(m_Value(), m_Value(Scalar),
lib/Transforms/InstCombine/InstructionCombining.cpp
  436           match(Op0, m_OneUse(m_BinOp(m_Value(A), m_Constant(C1)))) &&
  437           match(Op1, m_OneUse(m_BinOp(m_Value(B), m_Constant(C2))))) {
  767   if (match(LHS, m_Select(m_Value(A), m_Value(B), m_Value(C))) &&
  767   if (match(LHS, m_Select(m_Value(A), m_Value(B), m_Value(C))) &&
  767   if (match(LHS, m_Select(m_Value(A), m_Value(B), m_Value(C))) &&
  768       match(RHS, m_Select(m_Specific(A), m_Value(D), m_Value(E)))) {
  768       match(RHS, m_Select(m_Specific(A), m_Value(D), m_Value(E)))) {
  798   if (match(V, m_Neg(m_Value(NegV))))
 1416   if (match(LHS, m_ShuffleVector(m_Value(L0), m_Value(L1), m_Constant(Mask))) &&
 1416   if (match(LHS, m_ShuffleVector(m_Value(L0), m_Value(L1), m_Constant(Mask))) &&
 1417       match(RHS, m_ShuffleVector(m_Value(R0), m_Value(R1), m_Specific(Mask))) &&
 1417       match(RHS, m_ShuffleVector(m_Value(R0), m_Value(R1), m_Specific(Mask))) &&
 1451   if (match(LHS, m_ShuffleVector(m_Value(V1), m_Undef(), m_Constant(Mask))) &&
 1452       match(RHS, m_ShuffleVector(m_Value(V2), m_Undef(), m_Specific(Mask))) &&
 1462       match(LHS, m_ShuffleVector(m_Value(V1), m_Value(V2), m_Constant(Mask))) &&
 1462       match(LHS, m_ShuffleVector(m_Value(V1), m_Value(V2), m_Constant(Mask))) &&
 1490           m_OneUse(m_ShuffleVector(m_Value(V1), m_Undef(), m_Constant(Mask))),
 1575   bool IsSext = match(Op0, m_SExt(m_Value(X)));
 1576   if (!IsSext && !match(Op0, m_ZExt(m_Value(X))))
 1583   if (!(match(Op1, m_ZExtOrSExt(m_Value(Y))) && X->getType() == Y->getType() &&
 1926                        m_AShr(m_Value(V), m_ConstantInt(C)))) {
 1930                        m_SDiv(m_Value(V), m_ConstantInt(C)))) {
 1949         if (match(V, m_Sub(m_PtrToInt(m_Value(Y)),
 2560   if (match(&BI, m_Br(m_Not(m_Value(X)), m_BasicBlock(), m_BasicBlock())) &&
 2596   if (match(Cond, m_Add(m_Value(Op0), m_ConstantInt(AddRHS)))) {
lib/Transforms/Scalar/DivRemPairs.cpp
   52   if (!match(&I, m_Sub(m_Value(Dividend), m_Value(XroundedDownToMultipleOfY))))
   52   if (!match(&I, m_Sub(m_Value(Dividend), m_Value(XroundedDownToMultipleOfY))))
   60           m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)),
lib/Transforms/Scalar/EarlyCSE.cpp
  144   if (!match(V, m_Select(m_Value(Cond), m_Value(A), m_Value(B))))
  144   if (!match(V, m_Select(m_Value(Cond), m_Value(A), m_Value(B))))
  144   if (!match(V, m_Select(m_Value(Cond), m_Value(A), m_Value(B))))
  149   if (match(Cond, m_Not(m_Value(CondNot)))) {
  218     if (!match(Cond, m_Cmp(Pred, m_Value(X), m_Value(Y))))
  218     if (!match(Cond, m_Cmp(Pred, m_Value(X), m_Value(Y))))
  344       if (match(CondL, m_Cmp(PredL, m_Value(X), m_Value(Y))) &&
  344       if (match(CondL, m_Cmp(PredL, m_Value(X), m_Value(Y))) &&
lib/Transforms/Scalar/GVN.cpp
 1864     if ((isKnownTrue && match(LHS, m_And(m_Value(A), m_Value(B)))) ||
 1864     if ((isKnownTrue && match(LHS, m_And(m_Value(A), m_Value(B)))) ||
 1865         (isKnownFalse && match(LHS, m_Or(m_Value(A), m_Value(B))))) {
 1865         (isKnownFalse && match(LHS, m_Or(m_Value(A), m_Value(B))))) {
lib/Transforms/Scalar/GuardWidening.cpp
  543     if (match(Cond0, m_ICmp(Pred0, m_Value(LHS), m_ConstantInt(RHS0))) &&
  625     if (match(CheckCond, m_And(m_Value(AndLHS), m_Value(AndRHS))))
  625     if (match(CheckCond, m_And(m_Value(AndLHS), m_Value(AndRHS))))
  666     if (match(Check.getBase(), m_Add(m_Value(OpLHS), m_ConstantInt(OpRHS)))) {
  672                      m_Or(m_Value(OpLHS), m_ConstantInt(OpRHS)))) {
lib/Transforms/Scalar/IndVarSimplify.cpp
 1826   if (!match(NarrowDef, m_NSWAdd(m_Value(NarrowDefLHS),
 1836                                  m_Value(CmpRHS))))
 1858       if (match(&I, m_Intrinsic<Intrinsic::experimental_guard>(m_Value(C))))
lib/Transforms/Scalar/JumpThreading.cpp
  858             match(CmpLHS, m_Add(m_Value(AddLHS), m_ConstantInt(AddConst)))) {
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
 1916                                m_Value(CmpLoop.BCmpValue)),
 1919              m_Br(m_CombineAnd(m_Cmp(), m_Value(CmpLoop.LatchCmpValue)),
 1943                     m_CombineAnd(m_Load(m_Value(CmpOfLoads.LoadSrcA)),
 1944                                  m_Value(CmpOfLoads.LoadA)),
 1945                     m_CombineAnd(m_Load(m_Value(CmpOfLoads.LoadSrcB)),
 1946                                  m_Value(CmpOfLoads.LoadB)))) ||
lib/Transforms/Scalar/LoopPredication.cpp
  747     if (match(Condition, m_And(m_Value(LHS), m_Value(RHS)))) {
  747     if (match(Condition, m_And(m_Value(LHS), m_Value(RHS)))) {
lib/Transforms/Scalar/NaryReassociate.cpp
  500     return match(V, m_Add(m_Value(Op1), m_Value(Op2)));
  500     return match(V, m_Add(m_Value(Op1), m_Value(Op2)));
  502     return match(V, m_Mul(m_Value(Op1), m_Value(Op2)));
  502     return match(V, m_Mul(m_Value(Op1), m_Value(Op2)));
lib/Transforms/Scalar/NewGVN.cpp
 2474   if (match(TI, m_Br(m_Value(Cond), TrueSucc, FalseSucc))) {
lib/Transforms/Scalar/Reassociate.cpp
 1139     if (match(Ops[i].Op, m_Not(m_Value(X)))) {    // Cannot occur for ^.
 1485     if (!match(TheOp, m_Neg(m_Value(X))) && !match(TheOp, m_Not(m_Value(X))) &&
 1485     if (!match(TheOp, m_Neg(m_Value(X))) && !match(TheOp, m_Not(m_Value(X))) &&
 1486         !match(TheOp, m_FNeg(m_Value(X))))
 2057   if (match(I, m_FAdd(m_Value(X), m_OneUse(m_Instruction(Op)))))
 2060   if (match(I, m_FAdd(m_OneUse(m_Instruction(Op)), m_Value(X))))
 2063   if (match(I, m_FSub(m_Value(X), m_OneUse(m_Instruction(Op)))))
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
 1171   if (match(I, m_Add(m_SExt(m_Value(LHS)), m_SExt(m_Value(RHS)))) ||
 1171   if (match(I, m_Add(m_SExt(m_Value(LHS)), m_SExt(m_Value(RHS)))) ||
 1172       match(I, m_Sub(m_SExt(m_Value(LHS)), m_SExt(m_Value(RHS))))) {
 1172       match(I, m_Sub(m_SExt(m_Value(LHS)), m_SExt(m_Value(RHS))))) {
 1187   if (match(I, m_NSWAdd(m_Value(LHS), m_Value(RHS))) ||
 1187   if (match(I, m_NSWAdd(m_Value(LHS), m_Value(RHS))) ||
 1188       match(I, m_NSWSub(m_Value(LHS), m_Value(RHS)))) {
 1188       match(I, m_NSWSub(m_Value(LHS), m_Value(RHS)))) {
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  403   if (match(RHS, m_Mul(m_Value(S), m_ConstantInt(Idx)))) {
  406   } else if (match(RHS, m_Shl(m_Value(S), m_ConstantInt(Idx)))) {
  421   return (match(A, m_Add(m_Value(B), m_ConstantInt(C))) ||
  422           match(A, m_Add(m_ConstantInt(C), m_Value(B))));
  427   return (match(A, m_Or(m_Value(B), m_ConstantInt(C))) ||
  428           match(A, m_Or(m_ConstantInt(C), m_Value(B))));
  503   if (match(ArrayIdx, m_NSWMul(m_Value(LHS), m_ConstantInt(RHS)))) {
  507   } else if (match(ArrayIdx, m_NSWShl(m_Value(LHS), m_ConstantInt(RHS)))) {
  550     if (match(ArrayIdx, m_SExt(m_Value(TruncatedArrayIdx))) &&
  645     if (match(Bump, m_Neg(m_Value(NegBump)))) {
lib/Transforms/Scalar/StructurizeCFG.cpp
  410   if (match(Condition, m_Not(m_Value(NotCondition))))
lib/Transforms/Utils/LoopUnrollPeel.cpp
  189     if (!match(Condition, m_ICmp(Pred, m_Value(LeftVal), m_Value(RightVal))))
  189     if (!match(Condition, m_ICmp(Pred, m_Value(LeftVal), m_Value(RightVal))))
lib/Transforms/Utils/SimplifyCFG.cpp
  547                 m_And(m_Value(RHSVal), m_APInt(RHSC)))) {
  570                 m_Or(m_Value(RHSVal), m_APInt(RHSC)))) {
  601     if (match(I->getOperand(0), m_Add(m_Value(RHSVal), m_APInt(RHSC)))) {
lib/Transforms/Utils/SimplifyLibCalls.cpp
 1369     if (match(Call->getArgOperand(0), m_OneUse(m_FNeg(m_Value(X)))))
 1376     if (match(Call->getArgOperand(0), m_FNeg(m_Value(X))))
 1997     if (match(Op0, m_FMul(m_Value(OtherMul0), m_Value(OtherMul1)))) {
 1997     if (match(Op0, m_FMul(m_Value(OtherMul0), m_Value(OtherMul1)))) {
lib/Transforms/Vectorize/SLPVectorizer.cpp
 3313   if (!match(ZextLoad, m_ZExt(m_Load(m_Value(LoadPtr)))))
 6140     if (m_BinOp(m_Value(LHS), m_Value(RHS)).match(V)) {
 6140     if (m_BinOp(m_Value(LHS), m_Value(RHS)).match(V)) {
 6146       if (m_UMin(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6146       if (m_UMin(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6148       } else if (m_SMin(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6148       } else if (m_SMin(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6150       } else if (m_OrdFMin(m_Value(LHS), m_Value(RHS)).match(Select) ||
 6150       } else if (m_OrdFMin(m_Value(LHS), m_Value(RHS)).match(Select) ||
 6151                  m_UnordFMin(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6151                  m_UnordFMin(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6155       } else if (m_UMax(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6155       } else if (m_UMax(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6157       } else if (m_SMax(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6157       } else if (m_SMax(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6159       } else if (m_OrdFMax(m_Value(LHS), m_Value(RHS)).match(Select) ||
 6159       } else if (m_OrdFMax(m_Value(LHS), m_Value(RHS)).match(Select) ||
 6160                  m_UnordFMax(m_Value(LHS), m_Value(RHS)).match(Select)) {
 6160                  m_UnordFMax(m_Value(LHS), m_Value(RHS)).match(Select)) {
unittests/IR/PatternMatch.cpp
   61   EXPECT_TRUE(m_OneUse(m_Value(V)).match(One));
  557     EXPECT_TRUE(match(IRB.CreateAnd(X, X), m_And(m_Value(tX), m_Deferred(tX))));
  563         match(IRB.CreateAnd(X, Y), m_c_And(m_Value(tX), m_Deferred(tX))));
  569         Pattern, m_c_And(m_Value(tX), m_c_And(m_Deferred(tX), m_Value(tY)))));
  569         Pattern, m_c_And(m_Value(tX), m_c_And(m_Deferred(tX), m_Value(tY)))));
  587   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  587   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  593   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  593   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  599   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  599   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  603   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  603   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  614   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  614   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  616   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  616   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  622   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  622   EXPECT_FALSE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  624   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  624   EXPECT_TRUE(m_OrdFMin(m_Value(MatchL), m_Value(MatchR))
  637   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  637   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  643   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  643   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  649   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  649   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  653   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  653   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  665   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  665   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  667   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  667   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  673   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  673   EXPECT_FALSE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  675   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  675   EXPECT_TRUE(m_OrdFMax(m_Value(MatchL), m_Value(MatchR))
  688   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  688   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  694   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  694   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  700   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  700   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  704   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  704   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  715   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  715   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  717   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  717   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  723   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  723   EXPECT_FALSE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  725   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  725   EXPECT_TRUE(m_UnordFMin(m_Value(MatchL), m_Value(MatchR))
  738   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  738   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  744   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  744   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  750   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  750   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  754   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  754   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  765   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  765   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  767   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  767   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  773   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  773   EXPECT_FALSE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  775   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  775   EXPECT_TRUE(m_UnordFMax(m_Value(MatchL), m_Value(MatchR))
  787       m_NSWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWAdd(L, R)));
  787       m_NSWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWAdd(L, R)));
  792       m_NSWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWSub(L, R)));
  792       m_NSWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWSub(L, R)));
  797       m_NSWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWMul(L, R)));
  797       m_NSWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNSWMul(L, R)));
  801   EXPECT_TRUE(m_NSWShl(m_Value(MatchL), m_Value(MatchR)).match(
  801   EXPECT_TRUE(m_NSWShl(m_Value(MatchL), m_Value(MatchR)).match(
  807       m_NUWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWAdd(L, R)));
  807       m_NUWAdd(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWAdd(L, R)));
  812       m_NUWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWSub(L, R)));
  812       m_NUWSub(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWSub(L, R)));
  817       m_NUWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWMul(L, R)));
  817       m_NUWMul(m_Value(MatchL), m_Value(MatchR)).match(IRB.CreateNUWMul(L, R)));
  821   EXPECT_TRUE(m_NUWShl(m_Value(MatchL), m_Value(MatchR)).match(
  821   EXPECT_TRUE(m_NUWShl(m_Value(MatchL), m_Value(MatchR)).match(
  868   EXPECT_TRUE(m_Load(m_Value(MatchLoad)).match(LoadInst));
  873   EXPECT_FALSE(m_Load(m_Value(MatchLoad)).match(Alloca));
  875   EXPECT_TRUE(m_Store(m_Value(MatchStoreVal), m_Value(MatchStorePointer))
  875   EXPECT_TRUE(m_Store(m_Value(MatchStoreVal), m_Value(MatchStorePointer))
  880   EXPECT_FALSE(m_Store(m_Value(MatchStoreVal), m_Value(MatchStorePointer))
  880   EXPECT_FALSE(m_Store(m_Value(MatchStoreVal), m_Value(MatchStorePointer))
  955   EXPECT_TRUE(match(VI3, m_InsertElement(m_Value(A), m_Value(B), m_Value(C))));
  955   EXPECT_TRUE(match(VI3, m_InsertElement(m_Value(A), m_Value(B), m_Value(C))));
  955   EXPECT_TRUE(match(VI3, m_InsertElement(m_Value(A), m_Value(B), m_Value(C))));
  962   EXPECT_TRUE(match(EX1, m_ExtractElement(m_Value(A), m_Value(B))));
  962   EXPECT_TRUE(match(EX1, m_ExtractElement(m_Value(A), m_Value(B))));
  972   EXPECT_TRUE(match(SI2, m_ShuffleVector(m_Value(A), m_Value(B), m_Value(C))));
  972   EXPECT_TRUE(match(SI2, m_ShuffleVector(m_Value(A), m_Value(B), m_Value(C))));
  972   EXPECT_TRUE(match(SI2, m_ShuffleVector(m_Value(A), m_Value(B), m_Value(C))));
  994       SP2, m_ShuffleVector(m_InsertElement(m_Undef(), m_Value(A), m_Zero()),
 1067   EXPECT_TRUE(match(V, m_FNeg(m_Value(Match))));
 1071   EXPECT_TRUE(match(V1, m_FNeg(m_Value(Match))));
 1075   EXPECT_FALSE(match(V2, m_FNeg(m_Value(Match))));
 1077   EXPECT_TRUE(match(V2, m_FNeg(m_Value(Match))));
 1081   EXPECT_FALSE(match(V3, m_FNeg(m_Value(Match))));
 1133   EXPECT_TRUE(m_ICmp(MatchPred, m_Value(MatchL), m_Value(MatchR))
 1133   EXPECT_TRUE(m_ICmp(MatchPred, m_Value(MatchL), m_Value(MatchR))