Home
last modified time | relevance | path

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

12

/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp421 if (match(Op0, m_APInt(AC)) && match(Op1, m_Add(m_Value(A), m_APInt(AddC))) && in commonShiftTransforms()
590 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift()
734 if (!match(C1, m_APInt(Op1C))) in FoldShiftByConstant()
769 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) { in FoldShiftByConstant()
798 match(TBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
815 match(FBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
850 if (match(Op1, m_APInt(C))) { in visitShl()
920 match(Shr, m_Shr(m_Value(X), m_APInt(C1)))) { in visitShl()
974 m_APInt(CC))))) in visitShl()
993 m_APInt(CC))))) { in visitShl()
[all …]
H A DInstCombineAddSub.cpp771 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
774 if (match(X, m_Xor(m_Value(Y), m_APInt(C1)))) { in checkForNegativeOperand()
794 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
800 if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
822 if (match(Op1, m_APInt(C1)) && in foldNoWrapAdd()
887 if (!match(Op1, m_APInt(C))) in foldAddWithConstant()
965 if (match(Op0, m_AShr(m_Shl(m_Value(X), m_APInt(C2)), m_APInt(C3))) && in foldAddWithConstant()
989 if (match(E, m_Mul(m_Value(Op), m_APInt(AI)))) { in MatchMul()
993 if (match(E, m_Shl(m_Value(Op), m_APInt(AI)))) { in MatchMul()
1128 if (match(&I, m_Add(m_UMin(m_Value(X), m_APInt(NotC)), m_APInt(C))) && in foldToUnsignedSaturatedAdd()
[all …]
H A DInstCombineAndOrXor.cpp159 match(A, m_APInt(ConstA)); in getMaskedICmpType()
160 match(B, m_APInt(ConstB)); in getMaskedICmpType()
161 match(C, m_APInt(ConstC)); in getMaskedICmpType()
384 if (!match(B, m_APInt(BCst)) || !match(C, m_APInt(CCst)) || in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
385 !match(D, m_APInt(DCst)) || !match(E, m_APInt(OrigECst))) in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
603 if (!match(B, m_APInt(ConstB)) || !match(D, m_APInt(ConstD))) in foldLogOpOfMaskedICmps()
643 if (!match(C, m_APInt(OldConstC)) || !match(E, m_APInt(OldConstE))) in foldLogOpOfMaskedICmps()
2531 match(LHS1, m_APInt(LHSC)); in foldAndOrOfICmps()
2532 match(RHS1, m_APInt(RHSC)); in foldAndOrOfICmps()
2787 if (match(C, m_APInt(C0)) && match(D, m_APInt(C1))) { in visitOr()
[all …]
H A DInstCombineSimplifyDemanded.cpp38 if (!match(Op, m_APInt(C))) in ShrinkDemandedConstant()
349 if (!match(I->getOperand(OpNo), m_APInt(SelC))) in SimplifyDemandedUseBits()
534 if (match(I->getOperand(1), m_APInt(C)) && in SimplifyDemandedUseBits()
555 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
632 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
704 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
749 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
771 if (match(I->getOperand(1), m_APInt(Rem))) { in SimplifyDemandedUseBits()
878 if (!match(I->getOperand(2), m_APInt(SA))) in SimplifyDemandedUseBits()
906 if (match(II->getArgOperand(1), m_APInt(C)) && in SimplifyDemandedUseBits()
[all …]
H A DInstCombineMulDivRem.cpp177 match(C1, m_APInt(IVal))) { in visitMul()
199 if (match(NewCst, m_APInt(V)) && *V != V->getBitWidth() - 1) in visitMul()
375 if (match(Op0, m_OneUse(m_AShr(m_Value(X), m_APInt(C)))) && in visitMul()
808 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
813 if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
814 (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
821 if ((IsSigned && match(Op0, m_NSWMul(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
844 if ((IsSigned && match(Op0, m_NSWShl(m_Value(X), m_APInt(C1))) && in commonIDivTransforms()
1044 if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && match(Op1, m_APInt(C2))) { in visitUDiv()
1141 if (match(Op1, m_APInt(Op1C))) { in visitSDiv()
[all …]
H A DInstCombineSelect.cpp123 if (!match(Sel.getTrueValue(), m_APInt(SelTC)) || in foldSelectICmpAnd()
124 !match(Sel.getFalseValue(), m_APInt(SelFC))) in foldSelectICmpAnd()
467 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
702 if (match(T, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
711 if (match(F, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
811 (match(A, m_APInt(C)) && in canonicalizeSaturatedSubtract()
815 !(match(B, m_APInt(C)) && in canonicalizeSaturatedSubtract()
844 match(TVal, m_Add(m_Value(X), m_APInt(C))) && X == Cmp0 && in canonicalizeSaturatedAdd()
1010 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC))) in adjustMinMax()
1542 if (!match(ICI, m_ICmp(Pred, m_Value(V), m_APInt(CmpC)))) in foldSelectInstWithICmpConst()
[all …]
H A DInstCombineCompares.cpp1492 match(Y, m_APInt(C))) { in foldICmpWithDominatingICmp()
1603 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant()
2272 if (match(X, m_APInt(ShiftValC))) { in foldICmpShrConstant()
2475 if (!match(X, m_APInt(C2))) in foldICmpUDivConstant()
2531 if (!match(Y, m_APInt(C2))) in foldICmpDivConstant()
2702 if (match(X, m_APInt(C2)) && in foldICmpSubConstant()
2743 if (!match(X, m_APInt(C2))) in foldICmpSubConstant()
3220 if (match(BOp1, m_APInt(BOC))) { in foldICmpBinOpEqualityWithConstant()
5550 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits()
6208 if (match(Op1, m_APInt(C))) { in visitICmpInst()
[all …]
H A DInstCombineCalls.cpp845 if (!match(Op0, m_OneUse(m_Add(m_Value(X), m_APInt(C0)))) || in moveAddAfterMinMax()
846 !match(Op1, m_APInt(C1))) in moveAddAfterMinMax()
881 if (!match(MinMax2, m_SMax(m_BinOp(AddSub), m_APInt(MinValue)))) in matchSAddSubSat()
885 if (!match(MinMax2, m_SMin(m_BinOp(AddSub), m_APInt(MaxValue)))) in matchSAddSubSat()
940 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
946 if (match(I0, m_SMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
950 if (match(I0, m_SMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
1291 if (match(IIOperand, m_SRem(m_Value(X), m_APInt(C))) && *C == 2) in visitCallInst()
1618 if (HasNWAdd && match(Arg1, m_APInt(C1))) { in visitCallInst()
1712 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.cpp1001 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
1184 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
1197 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
H A DInstructionCombining.cpp286 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in maintainNoSignedWrap()
722 if (match(V, m_APInt(CInt))) { in tryFactorization()
3343 if (match(WO->getRHS(), m_APInt(C))) { in visitExtractValueInst()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DValueTracking.cpp625 if (!match(RHS, m_APInt(C))) in cmpExcludesZero()
1303 if (match(I->getOperand(0), m_APInt(C))) in computeKnownBitsFromOperator()
1952 if (match(V, m_APInt(C))) { in computeKnownBits()
2886 if (match(IV1, m_APInt(C1)) && match(IV2, m_APInt(C2)) && *C1 != *C2) in isNonEqualPHIs()
2983 if (!match(RHS, m_APInt(CLow))) in isSignedMinMaxClamp()
2991 if (!match(RHS2, m_APInt(CHigh))) in isSignedMinMaxClamp()
5958 if (match(V, m_APInt(C))) in getNotValue()
6011 if (!match(CmpRHS, m_APInt(C1))) in matchMinMax()
6712 if (ALHS == BLHS && match(ARHS, m_APInt(AC)) && match(BRHS, m_APInt(BC))) in isImpliedCondICmps()
7180 if (!match(LHS, m_APInt(C)) && !match(RHS, m_APInt(C))) in setLimitsForSelectPattern()
[all …]
H A DDemandedBits.cpp153 } else if (match(II->getOperand(2), m_APInt(SA))) { in determineLiveOperandBits()
203 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
220 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
234 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
H A DInstructionSimplify.cpp1066 if (match(Y, m_APInt(C))) { in isDivZero()
1091 if (match(Y, m_APInt(C)) && in isDivZero()
1707 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyAndOfICmpsWithAdd()
1869 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyOrOfICmpsWithAdd()
2096 if (match(Op1, m_APInt(Mask))) { in simplifyAndInst()
2191 if (match(Op1, m_APInt(Mask)) && in simplifyAndInst()
3139 if ((match(LBO, m_UDiv(m_Mul(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS()
3141 (match(LBO, m_LShr(m_Mul(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS()
3143 (match(LBO, m_UDiv(m_Shl(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS()
3277 if (match(RHS, m_APInt(C))) { in simplifyICmpWithBinOp()
[all …]
H A DCmpInstAnalysis.cpp82 if (!match(RHS, m_APInt(C))) in decomposeBitTestICmp()
H A DLazyValueInfo.cpp1033 if (match(LHS, m_Add(m_Specific(Val), m_APInt(C)))) { in matchICmpOperand()
1040 if (match(Val, m_Add(m_Specific(LHS), m_APInt(C)))) { in matchICmpOperand()
1106 if (match(LHS, m_And(m_Specific(Val), m_APInt(Mask))) && in getValueFromICmpCondition()
1107 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1131 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1150 if (WO->getLHS() != Val || !match(WO->getRHS(), m_APInt(C))) in getValueFromOverflowCondition()
H A DIVDescriptors.cpp81 if (match(J, m_c_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
/llvm-project-15.0.7/llvm/lib/Transforms/AggressiveInstCombine/
H A DAggressiveInstCombine.cpp246 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain()
383 m_APInt(MinC))), in tryToFPToSat()
384 m_APInt(MaxC))) && in tryToFPToSat()
386 m_APInt(MaxC))), in tryToFPToSat()
387 m_APInt(MinC)))) in tryToFPToSat()
/llvm-project-15.0.7/llvm/unittests/IR/
H A DPatternMatch.cpp1085 EXPECT_FALSE(match(ScalarUndef, m_APInt(C))); in TEST_F()
1088 EXPECT_FALSE(match(VectorUndef, m_APInt(C))); in TEST_F()
1094 EXPECT_TRUE(match(ScalarZero, m_APInt(C))); in TEST_F()
1103 EXPECT_TRUE(match(VectorZero, m_APInt(C))); in TEST_F()
1113 EXPECT_FALSE(match(VectorZeroUndef, m_APInt(C))); in TEST_F()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp797 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift()
799 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift()
1991 m_APInt(NarrowDefRHS))) || in calculatePostIncRange()
H A DLocal.cpp2976 if (match(V, m_LogicalShift(m_Value(X), m_APInt(C)))) { in collectBitParts()
3008 if (match(V, m_And(m_Value(X), m_APInt(C)))) { in collectBitParts()
3095 if (match(V, m_FShl(m_Value(X), m_Value(Y), m_APInt(C))) || in collectBitParts()
3096 match(V, m_FShr(m_Value(X), m_Value(Y), m_APInt(C)))) { in collectBitParts()
/llvm-project-15.0.7/mlir/docs/Rationale/
H A DRationaleGenericDAGRewriter.md132 if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1))))
134 if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && *C1 == (*C2 + 1)) {
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp128 if (match(V0, m_APInt(C))) in XorOpnd()
131 if (match(V1, m_APInt(C))) { in XorOpnd()
1445 if (match(V, m_APInt(C))) { in OptimizeXor()
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstantFold.cpp920 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
H A DConstants.cpp2722 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getExactLogBase2()
2740 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getExactLogBase2()

12