|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
lib/Analysis/InstructionSimplify.cpp 102 if (!match(Cond, m_c_BinOp(m_c_ICmp(Pred1, m_Specific(TrueVal),
103 m_Specific(FalseVal)),
597 if (match(Op1, m_Sub(m_Value(Y), m_Specific(Op0))) ||
598 match(Op0, m_Sub(m_Value(Y), m_Specific(Op1))))
603 if (match(Op0, m_Not(m_Specific(Op1))) ||
604 match(Op1, m_Not(m_Specific(Op0))))
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)
1020 if (match(Op0, m_c_Mul(m_Value(X), m_Specific(Op1)))) {
1027 if ((IsSigned && match(X, m_SDiv(m_Value(), m_Specific(Op1)))) ||
1028 (!IsSigned && match(X, m_UDiv(m_Value(), m_Specific(Op1)))))
1033 if ((IsSigned && match(Op0, m_SRem(m_Value(), m_Specific(Op1)))) ||
1034 (!IsSigned && match(Op0, m_URem(m_Value(), m_Specific(Op1)))))
1076 match(Op0, m_SRem(m_Value(), m_Specific(Op1)))) ||
1078 match(Op0, m_URem(m_Value(), m_Specific(Op1)))))
1084 match(Op0, m_NSWShl(m_Specific(Op1), m_Value()))) ||
1086 match(Op0, m_NUWShl(m_Specific(Op1), m_Value())))))
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))))
1355 if (Q.IIQ.UseInstrInfo && match(Op0, m_NSWShl(m_Value(X), m_Specific(Op1))))
1389 m_c_ICmp(UnsignedPred, m_Specific(A), m_Specific(B))) &&
1389 m_c_ICmp(UnsignedPred, m_Specific(A), m_Specific(B))) &&
1422 m_c_ICmp(UnsignedPred, m_Specific(Y), m_Specific(A)))) {
1422 m_c_ICmp(UnsignedPred, m_Specific(Y), m_Specific(A)))) {
1437 if (match(UnsignedICmp, m_ICmp(UnsignedPred, m_Value(X), m_Specific(Y))) &&
1441 m_ICmp(UnsignedPred, m_Specific(Y), m_Value(X))) &&
1488 !match(Op1, m_ICmp(Pred1, m_Specific(A), m_Specific(B))))
1488 !match(Op1, m_ICmp(Pred1, m_Specific(A), m_Specific(B))))
1513 !match(Op1, m_ICmp(Pred1, m_Specific(A), m_Specific(B))))
1513 !match(Op1, m_ICmp(Pred1, m_Specific(A), m_Specific(B))))
1595 if (match(Y, m_c_And(m_Specific(X), m_Value())) ||
1596 match(Y, m_c_And(m_PtrToInt(m_Specific(X)), m_Value())))
1603 if (match(X, m_c_And(m_Specific(Y), m_Value())) ||
1604 match(X, m_c_And(m_PtrToInt(m_Specific(Y)), m_Value())))
1619 if (!match(Op1, m_ICmp(Pred1, m_Specific(V), m_Value())))
1692 if (!match(Op1, m_ICmp(Pred1, m_Specific(V), m_Value())))
1845 if (!match(Agg, m_CombineOr(m_Argument<0>(m_Specific(X)),
1846 m_Argument<1>(m_Specific(X)))))
1925 if (match(Op0, m_Not(m_Specific(Op1))) ||
1926 match(Op1, m_Not(m_Specific(Op0))))
1930 if (match(Op0, m_c_Or(m_Specific(Op1), m_Value())))
1934 if (match(Op1, m_c_Or(m_Specific(Op0), m_Value())))
1964 if (match(Op0, m_Neg(m_Specific(Op1))) ||
1965 match(Op1, m_Neg(m_Specific(Op0)))) {
1977 if (match(Op0, m_Add(m_Specific(Op1), m_AllOnes())) &&
1980 if (match(Op1, m_Add(m_Specific(Op0), m_AllOnes())) &&
2076 if (match(Op0, m_Not(m_Specific(Op1))) ||
2077 match(Op1, m_Not(m_Specific(Op0))))
2081 if (match(Op0, m_c_And(m_Specific(Op1), m_Value())))
2085 if (match(Op1, m_c_And(m_Specific(Op0), m_Value())))
2089 if (match(Op0, m_Not(m_c_And(m_Specific(Op1), m_Value()))))
2093 if (match(Op1, m_Not(m_c_And(m_Specific(Op1), m_Value()))))
2102 (match(Op0, m_c_And(m_Specific(A), m_Not(m_Specific(B)))) ||
2102 (match(Op0, m_c_And(m_Specific(A), m_Not(m_Specific(B)))) ||
2103 match(Op0, m_c_And(m_Not(m_Specific(A)), m_Specific(B)))))
2103 match(Op0, m_c_And(m_Not(m_Specific(A)), m_Specific(B)))))
2112 (match(Op1, m_c_And(m_Specific(A), m_Not(m_Specific(B)))) ||
2112 (match(Op1, m_c_And(m_Specific(A), m_Not(m_Specific(B)))) ||
2113 match(Op1, m_c_And(m_Not(m_Specific(A)), m_Specific(B)))))
2113 match(Op1, m_c_And(m_Not(m_Specific(A)), m_Specific(B)))))
2121 (match(Op1, m_c_Xor(m_Specific(A), m_Not(m_Specific(B)))) ||
2121 (match(Op1, m_c_Xor(m_Specific(A), m_Not(m_Specific(B)))) ||
2122 match(Op1, m_c_Xor(m_Not(m_Specific(A)), m_Specific(B)))))
2122 match(Op1, m_c_Xor(m_Not(m_Specific(A)), m_Specific(B)))))
2130 (match(Op0, m_c_Xor(m_Specific(A), m_Not(m_Specific(B)))) ||
2130 (match(Op0, m_c_Xor(m_Specific(A), m_Not(m_Specific(B)))) ||
2131 match(Op0, m_c_Xor(m_Not(m_Specific(A)), m_Specific(B)))))
2131 match(Op0, m_c_Xor(m_Not(m_Specific(A)), m_Specific(B)))))
2173 match(A, m_c_Add(m_Specific(B), m_Value(N)))) {
2180 match(B, m_c_Add(m_Specific(A), m_Value(N)))) {
2221 if (match(Op0, m_Not(m_Specific(Op1))) ||
2222 match(Op1, m_Not(m_Specific(Op0))))
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)))) {
2776 if (LBO && match(LBO, m_c_And(m_Value(), m_Specific(RHS)))) {
2783 if (RBO && match(RBO, m_c_And(m_Value(), m_Specific(LHS)))) {
2813 if (LBO && match(LBO, m_URem(m_Value(), m_Specific(RHS)))) {
2843 if (RBO && match(RBO, m_URem(m_Value(), m_Specific(LHS)))) {
2874 if (LBO && (match(LBO, m_LShr(m_Specific(RHS), m_Value())) ||
2875 match(LBO, m_UDiv(m_Specific(RHS), m_Value())))) {
2885 if (RBO && (match(RBO, m_LShr(m_Specific(LHS), m_Value())) ||
2886 match(RBO, m_UDiv(m_Specific(LHS), m_Value())))) {
3770 if (FalseVal == X && match(TrueVal, m_And(m_Specific(X), m_APInt(C))) &&
3776 if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) &&
3783 if (FalseVal == X && match(TrueVal, m_Or(m_Specific(X), m_APInt(C))) &&
3789 if (TrueVal == X && match(FalseVal, m_Or(m_Specific(X), m_APInt(C))) &&
3908 if (!match(Cond, m_FCmp(Pred, m_Specific(T), m_Specific(F))) &&
3908 if (!match(Cond, m_FCmp(Pred, m_Specific(T), m_Specific(F))) &&
3909 !match(Cond, m_FCmp(Pred, m_Specific(F), m_Specific(T))))
3909 !match(Cond, m_FCmp(Pred, m_Specific(F), m_Specific(T))))
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]))),
4076 m_Sub(m_Zero(), m_PtrToInt(m_Specific(StrippedBasePtr))))) {
4082 m_Xor(m_PtrToInt(m_Specific(StrippedBasePtr)), m_AllOnes()))) {
4168 if (match(Val, m_ExtractElement(m_Specific(Vec), m_Specific(Idx))))
4168 if (match(Val, m_ExtractElement(m_Specific(Vec), m_Specific(Idx))))
4526 if (match(Op0, m_FSub(m_AnyZeroFP(), m_Specific(Op1))) ||
4527 match(Op1, m_FSub(m_AnyZeroFP(), m_Specific(Op0))))
4530 if (match(Op0, m_FNeg(m_Specific(Op1))) ||
4531 match(Op1, m_FNeg(m_Specific(Op0))))
4539 (match(Op0, m_FSub(m_Value(X), m_Specific(Op1))) ||
4540 match(Op1, m_FSub(m_Value(X), m_Specific(Op0)))))
4586 (match(Op1, m_FSub(m_Specific(Op0), m_Value(X))) ||
4587 match(Op0, m_c_FAdd(m_Specific(Op1), m_Value(X)))))
4683 if (FMF.allowReassoc() && match(Op0, m_c_FMul(m_Value(X), m_Specific(Op1))))
4689 if (match(Op0, m_FNegNSZ(m_Specific(Op1))) ||
4690 match(Op1, m_FNegNSZ(m_Specific(Op0))))
lib/Analysis/LazyValueInfo.cpp 970 if (match(SI->getFalseValue(), m_Add(m_Specific(A),
978 if (match(SI->getTrueValue(), m_Add(m_Specific(A),
1219 if (LHS != Val && !match(LHS, m_Add(m_Specific(Val), m_ConstantInt()))) {
1226 match(LHS, m_Add(m_Specific(Val), m_ConstantInt(Offset)));
lib/Analysis/ValueTracking.cpp 200 match(RHS, m_c_And(m_Specific(M), m_Value())))
203 match(LHS, m_c_And(m_Specific(M), m_Value())))
613 if (match(Arg, m_Not(m_Specific(V))) &&
629 auto m_V = m_CombineOr(m_Specific(V), m_PtrToInt(m_Specific(V)));
629 auto m_V = m_CombineOr(m_Specific(V), m_PtrToInt(m_Specific(V)));
1104 if (match(RHS, m_Neg(m_Specific(LHS))) &&
1786 if (match(X, m_Neg(m_Specific(Y))) || match(Y, m_Neg(m_Specific(X))))
1786 if (match(X, m_Neg(m_Specific(Y))) || match(Y, m_Neg(m_Specific(X))))
1797 if (match(X, m_And(m_Specific(Y), m_Value())) ||
1798 match(X, m_And(m_Value(), m_Specific(Y))))
1801 if (match(Y, m_And(m_Specific(X), m_Value())) ||
1802 match(Y, m_And(m_Value(), m_Specific(X))))
1930 m_c_ICmp(Pred, m_Specific(V), m_Zero())) ||
2228 (match(Induction, m_NSWAdd(m_Specific(PN), m_ConstantInt(X))) ||
2229 match(Induction, m_NUWAdd(m_Specific(PN), m_ConstantInt(X)))) &&
4513 m_CombineOr(m_OrdFMin(m_Specific(CmpLHS), m_APFloat(FC2)),
4514 m_UnordFMin(m_Specific(CmpLHS), m_APFloat(FC2)))) &&
4523 m_CombineOr(m_OrdFMax(m_Specific(CmpLHS), m_APFloat(FC2)),
4524 m_UnordFMax(m_Specific(CmpLHS), m_APFloat(FC2)))) &&
4549 if (match(FalseVal, m_SMin(m_Specific(CmpLHS), m_APInt(C2))) &&
4554 if (match(FalseVal, m_SMax(m_Specific(CmpLHS), m_APInt(C2))) &&
4559 if (match(FalseVal, m_UMin(m_Specific(CmpLHS), m_APInt(C2))) &&
4564 if (match(FalseVal, m_UMax(m_Specific(CmpLHS), m_APInt(C2))) &&
4637 if ((CmpLHS == A && CmpRHS == C) || (match(C, m_Not(m_Specific(CmpLHS))) &&
4638 match(A, m_Not(m_Specific(CmpRHS)))))
4644 if ((CmpLHS == A && CmpRHS == D) || (match(D, m_Not(m_Specific(CmpLHS))) &&
4645 match(A, m_Not(m_Specific(CmpRHS)))))
4651 if ((CmpLHS == B && CmpRHS == C) || (match(C, m_Not(m_Specific(CmpLHS))) &&
4652 match(B, m_Not(m_Specific(CmpRHS)))))
4658 if ((CmpLHS == B && CmpRHS == D) || (match(D, m_Not(m_Specific(CmpLHS))) &&
4659 match(B, m_Not(m_Specific(CmpRHS)))))
4691 match(FalseVal, m_NSWSub(m_Specific(CmpLHS), m_Specific(CmpRHS))))
4691 match(FalseVal, m_NSWSub(m_Specific(CmpLHS), m_Specific(CmpRHS))))
4698 match(TrueVal, m_NSWSub(m_Specific(CmpLHS), m_Specific(CmpRHS))))
4698 match(TrueVal, m_NSWSub(m_Specific(CmpLHS), m_Specific(CmpRHS))))
4727 if (match(TrueVal, m_Not(m_Specific(CmpLHS))) &&
4733 if (match(FalseVal, m_Not(m_Specific(CmpLHS))) &&
4744 if ((!NeedNSW && match(X, m_Sub(m_ZeroInt(), m_Specific(Y)))) ||
4745 (NeedNSW && match(X, m_NSWSub(m_ZeroInt(), m_Specific(Y)))))
4749 if ((!NeedNSW && match(Y, m_Sub(m_ZeroInt(), m_Specific(X)))) ||
4750 (NeedNSW && match(Y, m_NSWSub(m_ZeroInt(), m_Specific(X)))))
4756 match(Y, m_Sub(m_Specific(B), m_Specific(A))))) ||
4756 match(Y, m_Sub(m_Specific(B), m_Specific(A))))) ||
4758 match(Y, m_NSWSub(m_Specific(B), m_Specific(A)))));
4758 match(Y, m_NSWSub(m_Specific(B), m_Specific(A)))));
4885 m_CombineOr(m_Specific(CmpLHS), m_SExt(m_Specific(CmpLHS)));
4885 m_CombineOr(m_Specific(CmpLHS), m_SExt(m_Specific(CmpLHS)));
4893 if (match(CmpLHS, m_Neg(m_Specific(FalseVal))))
4915 if (match(CmpLHS, m_Neg(m_Specific(TrueVal))))
5149 if (match(RHS, m_NSWAdd(m_Specific(LHS), m_APInt(C))))
5158 if (match(RHS, m_NUWAdd(m_Specific(LHS), m_APInt(C))))
5166 match(B, m_NUWAdd(m_Specific(X), m_APInt(CB))))
5171 match(B, m_Or(m_Specific(X), m_APInt(CB)))) {
5648 if (match(RHS, m_Neg(m_Specific(LHS))) &&
lib/CodeGen/CodeGenPrepare.cpp 1248 if (match(U, m_Add(m_Specific(A), m_Specific(B)))) {
1248 if (match(U, m_Add(m_Specific(A), m_Specific(B)))) {
1317 if (match(U, m_Sub(m_Specific(A), m_Specific(B)))) {
1317 if (match(U, m_Sub(m_Specific(A), m_Specific(B)))) {
1324 if (match(U, m_Add(m_Specific(A), m_APInt(AddC))) &&
lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp 191 auto SubExpr = m_Sub(m_Specific(GridSize),
192 m_Mul(GroupIDIntrin, m_Specific(ZextGroupSize)));
196 m_Select(m_ICmp(Pred, SubExpr, m_Specific(ZextGroupSize)),
198 m_Specific(ZextGroupSize))) &&
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp 693 if (match(A, m_Shl(m_One(), m_Specific(CIV)))) {
696 } else if (match(B, m_Shl(m_One(), m_Specific(CIV)))) {
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)))))
830 if (!match(FalseV, m_Xor(m_Specific(TrueV), m_Value(Q))) &&
831 !match(FalseV, m_Xor(m_Value(Q), m_Specific(TrueV))))
841 if (!match(TrueV, m_Xor(m_Specific(FalseV), m_Value(Q))) &&
842 !match(TrueV, m_Xor(m_Value(Q), m_Specific(FalseV))))
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp 126 if (!match(TermI, m_Br(m_ICmp(Pred, m_Specific(RotAmt), m_ZeroInt()),
303 match(SubOp1, m_And(m_LShr(m_Specific(Root), m_SpecificInt(1)),
lib/Transforms/InstCombine/InstCombineAddSub.cpp 1164 if (!match(Select, m_Select(m_ICmp(Pred, m_Specific(X), m_APInt(Thr)),
1183 m_ZExtOrSelf(m_Specific(NBits)))))
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))))
1447 match(Op1, m_OneUse(m_c_FMul(m_Value(Y), m_Specific(Z))))) ||
1449 match(Op1, m_OneUse(m_c_FMul(m_Value(Y), m_Specific(Z))))))
1452 match(Op1, m_OneUse(m_FDiv(m_Value(Y), m_Specific(Z)))))
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))))
1846 match(Op0, m_c_Or(m_Specific(A), m_Specific(B))))
1846 match(Op0, m_c_Or(m_Specific(A), m_Specific(B))))
1854 match(Op1, m_c_Or(m_Specific(A), m_Specific(B))) &&
1854 match(Op1, m_c_Or(m_Specific(A), m_Specific(B))) &&
1863 match(Op0, m_c_Or(m_Specific(A), m_Specific(B))))
1863 match(Op0, m_c_Or(m_Specific(A), m_Specific(B))))
1871 match(Op1, m_c_Or(m_Specific(A), m_Specific(B))) &&
1871 match(Op1, m_c_Or(m_Specific(A), m_Specific(B))) &&
1879 if (match(Op0, m_OneUse(m_c_Or(m_Value(Y), m_Specific(Op1)))))
1894 if (match(Op1, m_c_And(m_Value(Y), m_Specific(Op0))))
1997 match(Op0, m_OneUse(m_c_Xor(m_Specific(A), m_Specific(Op1))))) {
1997 match(Op0, m_OneUse(m_c_Xor(m_Specific(A), m_Specific(Op1))))) {
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))))
2182 if (match(Op0, m_FMul(m_Specific(Op1), m_Constant(C)))) {
2187 if (match(Op1, m_FMul(m_Specific(Op0), m_Constant(C)))) {
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp 994 } else if (match(X0, m_Trunc(m_Specific(X1)))) {
1035 match(Cmp1, m_ICmp(Pred1, m_Intrinsic<Intrinsic::ctpop>(m_Specific(X)),
1043 match(Cmp1, m_ICmp(Pred1, m_Intrinsic<Intrinsic::ctpop>(m_Specific(X)),
1072 m_c_ICmp(UnsignedPred, m_Specific(ZeroCmpOp), m_Value(A))) &&
1073 match(ZeroCmpOp, m_c_Add(m_Specific(A), m_Value(B))) &&
1111 m_c_ICmp(UnsignedPred, m_Specific(Base), m_Specific(Offset))) ||
1111 m_c_ICmp(UnsignedPred, m_Specific(Base), m_Specific(Offset))) ||
1227 match(LHS0, m_And(m_Specific(V), m_ConstantInt(AndC)))) {
1231 match(RHS0, m_And(m_Specific(V), m_ConstantInt(AndC)))) {
1639 match(Op1, m_Not(m_c_Or(m_Specific(A), m_Specific(B)))))
1639 match(Op1, m_Not(m_c_Or(m_Specific(A), m_Specific(B)))))
1647 match(Op1, m_c_And(m_Not(m_Specific(A)), m_Specific(B))))
1647 match(Op1, m_c_And(m_Not(m_Specific(A)), m_Specific(B))))
1689 if (!match(Op0, m_OneUse(m_Add(m_Specific(Op1), m_Constant(C)))) &&
1690 !match(Op0, m_OneUse(m_Mul(m_Specific(Op1), m_Constant(C)))) &&
1691 !match(Op0, m_OneUse(m_LShr(m_Specific(Op1), m_Constant(C)))) &&
1692 !match(Op0, m_OneUse(m_Shl(m_Specific(Op1), m_Constant(C)))) &&
1693 !match(Op0, m_OneUse(m_Sub(m_Constant(C), m_Specific(Op1)))))
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)))))
1887 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
1887 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
1893 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A))))
1893 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A))))
1902 match(Op0, m_c_Or(m_Specific(A), m_Specific(B))))
1902 match(Op0, m_c_Or(m_Specific(A), m_Specific(B))))
1910 match(Op1, m_c_Or(m_Specific(A), m_Specific(B))))
1910 match(Op1, m_c_Or(m_Specific(A), m_Specific(B))))
2044 !match(Or1, m_OneUse(m_LogicalShift(m_Specific(ShVal), m_Value(ShAmt1)))))
2060 match(R, m_And(m_Neg(m_Specific(X)), m_SpecificInt(Mask))))
2066 match(R, m_And(m_Neg(m_ZExt(m_And(m_Specific(X), m_SpecificInt(Mask)))),
2121 if (match(A, m_Not(m_Specific(B)))) {
2142 if (match(NotB, m_SExt(m_Specific(Cond))))
2155 match(B, (m_Xor(m_SExt(m_Specific(Cond)), m_Constant(BConst)))) &&
2339 if (match(LHS0, m_Add(m_Specific(RHS0), m_ConstantInt(AddC))))
2527 match(B, m_Or(m_Specific(V1), m_ConstantInt(C4))) &&
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))))
2580 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
2580 if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
2585 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A))))
2585 if (match(Op1, m_Xor(m_Specific(B), m_Specific(A))))
2589 if (match(Op0, m_And(m_Or(m_Specific(Op1), m_Value(C)), m_Value(A))))
2609 if (match(Op0, m_And(m_Specific(A), m_Specific(B))) ||
2609 if (match(Op0, m_And(m_Specific(A), m_Specific(B))) ||
2610 match(Op0, m_And(m_Specific(B), m_Specific(A))))
2610 match(Op0, m_And(m_Specific(B), m_Specific(A))))
2613 if (Op1->hasOneUse() && match(A, m_Not(m_Specific(Op0)))) {
2617 if (Op1->hasOneUse() && match(B, m_Not(m_Specific(Op0)))) {
2789 match(Op1, m_Not(m_c_And(m_Specific(A), m_Specific(B))))) ||
2789 match(Op1, m_Not(m_c_And(m_Specific(A), m_Specific(B))))) ||
2791 match(Op1, m_Not(m_c_Or(m_Specific(A), m_Specific(B))))))
2791 match(Op1, m_Not(m_c_Or(m_Specific(A), m_Specific(B))))))
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)))))
3194 match(Op1, m_c_Xor(m_Specific(A), m_Specific(B))))
3194 match(Op1, m_c_Xor(m_Specific(A), m_Specific(B))))
3198 match(Op1, m_c_And(m_Specific(A), m_Specific(B))))
3198 match(Op1, m_c_And(m_Specific(A), m_Specific(B))))
3204 match(Op1, m_Not(m_Specific(A))))
3227 match(Op0, m_OneUse(m_c_Add(m_Specific(A), m_Specific(Op1))))) {
3227 match(Op0, m_OneUse(m_c_Add(m_Specific(A), m_Specific(Op1))))) {
lib/Transforms/InstCombine/InstCombineCalls.cpp 2264 match(Src1, m_FAbs(m_Specific(X)))) {
3853 m_Value(), m_Specific(II->getArgOperand(1)))))
3927 if (match(Next, m_Intrinsic<Intrinsic::assume>(m_Specific(IIOperand))))
lib/Transforms/InstCombine/InstCombineCasts.cpp 515 !match(Or1, m_OneUse(m_LogicalShift(m_Specific(ShVal), m_Value(ShAmt1)))))
528 if (match(R, m_OneUse(m_Sub(m_SpecificInt(Width), m_Specific(L)))))
536 match(R, m_And(m_Neg(m_Specific(X)), m_SpecificInt(Mask))))
541 match(R, m_ZExt(m_And(m_Neg(m_Specific(X)), m_SpecificInt(Mask)))))
1214 match(And, m_OneUse(m_And(m_Trunc(m_Value(X)), m_Specific(C)))) &&
lib/Transforms/InstCombine/InstCombineCompares.cpp 1487 if (match(DomCond, m_ICmp(DomPred, m_Specific(X), m_APInt(DomC))) &&
1793 match(LShr, m_LShr(m_Specific(A), m_Value(B)))) {
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)))) &&
4010 auto LSubOne = m_Add(m_Specific(Op1), m_AllOnes());
4041 if (match(X, m_c_SMin(m_Specific(Op0), m_Value())) ||
4042 match(X, m_c_SMax(m_Specific(Op0), m_Value())) ||
4043 match(X, m_c_UMin(m_Specific(Op0), m_Value())) ||
4044 match(X, m_c_UMax(m_Specific(Op0), m_Value()))) {
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)))) {
4210 match(Op1, m_OneUse(m_LShr(m_Value(B), m_Specific(Cst1))))) ||
4212 match(Op1, m_OneUse(m_AShr(m_Value(B), m_Specific(Cst1)))))) {
4226 match(Op1, m_OneUse(m_Shl(m_Value(B), m_Specific(Cst1))))) {
4281 if (match(Op0, m_OneUse(m_c_And(m_Neg(m_Specific(Op1)), m_Specific(Op1)))))
4281 if (match(Op0, m_OneUse(m_c_And(m_Neg(m_Specific(Op1)), m_Specific(Op1)))))
4284 m_OneUse(m_c_And(m_Neg(m_Specific(Op0)), m_Specific(Op0)))))
4284 m_OneUse(m_c_And(m_Neg(m_Specific(Op0)), m_Specific(Op0)))))
4804 if (match(U, m_Sub(m_Specific(Op1), m_Specific(Op0))))
4804 if (match(U, m_Sub(m_Specific(Op1), m_Specific(Op0))))
4806 else if (match(U, m_Sub(m_Specific(Op0), m_Specific(Op1))))
4806 else if (match(U, m_Sub(m_Specific(Op0), m_Specific(Op1))))
5365 match(RHS, m_ShuffleVector(m_Value(V2), m_Undef(), m_Specific(M))) &&
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp 543 return (match(L1, m_Load(m_Specific(LHS))) &&
544 match(L2, m_Load(m_Specific(RHS)))) ||
545 (match(L1, m_Load(m_Specific(RHS))) &&
546 match(L2, m_Load(m_Specific(LHS))));
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 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)))) &&
787 if ((IsSigned && match(Z, m_SRem(m_Specific(X), m_Specific(Op1)))) ||
787 if ((IsSigned && match(Z, m_SRem(m_Specific(X), m_Specific(Op1)))) ||
788 (!IsSigned && match(Z, m_URem(m_Specific(X), m_Specific(Op1)))))
788 (!IsSigned && match(Z, m_URem(m_Specific(X), m_Specific(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)))) {
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))))
1249 match(Op1, m_Intrinsic<Intrinsic::cos>(m_Specific(X)));
1252 match(Op1, m_Intrinsic<Intrinsic::sin>(m_Specific(X)));
1281 match(Op1, m_c_FMul(m_Specific(Op0), m_Value(Y)))) {
lib/Transforms/InstCombine/InstCombineSelect.cpp 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))))
521 if (!match(Cmp->getOperand(0), m_c_And(m_Specific(X), m_Value(Y))))
563 match(FalseVal, m_AShr(m_Specific(X), m_Specific(Y))) &&
563 match(FalseVal, m_AShr(m_Specific(X), m_Specific(Y))) &&
564 match(CmpLHS, m_Specific(X))) {
634 bool OrOnFalseVal = match(FalseVal, m_Or(m_Specific(TrueVal), m_Power2(C2)));
636 OrOnTrueVal = match(TrueVal, m_Or(m_Specific(FalseVal), m_Power2(C2)));
709 if (match(TrueVal, m_Sub(m_Specific(B), m_Specific(A))))
709 if (match(TrueVal, m_Sub(m_Specific(B), m_Specific(A))))
711 else if (!match(TrueVal, m_Sub(m_Specific(A), m_Specific(B))))
711 else if (!match(TrueVal, m_Sub(m_Specific(A), m_Specific(B))))
769 match(FVal, m_c_Add(m_Specific(X), m_Value(Y))) && Y == Cmp1) {
777 if (match(FVal, m_c_Add(m_Not(m_Specific(X)), m_Specific(Y)))) {
777 if (match(FVal, m_c_Add(m_Not(m_Specific(X)), m_Specific(Y)))) {
785 if (match(Cmp0, m_c_Add(m_Specific(Cmp1), m_Value(Y))) &&
786 match(FVal, m_c_Add(m_Specific(Cmp1), m_Specific(Y)))) {
786 match(FVal, m_c_Add(m_Specific(Cmp1), m_Specific(Y)))) {
822 if (!match(II->getOperand(0), m_c_And(m_Specific(X), m_Neg(m_Specific(X)))))
822 if (!match(II->getOperand(0), m_c_And(m_Specific(X), m_Neg(m_Specific(X)))))
865 if (!match(Count, m_Intrinsic<Intrinsic::cttz>(m_Specific(CmpLHS))) &&
866 !match(Count, m_Intrinsic<Intrinsic::ctlz>(m_Specific(CmpLHS))))
937 if (match(TrueVal, m_SExt(m_Specific(CmpLHS))) && SextRHS == FalseVal) {
940 } else if (match(FalseVal, m_SExt(m_Specific(CmpLHS))) &&
950 if (match(TrueVal, m_ZExt(m_Specific(CmpLHS))) && ZextRHS == FalseVal) {
953 } else if (match(FalseVal, m_ZExt(m_Specific(CmpLHS))) &&
1050 bool CmpUsesNegatedOp = match(Cmp.getOperand(0), m_Neg(m_Specific(TVal))) ||
1051 match(Cmp.getOperand(0), m_Neg(m_Specific(FVal)));
1056 bool RHSCanonicalized = match(RHS, m_Neg(m_Specific(LHS)));
1232 m_Add(m_Specific(X),
1243 m_ICmp(Pred1, m_Specific(X),
1454 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C)
1458 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C)
1462 match(TrueVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C)
1466 match(FalseVal, m_Xor(m_Specific(X), m_APInt(C))) && *Y == *C)
1589 ((SPF1 == SPF_UMIN && match(C, m_c_UMax(m_Specific(A), m_Specific(B)))) ||
1589 ((SPF1 == SPF_UMIN && match(C, m_c_UMax(m_Specific(A), m_Specific(B)))) ||
1590 (SPF1 == SPF_SMIN && match(C, m_c_SMax(m_Specific(A), m_Specific(B)))) ||
1590 (SPF1 == SPF_SMIN && match(C, m_c_SMax(m_Specific(A), m_Specific(B)))) ||
1591 (SPF1 == SPF_UMAX && match(C, m_c_UMin(m_Specific(A), m_Specific(B)))) ||
1591 (SPF1 == SPF_UMAX && match(C, m_c_UMin(m_Specific(A), m_Specific(B)))) ||
1592 (SPF1 == SPF_SMAX && match(C, m_c_SMin(m_Specific(A), m_Specific(B))))))
1592 (SPF1 == SPF_SMAX && match(C, m_c_SMin(m_Specific(A), m_Specific(B))))))
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)))))
2167 if (match(SA1, m_OneUse(m_Sub(m_SpecificInt(Width), m_Specific(SA0)))))
2169 else if (match(SA0, m_OneUse(m_Sub(m_SpecificInt(Width), m_Specific(SA1)))))
2177 if (!match(Cond, m_OneUse(m_ICmp(Pred, m_Specific(ShAmt), m_ZeroInt()))) ||
2269 if (match(TrueVal, m_Not(m_Specific(CondVal))))
2271 if (match(FalseVal, m_Not(m_Specific(CondVal))))
2353 if (match(CondVal, m_FCmp(Pred, m_Specific(FalseVal), m_AnyZeroFP())) &&
2354 match(TrueVal, m_FSub(m_PosZeroFP(), m_Specific(FalseVal))) &&
2361 if (match(CondVal, m_FCmp(Pred, m_Specific(TrueVal), m_AnyZeroFP())) &&
2362 match(FalseVal, m_FSub(m_PosZeroFP(), m_Specific(TrueVal))) &&
2372 if (match(CondVal, m_FCmp(Pred, m_Specific(FalseVal), m_AnyZeroFP())) &&
2373 match(TrueVal, m_FNeg(m_Specific(FalseVal))) &&
2384 if (match(CondVal, m_FCmp(Pred, m_Specific(TrueVal), m_AnyZeroFP())) &&
2385 match(FalseVal, m_FNeg(m_Specific(TrueVal))) &&
lib/Transforms/InstCombine/InstCombineShifts.cpp 693 m_Specific(Op1)))) {
712 m_And(m_OneUse(m_Shr(m_Value(V1), m_Specific(Op1))),
728 m_Specific(Op1)))) {
880 if (match(Op0, m_Shr(m_Value(X), m_Specific(Op1)))) {
933 if (match(Op0, m_OneUse(m_Shr(m_Value(X), m_Specific(Op1))))) {
1087 if (match(Op0, m_OneUse(m_Shl(m_Value(X), m_Specific(Op1))))) {
1138 m_Sub(m_Constant(C0), m_ZExtOrSelf(m_Specific(NBits))))) ||
1187 if (match(Op0, m_Shl(m_ZExt(m_Value(X)), m_Specific(Op1))) &&
lib/Transforms/InstCombine/InstCombineVectorOps.cpp 830 if (!match(Op0, m_InsertElement(m_Undef(), m_Specific(X), m_ZeroInt())))
866 if (!match(Scalar, m_ExtractElement(m_Specific(X), m_SpecificInt(IdxC))))
1477 if (match(Op0, m_BinOp(m_Specific(Op1), m_Constant(C))))
1479 else if (match(Op1, m_BinOp(m_Specific(Op0), m_Constant(C))))
lib/Transforms/InstCombine/InstructionCombining.cpp 768 match(RHS, m_Select(m_Specific(A), m_Value(D), m_Value(E)))) {
1417 match(RHS, m_ShuffleVector(m_Value(R0), m_Value(R1), m_Specific(Mask))) &&
1452 match(RHS, m_ShuffleVector(m_Value(V2), m_Undef(), m_Specific(Mask))) &&
1463 match(RHS, m_ShuffleVector(m_Specific(V2), m_Specific(V1),
1463 match(RHS, m_ShuffleVector(m_Specific(V2), m_Specific(V1),
1464 m_Specific(Mask)))) {
1950 m_PtrToInt(m_Specific(GEP.getOperand(0))))))
2483 m_CombineOr(m_Specific(Op),
2484 m_Specific(Op->stripPointerCasts())),
lib/Transforms/Scalar/DivRemPairs.cpp 60 m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)),
lib/Transforms/Scalar/EarlyCSE.cpp 345 match(CondR, m_Cmp(PredR, m_Specific(X), m_Specific(Y))) &&
345 match(CondR, m_Cmp(PredR, m_Specific(X), m_Specific(Y))) &&
lib/Transforms/Scalar/GuardWidening.cpp 544 match(Cond1, m_ICmp(Pred1, m_Specific(LHS), m_ConstantInt(RHS1)))) {
lib/Transforms/Scalar/IndVarSimplify.cpp 1835 if (!match(Condition, m_ICmp(Pred, m_Specific(NarrowDefLHS),
lib/Transforms/Scalar/StructurizeCFG.cpp 418 if (I->getParent() == Parent && match(I, m_Not(m_Specific(Condition))))
lib/Transforms/Utils/SimplifyIndVar.cpp 774 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) ||
776 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) {
lib/Transforms/Vectorize/SLPVectorizer.cpp 6185 if (match(Cond, m_Cmp(Pred, m_Specific(LHS), m_Instruction(L2)))) {
6189 } else if (match(Cond, m_Cmp(Pred, m_Instruction(L1), m_Specific(RHS)))) {
unittests/IR/PatternMatch.cpp 871 EXPECT_TRUE(m_Load(m_Specific(Alloca)).match(LoadInst));
883 EXPECT_TRUE(m_Store(m_SpecificInt(42), m_Specific(Alloca))
885 EXPECT_FALSE(m_Store(m_SpecificInt(42), m_Specific(FourtyTwo))
887 EXPECT_FALSE(m_Store(m_SpecificInt(43), m_Specific(Alloca))