| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 540 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift() 667 if (!match(Op1, m_APInt(Op1C))) 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() 912 if (match(Op1, m_APInt(ShAmtAPInt))) { in visitShl() 1052 if (match(Op1, m_APInt(ShAmtAPInt))) { in visitLShr() [all …]
|
| H A D | InstCombineAddSub.cpp | 785 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() 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() 836 if (match(Op1, m_APInt(C1)) && in foldNoWrapAdd() 901 if (!match(Op1, m_APInt(C))) in foldAddWithConstant() 979 if (match(Op0, m_AShr(m_Shl(m_Value(X), m_APInt(C2)), m_APInt(C3))) && in foldAddWithConstant() 1003 if (match(E, m_Mul(m_Value(Op), m_APInt(AI)))) { in MatchMul() 1007 if (match(E, m_Shl(m_Value(Op), m_APInt(AI)))) { in MatchMul() 1142 if (match(&I, m_Add(m_UMin(m_Value(X), m_APInt(NotC)), m_APInt(C))) && in foldToUnsignedSaturatedAdd() [all …]
|
| H A D | InstCombineSimplifyDemanded.cpp | 38 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() 532 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 590 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 631 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 678 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 810 if (!match(I->getOperand(2), m_APInt(SA))) in SimplifyDemandedUseBits() [all …]
|
| H A D | InstCombineSelect.cpp | 128 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() 707 if (match(F, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits() 755 (match(A, m_APInt(C)) && in canonicalizeSaturatedSubtract() 759 !(match(B, m_APInt(C)) && in canonicalizeSaturatedSubtract() 954 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC))) in adjustMinMax() 1618 if (match(B, m_APInt(CB)) && match(C, m_APInt(CC))) { in foldSPFofSPF() [all …]
|
| H A D | InstCombineMulDivRem.cpp | 174 match(C1, m_APInt(IVal))) { in visitMul() 196 if (match(NewCst, m_APInt(V)) && *V != V->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() 1022 if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && match(Op1, m_APInt(C2))) { in visitUDiv() 1143 if (match(Op1, m_APInt(Op1C))) { in visitSDiv() [all …]
|
| H A D | InstCombineCompares.cpp | 1496 match(Y, m_APInt(C))) { in foldICmpWithDominatingICmp() 1597 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant() 2593 if (match(X, m_APInt(C2)) && in foldICmpSubConstant() 2623 if (!match(X, m_APInt(C2))) in foldICmpSubConstant() 3126 if (match(BOp1, m_APInt(BOC))) { in foldICmpBinOpEqualityWithConstant() 5183 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5200 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5217 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5228 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5766 if (match(Op1, m_APInt(C))) { in visitICmpInst() [all …]
|
| H A D | InstCombineAndOrXor.cpp | 103 } 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() 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() 1836 if (match(Op0, m_OneUse(m_Or(m_Value(X), m_APInt(OrC))))) { in visitAnd() 1881 if (match(Op0, m_Add(m_Value(X), m_APInt(AddC)))) { in visitAnd() 3220 if (match(Op1, m_AShr(m_Value(A), m_APInt(ShAmt))) && in canonicalizeAbs() 3439 if (match(Op1, m_APInt(RHSC))) { in visitXor() 3451 if (match(Op0, m_Or(m_Value(X), m_APInt(C))) && in visitXor() [all …]
|
| H A D | InstCombineCalls.cpp | 765 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 …]
|
| H A D | InstCombineNegator.cpp | 192 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
|
| H A D | InstructionCombining.cpp | 269 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()
|
| H A D | InstCombineCasts.cpp | 976 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-13.1/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | ValueTracking.cpp | 581 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() 1879 if (match(V, m_APInt(C))) { in computeKnownBits() 2730 if (match(IV1, m_APInt(C1)) && match(IV2, m_APInt(C2)) && *C1 != *C2) in isNonEqualPHIs() 2827 if (!match(RHS, m_APInt(CLow))) in isSignedMinMaxClamp() 2835 if (!match(RHS2, m_APInt(CHigh))) in isSignedMinMaxClamp() 5761 if (match(V, m_APInt(C))) in getNotValue() 5828 if (!match(CmpRHS, m_APInt(C1))) in matchMinMax() 6976 if (!match(LHS, m_APInt(C)) && !match(RHS, m_APInt(C))) in setLimitsForSelectPattern() [all …]
|
| H A D | DemandedBits.cpp | 159 } 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 D | InstructionSimplify.cpp | 1058 if (match(Y, m_APInt(C))) { in isDivZero() 1406 if (match(Op1, m_APInt(ShRAmt)) && in SimplifyLShrInst() 1699 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyAndOfICmpsWithAdd() 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() 2145 if (match(Op1, m_APInt(Mask)) && in SimplifyAndInst() 2921 if ((match(LBO, m_UDiv(m_Mul(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS() 2923 (match(LBO, m_LShr(m_Mul(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS() 2925 (match(LBO, m_UDiv(m_Shl(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS() 3061 if (match(RHS, m_APInt(C))) { in simplifyICmpWithBinOp() [all …]
|
| H A D | CmpInstAnalysis.cpp | 72 if (!match(RHS, m_APInt(C))) in decomposeBitTestICmp()
|
| H A D | LazyValueInfo.cpp | 1035 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 D | IVDescriptors.cpp | 102 if (match(J, m_c_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/ |
| H A D | AggressiveInstCombine.cpp | 241 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | SimplifyIndVar.cpp | 757 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()
|
| H A D | Local.cpp | 2945 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()
|
| H A D | SimplifyCFG.cpp | 570 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()
|
| H A D | SimplifyLibCalls.cpp | 191 if (match(Size, m_Select(m_Value(), m_APInt(X), m_APInt(Y)))) { in annotateNonNullAndDereferenceable()
|
| /freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | Reassociate.cpp | 130 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-13.1/contrib/llvm-project/llvm/lib/IR/ |
| H A D | ConstantFold.cpp | 916 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
|
| H A D | Constants.cpp | 2776 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getExactLogBase2() 2794 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getExactLogBase2()
|