Home
last modified time | relevance | path

Searched refs:m_APInt (Results 1 – 25 of 30) sorted by relevance

12

/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
DInstCombineShifts.cpp438 if (!match(InnerShift->getOperand(1), m_APInt(InnerShiftConst))) in canEvaluateShiftedShift()
540 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift()
667 if (!match(Op1, m_APInt(Op1C))) in FoldShiftByConstant()
702 match(TI->getOperand(0), m_Shift(m_Value(), m_APInt(TrShiftAmt)))) { in FoldShiftByConstant()
762 m_APInt(CC)))) { in FoldShiftByConstant()
794 m_APInt(CC)))) { in FoldShiftByConstant()
811 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) { in FoldShiftByConstant()
829 match(Op0BO->getOperand(0), m_APInt(Op0C))) { in FoldShiftByConstant()
855 match(TBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
874 match(FBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
[all …]
DInstCombineAddSub.cpp785 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
788 if (match(X, m_Xor(m_Value(Y), m_APInt(C1)))) { in checkForNegativeOperand()
791 if (match(Y, m_Or(m_Value(Z), m_APInt(C2))) && (*C2 == ~(*C1))) { in checkForNegativeOperand()
794 } else if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && (*C1 == *C2)) { in checkForNegativeOperand()
808 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
814 if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
816 if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && *C1 == (*C2 + 1)) { in checkForNegativeOperand()
836 if (match(Op1, m_APInt(C1)) && in foldNoWrapAdd()
837 match(Op0, m_OneUse(m_ZExt(m_NUWAdd(m_Value(X), m_APInt(C2))))) && in foldNoWrapAdd()
901 if (!match(Op1, m_APInt(C))) in foldAddWithConstant()
[all …]
DInstCombineSimplifyDemanded.cpp38 if (!match(Op, m_APInt(C))) in ShrinkDemandedConstant()
277 if (match(I->getOperand(1), m_APInt(C)) && !C->isAllOnesValue()) { in SimplifyDemandedUseBits()
322 if (match(RHS, m_APInt(C)) && CTZ >= C->getActiveBits()) in SimplifyDemandedUseBits()
331 if (match(RHS, m_APInt(C)) && in SimplifyDemandedUseBits()
355 if (!match(I->getOperand(OpNo), m_APInt(SelC))) in SimplifyDemandedUseBits()
365 if (!match(I->getOperand(0), m_ICmp(Pred, m_Value(X), m_APInt(CmpC))) || in SimplifyDemandedUseBits()
532 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
534 if (match(I->getOperand(0), m_Shr(m_Value(), m_APInt(ShrAmt)))) in SimplifyDemandedUseBits()
590 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
631 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
[all …]
DInstCombineSelect.cpp128 if (!match(Sel.getTrueValue(), m_APInt(SelTC)) || in foldSelectICmpAnd()
129 !match(Sel.getFalseValue(), m_APInt(SelFC))) in foldSelectICmpAnd()
452 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
484 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
698 if (match(T, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
699 match(F, m_OneUse(m_Or(m_Specific(X), m_APInt(C)))) && *NotC == ~(*C)) { in foldSetClearBits()
707 if (match(F, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
708 match(T, m_OneUse(m_Or(m_Specific(X), m_APInt(C)))) && *NotC == ~(*C)) { in foldSetClearBits()
755 (match(A, m_APInt(C)) && in canonicalizeSaturatedSubtract()
759 !(match(B, m_APInt(C)) && in canonicalizeSaturatedSubtract()
[all …]
DInstCombineMulDivRem.cpp174 match(C1, m_APInt(IVal))) { in visitMul()
196 if (match(NewCst, m_APInt(V)) && *V != V->getBitWidth() - 1) in visitMul()
360 if (match(Op0, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1) in visitMul()
362 if (match(Op1, m_LShr(m_Value(X), m_APInt(C))) && *C == C->getBitWidth() - 1) in visitMul()
744 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
749 if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
750 (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
757 if ((IsSigned && match(Op0, m_NSWMul(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
758 (!IsSigned && match(Op0, m_NUWMul(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
780 if ((IsSigned && match(Op0, m_NSWShl(m_Value(X), m_APInt(C1))) && in commonIDivTransforms()
[all …]
DInstCombineCompares.cpp1495 if (match(DomCond, m_ICmp(DomPred, m_Specific(X), m_APInt(DomC))) && in foldICmpWithDominatingICmp()
1496 match(Y, m_APInt(C))) { in foldICmpWithDominatingICmp()
1578 match(X, m_Shr(m_Value(ShOp), m_APInt(ShAmtC))) && in foldICmpTruncConstant()
1597 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant()
1674 if (match(Shift->getOperand(1), m_APInt(C3))) { in foldICmpAndShift()
1758 if (!match(And, m_And(m_Value(X), m_APInt(C2)))) in foldICmpAndConstConst()
1902 if (And->hasOneUse() && C.isNullValue() && match(Y, m_APInt(C2))) { in foldICmpAndConstant()
1933 if (match(OrOp1, m_APInt(MaskC)) && Cmp.isEquality()) { in foldICmpOrConstant()
1989 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant()
2087 if (Cmp.isEquality() && match(Shl->getOperand(0), m_APInt(ShiftVal))) in foldICmpShlConstant()
[all …]
DInstCombineAndOrXor.cpp103 } else if (match(OldRHS, m_APInt(C))) { in SimplifyBSwap()
751 if (!match(LHS->getOperand(1), m_APInt(C1)) || in foldAndOrOfEqualityCmpsWithConstants()
752 !match(RHS->getOperand(1), m_APInt(C2))) in foldAndOrOfEqualityCmpsWithConstants()
912 if (match(ICmp, m_ICmp(Pred, m_And(m_Value(X), m_APInt(Mask)), m_Zero())) && in foldSignedTruncationCheck()
1096 if (match(X, m_OneUse(m_LShr(m_Value(Y), m_APInt(Shift)))) && in matchIntPart()
1825 if (match(Op1, m_APInt(C))) { in visitAnd()
1827 if (match(Op0, m_OneUse(m_Xor(m_Value(X), m_APInt(XorC))))) { in visitAnd()
1836 if (match(Op0, m_OneUse(m_Or(m_Value(X), m_APInt(OrC))))) { in visitAnd()
1870 if (match(Op0, m_OneUse(m_SExt(m_AShr(m_Value(X), m_APInt(ShiftC)))))) { in visitAnd()
1881 if (match(Op0, m_Add(m_Value(X), m_APInt(AddC)))) { in visitAnd()
[all …]
DInstCombineCalls.cpp765 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
771 if (match(I0, m_SMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
775 if (match(I0, m_SMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
779 if (match(I0, m_UMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
783 if (match(I0, m_UMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
954 if (match(IIOperand, m_SRem(m_Value(X), m_APInt(C))) && *C == 2) in visitCallInst()
1193 bool HasNWAdd = IsSigned ? match(Arg0, m_NSWAdd(m_Value(X), m_APInt(C0))) in visitCallInst()
1194 : match(Arg0, m_NUWAdd(m_Value(X), m_APInt(C0))); in visitCallInst()
1195 if (HasNWAdd && match(Arg1, m_APInt(C1))) { in visitCallInst()
1289 match(Arg1, m_APInt(Val)) && in visitCallInst()
[all …]
DInstCombineNegator.cpp192 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
DInstructionCombining.cpp269 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in maintainNoSignedWrap()
703 if (match(V, m_APInt(CInt))) { in tryFactorization()
3140 if (match(WO->getRHS(), m_APInt(C))) { in visitExtractValueInst()
DInstCombineCasts.cpp976 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
1175 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
1188 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Analysis/
DValueTracking.cpp581 if (!match(RHS, m_APInt(C))) in cmpExcludesZero()
1258 if (match(I->getOperand(0), m_APInt(C))) in computeKnownBitsFromOperator()
1270 if (match(I->getOperand(0), m_APInt(C))) in computeKnownBitsFromOperator()
1613 if (!match(I->getOperand(2), m_APInt(SA))) in computeKnownBitsFromOperator()
1879 if (match(V, m_APInt(C))) { in computeKnownBits()
2251 !match(Start, m_APInt(StartC)) || StartC->isNullValue()) in isNonZeroRecurrence()
2259 (BO->hasNoSignedWrap() && match(Step, m_APInt(StepC)) && in isNonZeroRecurrence()
2263 match(Step, m_APInt(StepC)) && !StepC->isNullValue(); in isNonZeroRecurrence()
2695 return match(OBO, m_Mul(m_Specific(V1), m_APInt(C))) && in isNonEqualMul()
2709 return match(OBO, m_Shl(m_Specific(V1), m_APInt(C))) && in isNonEqualShl()
[all …]
DDemandedBits.cpp159 } else if (match(II->getOperand(2), m_APInt(SA))) { in determineLiveOperandBits()
209 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
226 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
240 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
DInstructionSimplify.cpp1048 if (match(X, m_APInt(C)) && !C->isMinSignedValue()) { in isDivZero()
1058 if (match(Y, m_APInt(C))) { in isDivZero()
1406 if (match(Op1, m_APInt(ShRAmt)) && in SimplifyLShrInst()
1407 match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) && in SimplifyLShrInst()
1626 if (!match(Cmp0->getOperand(1), m_APInt(C0)) || in simplifyAndOrOfICmpsWithConstants()
1627 !match(Cmp1->getOperand(1), m_APInt(C1))) in simplifyAndOrOfICmpsWithConstants()
1699 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyAndOfICmpsWithAdd()
1765 if (match(Cmp0->getOperand(1), m_APInt(C))) in simplifyAndOrOfICmpsWithLimitConst()
1835 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyOrOfICmpsWithAdd()
2050 if (match(Op1, m_APInt(Mask))) { in SimplifyAndInst()
[all …]
DCmpInstAnalysis.cpp72 if (!match(RHS, m_APInt(C))) in decomposeBitTestICmp()
DLazyValueInfo.cpp1035 if (match(LHS, m_Add(m_Specific(Val), m_APInt(C)))) { in matchICmpOperand()
1042 if (match(Val, m_Add(m_Specific(LHS), m_APInt(C)))) { in matchICmpOperand()
1107 if (match(LHS, m_And(m_Specific(Val), m_APInt(Mask))) && in getValueFromICmpCondition()
1108 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1140 if (WO->getLHS() != Val || !match(WO->getRHS(), m_APInt(C))) in getValueFromOverflowCondition()
DIVDescriptors.cpp102 if (match(J, m_c_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/
DAggressiveInstCombine.cpp241 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/
DSimplifyIndVar.cpp757 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift()
759 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift()
1943 m_APInt(NarrowDefRHS))) || in calculatePostIncRange()
DLocal.cpp2945 if (match(V, m_LogicalShift(m_Value(X), m_APInt(C)))) { in collectBitParts()
2977 if (match(V, m_And(m_Value(X), m_APInt(C)))) { in collectBitParts()
3064 if (match(V, m_FShl(m_Value(X), m_Value(Y), m_APInt(C))) || in collectBitParts()
3065 match(V, m_FShr(m_Value(X), m_Value(Y), m_APInt(C)))) { in collectBitParts()
DSimplifyCFG.cpp570 m_And(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
593 m_Or(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
624 if (match(I->getOperand(0), m_Add(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
DSimplifyLibCalls.cpp191 if (match(Size, m_Select(m_Value(), m_APInt(X), m_APInt(Y)))) { in annotateNonNullAndDereferenceable()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/
DReassociate.cpp130 if (match(V0, m_APInt(C))) in XorOpnd()
133 if (match(V1, m_APInt(C))) { in XorOpnd()
1428 if (match(V, m_APInt(C))) { in OptimizeXor()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/IR/
DConstantFold.cpp916 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
DConstants.cpp2776 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getExactLogBase2()
2794 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getExactLogBase2()

12