Home
last modified time | relevance | path

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

12

/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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()
738 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
743 if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
744 (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
751 if ((IsSigned && match(Op0, m_NSWMul(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
752 (!IsSigned && match(Op0, m_NUWMul(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
774 if ((IsSigned && match(Op0, m_NSWShl(m_Value(X), m_APInt(C1))) && in commonIDivTransforms()
[all …]
H A DInstCombineCompares.cpp1472 if (match(DomCond, m_ICmp(DomPred, m_Specific(X), m_APInt(DomC))) && in foldICmpWithDominatingICmp()
1473 match(Y, m_APInt(C))) { in foldICmpWithDominatingICmp()
1555 match(X, m_Shr(m_Value(ShOp), m_APInt(ShAmtC))) && in foldICmpTruncConstant()
1574 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant()
1651 if (match(Shift->getOperand(1), m_APInt(C3))) { in foldICmpAndShift()
1735 if (!match(And, m_And(m_Value(X), m_APInt(C2)))) in foldICmpAndConstConst()
1866 if (And->hasOneUse() && C.isNullValue() && match(Y, m_APInt(C2))) { in foldICmpAndConstant()
1897 if (match(OrOp1, m_APInt(MaskC)) && Cmp.isEquality()) { in foldICmpOrConstant()
1953 if (!match(Mul->getOperand(1), m_APInt(MulC))) in foldICmpMulConstant()
2051 if (Cmp.isEquality() && match(Shl->getOperand(0), m_APInt(ShiftVal))) in foldICmpShlConstant()
[all …]
H A 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 …]
H A DInstCombineCalls.cpp744 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
750 if (match(I0, m_SMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
754 if (match(I0, m_SMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
758 if (match(I0, m_UMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
762 if (match(I0, m_UMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
933 if (match(IIOperand, m_SRem(m_Value(X), m_APInt(C))) && *C == 2) in visitCallInst()
1158 bool HasNWAdd = IsSigned ? match(Arg0, m_NSWAdd(m_Value(X), m_APInt(C0))) in visitCallInst()
1159 : match(Arg0, m_NUWAdd(m_Value(X), m_APInt(C0))); in visitCallInst()
1160 if (HasNWAdd && match(Arg1, m_APInt(C1))) { in visitCallInst()
1254 match(Arg1, m_APInt(Val)) && in visitCallInst()
[all …]
H A DInstCombineNegator.cpp192 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
H A DInstCombineCasts.cpp944 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
1126 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
1139 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
H A DInstructionCombining.cpp269 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in maintainNoSignedWrap()
684 if (match(V, m_APInt(CInt))) { in tryFactorization()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A DValueTracking.cpp580 if (!match(RHS, m_APInt(C))) in cmpExcludesZero()
1216 if (match(I->getOperand(0), m_APInt(C))) in computeKnownBitsFromOperator()
1228 if (match(I->getOperand(0), m_APInt(C))) in computeKnownBitsFromOperator()
1571 if (!match(I->getOperand(2), m_APInt(SA))) in computeKnownBitsFromOperator()
1837 if (match(V, m_APInt(C))) { in computeKnownBits()
2209 !match(Start, m_APInt(StartC)) || StartC->isNullValue()) in isNonZeroRecurrence()
2217 (BO->hasNoSignedWrap() && match(Step, m_APInt(StepC)) && in isNonZeroRecurrence()
2221 match(Step, m_APInt(StepC)) && !StepC->isNullValue(); in isNonZeroRecurrence()
2653 return match(OBO, m_Mul(m_Specific(V1), m_APInt(C))) && in isNonEqualMul()
2667 return match(OBO, m_Shl(m_Specific(V1), m_APInt(C))) && in isNonEqualShl()
[all …]
H A 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()
H A DInstructionSimplify.cpp1010 if (match(X, m_APInt(C)) && !C->isMinSignedValue()) { in isDivZero()
1020 if (match(Y, m_APInt(C))) { in isDivZero()
1378 if (match(Op1, m_APInt(ShRAmt)) && in SimplifyLShrInst()
1379 match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) && in SimplifyLShrInst()
1598 if (!match(Cmp0->getOperand(1), m_APInt(C0)) || in simplifyAndOrOfICmpsWithConstants()
1599 !match(Cmp1->getOperand(1), m_APInt(C1))) in simplifyAndOrOfICmpsWithConstants()
1671 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyAndOfICmpsWithAdd()
1737 if (match(Cmp0->getOperand(1), m_APInt(C))) in simplifyAndOrOfICmpsWithLimitConst()
1807 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyOrOfICmpsWithAdd()
2018 if (match(Op1, m_APInt(Mask))) { in SimplifyAndInst()
[all …]
H A DCmpInstAnalysis.cpp72 if (!match(RHS, m_APInt(C))) in decomposeBitTestICmp()
H A 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()
H A DIVDescriptors.cpp100 if (match(J, m_c_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/AggressiveInstCombine/
H A DAggressiveInstCombine.cpp241 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp802 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift()
804 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift()
1988 m_APInt(NarrowDefRHS))) || in calculatePostIncRange()
H A DLocal.cpp2936 if (match(V, m_LogicalShift(m_Value(X), m_APInt(C)))) { in collectBitParts()
2968 if (match(V, m_And(m_Value(X), m_APInt(C)))) { in collectBitParts()
3055 if (match(V, m_FShl(m_Value(X), m_Value(Y), m_APInt(C))) || in collectBitParts()
3056 match(V, m_FShr(m_Value(X), m_Value(Y), m_APInt(C)))) { in collectBitParts()
H A DSimplifyLibCalls.cpp191 if (match(Size, m_Select(m_Value(), m_APInt(X), m_APInt(Y)))) { in annotateNonNullAndDereferenceable()
H A DSimplifyCFG.cpp576 m_And(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
599 m_Or(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
630 if (match(I->getOperand(0), m_Add(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A 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()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
H A DConstantFold.cpp1167 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
H A DConstants.cpp2774 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getExactLogBase2()
2792 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getExactLogBase2()

12