|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
lib/Analysis/CmpInstAnalysis.cpp 72 if (!match(RHS, m_APInt(C)))
lib/Analysis/DemandedBits.cpp 158 } else if (match(II->getOperand(2), m_APInt(SA))) {
185 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) {
202 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) {
216 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) {
lib/Analysis/IVDescriptors.cpp 98 if (match(J, m_c_And(m_Instruction(I), m_APInt(M)))) {
lib/Analysis/InstructionSimplify.cpp 973 if (match(X, m_APInt(C)) && !C->isMinSignedValue()) {
983 if (match(Y, m_APInt(C))) {
1322 if (match(Op1, m_APInt(ShRAmt)) &&
1323 match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) &&
1543 if (!match(Cmp0->getOperand(1), m_APInt(C0)) ||
1544 !match(Cmp1->getOperand(1), m_APInt(C1)))
1616 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1))))
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))))
1689 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1))))
1941 if (match(Op1, m_APInt(Mask))) {
1944 if (match(Op0, m_Shl(m_Value(X), m_APInt(ShAmt))) &&
1950 if (match(Op0, m_LShr(m_Value(X), m_APInt(ShAmt))) &&
2027 if (match(Op1, m_APInt(Mask)) &&
2028 match(Op0, m_c_Or(m_CombineAnd(m_NUWShl(m_Value(X), m_APInt(ShAmt)),
2164 if (match(Op0, m_And(m_Value(A), m_APInt(C1))) &&
2165 match(Op1, m_And(m_Value(B), m_APInt(C2)))) {
2640 if (!match(RHS, m_APInt(C)))
2901 if (LBO && match(LBO, m_Shl(m_APInt(CI2Val), 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))) &&
3824 if (match(CmpLHS, m_And(m_Value(X), m_APInt(Y))))
5181 if (match(ShAmtArg, m_APInt(ShAmtC))) {
lib/Analysis/LazyValueInfo.cpp 1261 if (WO->getLHS() != Val || !match(WO->getRHS(), m_APInt(C)))
lib/Analysis/ScalarEvolution.cpp 5893 !match(SU->getValue(), m_Select(m_Value(Condition), m_APInt(TrueVal),
5894 m_APInt(FalseVal)))) {
lib/Analysis/ValueTracking.cpp 1519 if (!match(I->getOperand(2), m_APInt(SA)))
1652 if (match(V, m_APInt(C))) {
2315 if (!match(RHS, m_APInt(CLow)))
2323 if (!match(RHS2, m_APInt(CHigh)))
2405 if (match(U->getOperand(1), m_APInt(Denominator))) {
2425 if (match(U->getOperand(1), m_APInt(Denominator))) {
2458 if (match(U->getOperand(1), m_APInt(ShAmt))) {
2469 if (match(U->getOperand(1), m_APInt(ShAmt))) {
3913 if (match(Inst->getOperand(1), m_APInt(V)))
3921 if (!match(Inst->getOperand(1), m_APInt(Denominator)))
3931 if (match(Inst->getOperand(0), m_APInt(Numerator)))
4546 if (CmpRHS == TrueVal && match(CmpRHS, m_APInt(C1))) {
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))) &&
4702 if (!match(CmpRHS, m_APInt(C1)))
4707 if ((CmpLHS == TrueVal && match(FalseVal, m_APInt(C2))) ||
4708 (CmpLHS == FalseVal && match(TrueVal, m_APInt(C2)))) {
4728 match(FalseVal, m_APInt(C2)) && ~(*C1) == *C2)
4734 match(TrueVal, m_APInt(C2)) && ~(*C1) == *C2)
5149 if (match(RHS, m_NSWAdd(m_Specific(LHS), m_APInt(C))))
5158 if (match(RHS, m_NUWAdd(m_Specific(LHS), m_APInt(C))))
5165 if (match(A, m_NUWAdd(m_Value(X), m_APInt(CA))) &&
5166 match(B, m_NUWAdd(m_Specific(X), m_APInt(CB))))
5170 if (match(A, m_Or(m_Value(X), m_APInt(CA))) &&
5171 match(B, m_Or(m_Specific(X), m_APInt(CB)))) {
5424 if (match(BO.getOperand(1), m_APInt(C)) && !C->isNullValue()) {
5444 if (match(BO.getOperand(1), m_APInt(C)))
5450 if (match(BO.getOperand(1), m_APInt(C)))
5456 if (match(BO.getOperand(1), m_APInt(C)) && C->ult(Width)) {
5460 } else if (match(BO.getOperand(0), m_APInt(C))) {
5477 if (match(BO.getOperand(1), m_APInt(C)) && C->ult(Width)) {
5480 } else if (match(BO.getOperand(0), m_APInt(C))) {
5491 if (match(BO.getOperand(0), m_APInt(C))) {
5513 if (match(BO.getOperand(1), m_APInt(C))) {
5531 } else if (match(BO.getOperand(0), m_APInt(C))) {
5545 if (match(BO.getOperand(1), m_APInt(C)) && !C->isNullValue()) {
5548 } else if (match(BO.getOperand(0), m_APInt(C))) {
5555 if (match(BO.getOperand(1), m_APInt(C))) {
5563 if (match(BO.getOperand(1), m_APInt(C)))
5580 if (match(II.getOperand(0), m_APInt(C)) ||
5581 match(II.getOperand(1), m_APInt(C)))
5585 if (match(II.getOperand(0), m_APInt(C)) ||
5586 match(II.getOperand(1), m_APInt(C))) {
5600 if (match(II.getOperand(0), m_APInt(C)))
5603 else if (match(II.getOperand(1), m_APInt(C)))
5607 if (match(II.getOperand(0), m_APInt(C))) {
5617 } else if (match(II.getOperand(1), m_APInt(C))) {
5664 if (!match(LHS, m_APInt(C)) && !match(RHS, m_APInt(C)))
5664 if (!match(LHS, m_APInt(C)) && !match(RHS, m_APInt(C)))
5691 if (match(V, m_APInt(C)))
lib/CodeGen/CodeGenPrepare.cpp 1324 if (match(U, m_Add(m_Specific(A), m_APInt(AddC))) &&
1325 match(B, m_APInt(CmpC)) && *AddC == -(*CmpC)) {
lib/IR/ConstantFold.cpp 1015 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV)))
1015 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV)))
lib/Transforms/InstCombine/InstCombineAddSub.cpp 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)) {
838 if (match(Op1, m_APInt(C1)) &&
839 match(Op0, m_OneUse(m_ZExt(m_NUWAdd(m_Value(X), m_APInt(C2))))) &&
899 if (!match(Op1, m_APInt(C)))
904 if (match(Op0, m_Or(m_Value(), m_APInt(C2))) && *C2 == -*C)
921 if (match(Op0, m_ZExt(m_Xor(m_Value(X), m_APInt(C2)))) &&
938 if (match(Op0, m_AShr(m_Shl(m_Value(X), m_APInt(C2)), m_APInt(C3))) &&
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)))) {
1093 if (match(&I, m_Add(m_UMin(m_Value(X), m_APInt(NotC)), m_APInt(C))) &&
1093 if (match(&I, m_Add(m_UMin(m_Value(X), m_APInt(NotC)), m_APInt(C))) &&
1164 if (!match(Select, m_Select(m_ICmp(Pred, m_Specific(X), m_APInt(Thr)),
1773 if (match(Op0, m_APInt(Op0C))) {
1786 match(Op1Wide, m_LShr(m_Value(X), m_APInt(ShAmt))) &&
1798 match(Op1Wide, m_AShr(m_Value(X), m_APInt(ShAmt))) &&
1901 if (match(Op0, m_Zero()) && match(Op1, m_SDiv(m_Value(X), m_APInt(DivC))) &&
1995 if (match(Op1, m_AShr(m_Value(A), m_APInt(ShAmt))) &&
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp 101 } else if (match(OldRHS, m_APInt(C))) {
812 if (!match(LHS->getOperand(1), m_APInt(C1)) ||
813 !match(RHS->getOperand(1), m_APInt(C2)))
973 if (match(ICmp, m_ICmp(Pred, m_And(m_Value(X), m_APInt(Mask)), m_Zero())) &&
1752 if (match(Op1, m_APInt(C))) {
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))))) {
1968 m_APInt(ShAmt))),
2486 if (match(&I, m_c_Or(m_OneUse(m_Xor(m_Value(X), m_APInt(CV))), m_Value(Y))) &&
2719 m_APInt(ShAmt))),
3099 if (match(Op1, m_APInt(RHSC))) {
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))) &&
3225 if (match(Op1, m_AShr(m_Value(A), m_APInt(ShAmt))) &&
lib/Transforms/InstCombine/InstCombineCalls.cpp 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)));
2027 if (HasNWAdd && match(Arg1, m_APInt(C1))) {
2128 match(Arg1, m_APInt(Val)) &&
2130 match(Other->getArgOperand(1), m_APInt(Val2))) {
lib/Transforms/InstCombine/InstCombineCasts.cpp 379 if (match(I->getOperand(1), m_APInt(Amt))) {
391 if (match(I->getOperand(1), m_APInt(Amt))) {
409 if (match(I->getOperand(1), m_APInt(Amt))) {
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)),
852 if (match(ICI->getOperand(1), m_APInt(Op1CV))) {
1034 if (match(I->getOperand(1), m_APInt(Amt))) {
1047 if (match(I->getOperand(1), m_APInt(Amt))) {
lib/Transforms/InstCombine/InstCombineCompares.cpp 1487 if (match(DomCond, m_ICmp(DomPred, m_Specific(X), m_APInt(DomC))) &&
1488 match(Y, m_APInt(C))) {
1567 if (!match(Y, m_APInt(XorC)))
1647 if (match(Shift->getOperand(1), m_APInt(C3))) {
1730 if (!match(And, m_And(m_Value(X), m_APInt(C2))))
1862 if (And->hasOneUse() && C.isNullValue() && match(Y, m_APInt(C2))) {
1944 if (!match(Mul->getOperand(1), m_APInt(MulC)))
2027 if (Cmp.isEquality() && match(Shl->getOperand(0), m_APInt(ShiftVal)))
2031 if (!match(Shl->getOperand(1), m_APInt(ShiftAmt)))
2175 if (Cmp.isEquality() && match(Shr->getOperand(0), m_APInt(ShiftVal)))
2179 if (!match(Shr->getOperand(1), m_APInt(ShiftAmt)))
2299 if (!match(UDiv->getOperand(0), m_APInt(C2)))
2334 if (!match(Div->getOperand(1), m_APInt(C2)))
2503 if (match(X, m_APInt(C2)) && *C2 == C && Cmp.isEquality())
2508 if (match(X, m_APInt(C2)) &&
2538 if (!match(X, m_APInt(C2)))
2561 if (Cmp.isEquality() || !match(Y, m_APInt(C2)))
2789 if (!match(Cmp.getOperand(1), m_APInt(C)) ||
2821 if (!match(Cmp.getOperand(1), m_APInt(C)))
2922 if (match(BOp1, m_APInt(BOC)) && BOC->sgt(1) && BOC->isPowerOf2()) {
2932 if (match(BOp1, m_APInt(BOC))) {
2967 if (match(BOp0, m_APInt(BOC))) {
2979 if (match(BOp1, m_APInt(BOC)) && BO->hasOneUse() && RHS->isAllOnesValue()) {
2991 if (match(BOp1, m_APInt(BOC))) {
3002 if (match(BOp1, m_APInt(BOC)) && !BOC->isNullValue()) {
3386 m_OneUse(m_AShr(m_Shl(m_Value(X), m_APInt(C0)),
3387 m_APInt(C1))),
3938 if (match(BO0->getOperand(1), m_APInt(C))) {
3961 if (match(BO0->getOperand(1), m_APInt(C)) && !C->isNullValue() &&
4759 if (!match(I.getOperand(1), m_APInt(RHS)))
4992 if (!match(Op0, m_And(m_Value(LHS), m_APInt(LHSC))) ||
5038 if (match(Op1, m_APInt(CmpC))) {
5060 if (match(Op1, m_APInt(CmpC))) {
5081 if (match(Op1, m_APInt(CmpC))) {
5096 if (match(Op1, m_APInt(CmpC))) {
5461 if (match(Op1, m_APInt(C))) {
5533 if (match(Op1, m_APInt(C)))
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)
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp 104 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2())
119 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2())
201 match(C1, m_APInt(IVal))) {
223 if (match(NewCst, m_APInt(V)) && *V != V->getBitWidth() - 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)
697 if (match(Op1, m_APInt(C2))) {
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))))) {
969 if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && match(Op1, m_APInt(C2))) {
969 if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && match(Op1, m_APInt(C2))) {
1073 if (match(Op1, m_APInt(Op1C))) {
1325 if (match(Op1, m_APInt(Op1Int)) && !Op1Int->isMinValue() &&
lib/Transforms/InstCombine/InstCombineSelect.cpp 126 if (!match(Sel.getTrueValue(), m_APInt(SelTC)) ||
127 !match(Sel.getFalseValue(), m_APInt(SelFC)))
444 bool OOpIsAPInt = match(OOp, m_APInt(OOpC));
475 bool OOpIsAPInt = match(OOp, m_APInt(OOpC));
739 match(TVal, m_Add(m_Value(X), m_APInt(C))) && X == Cmp0 &&
740 match(FVal, m_AllOnes()) && match(Cmp1, m_APInt(CmpC)) && *CmpC == ~*C) {
903 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC)))
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)
1563 if (match(B, m_APInt(CB)) && match(C, m_APInt(CC))) {
1563 if (match(B, m_APInt(CB)) && match(C, m_APInt(CC))) {
1987 if (IsUnsigned && match(X, m_NUWAdd(m_Value(A), m_APInt(C1))) &&
1988 match(Y, m_APInt(C2)) && C2->uge(*C1) && X->hasNUses(2)) {
1997 if (!IsUnsigned && match(X, m_NSWAdd(m_Value(A), m_APInt(C1))) &&
1998 match(Y, m_APInt(C2)) && X->hasNUses(2)) {
2024 if (match(&MinMax1, m_SMin(m_Instruction(MinMax2), m_APInt(MaxValue)))) {
2025 if (!match(MinMax2, m_SMax(m_BinOp(AddSub), m_APInt(MinValue))))
2028 m_SMax(m_Instruction(MinMax2), m_APInt(MinValue)))) {
2029 if (!match(MinMax2, m_SMin(m_BinOp(AddSub), m_APInt(MaxValue))))
lib/Transforms/InstCombine/InstCombineShifts.cpp 350 if (!match(InnerShift->getOperand(1), m_APInt(InnerShiftConst)))
477 match(InnerShift->getOperand(1), m_APInt(C1));
607 if (!match(Op1, m_APInt(Op1C)))
765 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) {
783 match(Op0BO->getOperand(0), m_APInt(Op0C))) {
809 match(TBO->getOperand(1), m_APInt(C)) &&
828 match(FBO->getOperand(1), m_APInt(C)) &&
866 if (match(Op1, m_APInt(ShAmtAPInt))) {
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)))) {
981 if (match(Op1, m_APInt(ShAmtAPInt))) {
1000 if (match(Op0, m_Shl(m_Value(X), m_APInt(ShOp1))) && ShOp1->ult(BitWidth)) {
1069 if (match(Op0, m_LShr(m_Value(X), m_APInt(ShOp1)))) {
1180 if (match(Op1, m_APInt(ShAmtAPInt)) && ShAmtAPInt->ult(BitWidth)) {
1194 if (match(Op0, m_NSWShl(m_Value(X), m_APInt(ShOp1))) &&
1213 if (match(Op0, m_AShr(m_Value(X), m_APInt(ShOp1))) &&
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp 47 if (!match(Op, m_APInt(C)))
325 if (match(RHS, m_APInt(C)) && CTZ >= C->getActiveBits())
334 if (match(RHS, m_APInt(C)) &&
467 if (match(I->getOperand(1), m_APInt(SA))) {
469 if (match(I->getOperand(0), m_Shr(m_Value(), m_APInt(ShrAmt))))
498 if (match(I->getOperand(1), m_APInt(SA))) {
537 if (match(I->getOperand(1), m_APInt(SA))) {
582 if (match(I->getOperand(1), m_APInt(SA))) {
694 if (!match(I->getOperand(2), m_APInt(SA)))
lib/Transforms/InstCombine/InstCombineVectorOps.cpp 1459 if (match(BO1, m_APInt(C)) && MaskedValueIsZero(BO0, *C, DL))
lib/Transforms/InstCombine/InstructionCombining.cpp 214 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal)))
214 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal)))
627 if (match(V, m_APInt(CInt))) {
lib/Transforms/Scalar/IndVarSimplify.cpp 1827 m_APInt(NarrowDefRHS))) ||
lib/Transforms/Scalar/Reassociate.cpp 128 if (match(V0, m_APInt(C)))
131 if (match(V1, m_APInt(C))) {
1329 if (match(V, m_APInt(C))) {
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/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/Utils/SimplifyLibCalls.cpp 244 if (match(Size, m_Select(m_Value(), m_APInt(X), m_APInt(Y)))) {
244 if (match(Size, m_Select(m_Value(), m_APInt(X), m_APInt(Y)))) {