Home
last modified time | relevance | path

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

12

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp463 if (match(Op0, m_APInt(AC)) && match(Op1, m_Add(m_Value(A), m_APInt(AddC))) && in commonShiftTransforms()
526 if (!match(InnerShift->getOperand(1), m_APInt(InnerShiftConst))) in canEvaluateShiftedShift()
617 return !IsLeftShift && match(I->getOperand(1), m_APInt(MulConst)) && in canEvaluateShifted()
634 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift()
794 match(Op0, m_SDiv(m_Value(X), m_APInt(DivC))) && !DivC->isZero() && in FoldShiftByConstant()
806 if (!match(C1, m_APInt(Op1C))) in FoldShiftByConstant()
835 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) { in FoldShiftByConstant()
864 match(TBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
881 match(FBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
918 if (!match(ShiftAmt, m_APInt(ShAmtAPInt)) || in foldLShrOverflowBit()
[all …]
H A DInstCombineAddSub.cpp770 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
773 if (match(X, m_Xor(m_Value(Y), m_APInt(C1)))) { in checkForNegativeOperand()
776 if (match(Y, m_Or(m_Value(Z), m_APInt(C2))) && (*C2 == ~(*C1))) { in checkForNegativeOperand()
779 } else if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && (*C1 == *C2)) { in checkForNegativeOperand()
793 if (match(RHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
799 if (match(LHS, m_Xor(m_Value(Y), m_APInt(C1)))) in checkForNegativeOperand()
801 if (match(Y, m_And(m_Value(Z), m_APInt(C2))) && *C1 == (*C2 + 1)) { in checkForNegativeOperand()
821 if (match(Op1, m_APInt(C1)) && in foldNoWrapAdd()
822 match(Op0, m_ZExt(m_NUWAddLike(m_Value(X), m_APInt(C2)))) && in foldNoWrapAdd()
908 if (!match(Op1, m_APInt(C))) in foldAddWithConstant()
[all …]
H A DInstCombineAndOrXor.cpp121 match(A, m_APInt(ConstA)); in getMaskedICmpType()
122 match(B, m_APInt(ConstB)); in getMaskedICmpType()
123 match(C, m_APInt(ConstC)); in getMaskedICmpType()
343 if (!match(B, m_APInt(BCst)) || !match(C, m_APInt(CCst)) || in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
344 !match(D, m_APInt(DCst)) || !match(E, m_APInt(OrigECst))) in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
562 if (!match(B, m_APInt(ConstB)) || !match(D, m_APInt(ConstD))) in foldLogOpOfMaskedICmps()
614 if (!match(C, m_APInt(OldConstC)) || !match(E, m_APInt(OldConstE))) in foldLogOpOfMaskedICmps()
858 if (match(ICmp, m_ICmp(Pred, m_And(m_Value(X), m_APInt(Mask)), m_Zero())) && in foldSignedTruncationCheck()
997 return match(B, m_APIntAllowPoison(BCst)) && match(D, m_APInt(DCst)) && in foldNegativePower2AndShiftedMask()
998 match(E, m_APInt(ECst)) && *DCst == *ECst && in foldNegativePower2AndShiftedMask()
[all …]
H A DInstCombineMulDivRem.cpp232 match(C1, m_APInt(IVal))) { in visitMul()
255 if (match(NewCst, m_APInt(V)) && *V != V->getBitWidth() - 1) in visitMul()
383 if (match(Op1, m_APInt(C1)) && in visitMul()
491 if (match(Op0, m_OneUse(m_AShr(m_Value(X), m_APInt(C)))) && in visitMul()
503 if (match(&I, m_c_BinOp(m_LShr(m_Value(X), m_APInt(C)), m_Value(Y))) && in visitMul()
1193 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
1198 if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
1199 (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
1207 if ((IsSigned && match(Op0, m_NSWMul(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
1208 (!IsSigned && match(Op0, m_NUWMul(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
[all …]
H A DInstCombineSimplifyDemanded.cpp44 if (!match(Op, m_APInt(C))) in ShrinkDemandedConstant()
335 if (match(I->getOperand(1), m_APInt(C)) && !C->isAllOnes()) { in SimplifyDemandedUseBits()
382 if (!match(I->getOperand(OpNo), m_APInt(SelC))) in SimplifyDemandedUseBits()
392 if (!match(I->getOperand(0), m_ICmp(Pred, m_Value(X), m_APInt(CmpC))) || in SimplifyDemandedUseBits()
424 if (match(I->getOperand(0), m_OneUse(m_LShr(m_Value(X), m_APInt(C))))) { in SimplifyDemandedUseBits()
554 if (match(I->getOperand(1), m_APInt(C)) && in SimplifyDemandedUseBits()
613 if (match(I->getOperand(1), m_APInt(C)) && C->countr_zero() == CTZ) { in SimplifyDemandedUseBits()
633 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
635 if (match(I->getOperand(0), m_Shr(m_Value(), m_APInt(ShrAmt)))) in SimplifyDemandedUseBits()
720 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
[all …]
H A DInstCombineSelect.cpp125 if (!match(Sel.getTrueValue(), m_APInt(SelTC)) || in foldSelectICmpAnd()
126 !match(Sel.getFalseValue(), m_APInt(SelFC))) in foldSelectICmpAnd()
543 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
650 !match(AndVal, m_And(m_Value(X), m_APInt(C1))) || in foldSelectICmpAndZeroShl()
651 !match(TVal, m_Zero()) || !match(FVal, m_Shl(m_Specific(X), m_APInt(C2)))) in foldSelectICmpAndZeroShl()
828 if (match(T, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
829 match(F, m_OneUse(m_Or(m_Specific(X), m_APInt(C)))) && *NotC == ~(*C)) { in foldSetClearBits()
837 if (match(F, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
838 match(T, m_OneUse(m_Or(m_Specific(X), m_APInt(C)))) && *NotC == ~(*C)) { in foldSetClearBits()
949 (match(A, m_APInt(C)) && in canonicalizeSaturatedSubtract()
[all …]
H A DInstCombineCompares.cpp1339 if (!match(Y, m_APInt(C))) in foldICmpWithDominatingICmp()
1390 m_ICmp(DomPred, m_Specific(X), m_APInt(DomC)))) in foldICmpWithDominatingICmp()
1483 match(X, m_Shr(m_Value(ShOp), m_APInt(ShAmtC))) && in foldICmpTruncConstant()
1565 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant()
1644 m_AShr(m_Deferred(X), m_APInt(ShiftC)))))) in foldICmpXorShiftConst()
1673 if (match(Shift->getOperand(1), m_APInt(C3))) { in foldICmpAndShift()
1757 if (!match(And, m_And(m_Value(X), m_APInt(C2)))) in foldICmpAndConstConst()
1939 if (match(X, m_Select(m_Value(A), m_APInt(TC), m_APInt(FC))) && in foldICmpAndConstant()
2062 if (match(OrOp1, m_APInt(MaskC)) && Cmp.isEquality()) { in foldICmpOrConstant()
2095 if (C.isNonNegative() && match(Or, m_Or(m_Value(X), m_APInt(OrC)))) { in foldICmpOrConstant()
[all …]
H A DInstCombineCalls.cpp1097 if (!match(Op0, m_OneUse(m_Add(m_Value(X), m_APInt(C0)))) || in moveAddAfterMinMax()
1098 !match(Op1, m_APInt(C1))) in moveAddAfterMinMax()
1132 if (match(&MinMax1, m_SMin(m_Instruction(MinMax2), m_APInt(MaxValue)))) { in matchSAddSubSat()
1133 if (!match(MinMax2, m_SMax(m_BinOp(AddSub), m_APInt(MinValue)))) in matchSAddSubSat()
1136 m_SMax(m_Instruction(MinMax2), m_APInt(MinValue)))) { in matchSAddSubSat()
1137 if (!match(MinMax2, m_SMin(m_BinOp(AddSub), m_APInt(MaxValue)))) in matchSAddSubSat()
1192 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
1198 if (match(I0, m_SMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
1202 if (match(I0, m_SMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
1206 if (match(I0, m_UMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
[all …]
H A DInstructionCombining.cpp294 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in maintainNoSignedWrap()
753 if (match(V, m_APInt(CInt)) && !CInt->isMinSignedValue()) in tryFactorization()
2353 if (!match(Src, m_PtrAdd(m_Value(Base), m_APInt(C1)))) in canonicalizeGEPOfConstGEPI8()
2359 if (!match(GEP.getOperand(1), m_AddLike(m_Value(VarIndex), m_APInt(C2)))) in canonicalizeGEPOfConstGEPI8()
2966 match(ExactIns, m_Shr(m_Value(V), m_APInt(C))) && in visitGetElementPtrInst()
2969 else if (match(ExactIns, m_UDiv(m_Value(V), m_APInt(C)))) { in visitGetElementPtrInst()
2975 } else if (match(ExactIns, m_SDiv(m_Value(V), m_APInt(C)))) { in visitGetElementPtrInst()
3155 return match(CB->getArgOperand(0), m_APInt(Alignment)) && in isAllocSiteRemovable()
3156 match(CB->getArgOperand(1), m_APInt(Size)) && in isAllocSiteRemovable()
3730 m_ICmp(Pred, m_Specific(X), m_APInt(RHSC)))) in simplifySwitchOnSelectUsingRanges()
H A DInstCombineNegator.cpp185 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
H A DInstCombineCasts.cpp770 if (match(Src, m_Shl(m_APInt(C), m_Value(X))) && (*C)[0] == 1) { in visitTrunc()
937 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
1077 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
1090 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp559 if (match(RHS, m_APInt(C))) { in cmpExcludesZero()
660 if (match(LHS, m_V) && match(RHS, m_APInt(C))) { in computeKnownBitsFromCmp()
664 match(RHS, m_APInt(C))) { in computeKnownBitsFromCmp()
667 if (match(Y, m_APInt(Mask))) in computeKnownBitsFromCmp()
670 } else if (match(LHS, m_c_Or(m_V, m_Value(Y))) && match(RHS, m_APInt(C))) { in computeKnownBitsFromCmp()
673 if (match(Y, m_APInt(Mask))) in computeKnownBitsFromCmp()
676 } else if (match(LHS, m_Xor(m_V, m_APInt(Mask))) && in computeKnownBitsFromCmp()
677 match(RHS, m_APInt(C))) { in computeKnownBitsFromCmp()
682 match(RHS, m_APInt(C)) && ShAmt < BitWidth) { in computeKnownBitsFromCmp()
691 match(RHS, m_APInt(C)) && ShAmt < BitWidth) { in computeKnownBitsFromCmp()
[all …]
H A DDemandedBits.cpp127 } else if (match(II->getOperand(2), m_APInt(SA))) { in determineLiveOperandBits()
177 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
194 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
208 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
H A DInstructionSimplify.cpp1032 if (match(X, m_APInt(C)) && !C->isMinSignedValue()) { in isDivZero()
1042 if (match(Y, m_APInt(C))) { in isDivZero()
1067 if (match(Y, m_APInt(C)) && in isDivZero()
1195 if (IsExact && match(Op1, m_APInt(DivC))) { in simplifyDiv()
1237 if (match(Op1, m_APInt(C0))) { in simplifyRem()
1328 if (match(C, m_APInt(AmountC)) && AmountC->uge(AmountC->getBitWidth())) in isPoisonShift()
1505 if (Q.IIQ.UseInstrInfo && match(Op1, m_APInt(ShRAmt)) && in simplifyLShrInst()
1506 match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) && in simplifyLShrInst()
1673 if (!match(Cmp0->getOperand(1), m_APInt(C0)) || in simplifyAndOrOfICmpsWithConstants()
1674 !match(Cmp1->getOperand(1), m_APInt(C1))) in simplifyAndOrOfICmpsWithConstants()
[all …]
H A DLazyValueInfo.cpp1091 if (match(LHS, m_AddLike(m_Specific(Val), m_APInt(C)))) { in matchICmpOperand()
1098 if (match(Val, m_AddLike(m_Specific(LHS), m_APInt(C)))) { in matchICmpOperand()
1194 if (match(LHS, m_And(m_Specific(Val), m_APInt(Mask))) && in getValueFromICmpCondition()
1195 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1216 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1229 match(LHS, m_AShr(m_Specific(Val), m_APInt(ShAmtC))) && in getValueFromICmpCondition()
1230 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1254 if (WO->getLHS() != Val || !match(WO->getRHS(), m_APInt(C))) in getValueFromOverflowCondition()
H A DIVDescriptors.cpp79 if (match(J, m_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/
H A DAggressiveInstCombine.cpp226 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain()
363 m_APInt(MinC))), in tryToFPToSat()
364 m_APInt(MaxC))) && in tryToFPToSat()
366 m_APInt(MaxC))), in tryToFPToSat()
367 m_APInt(MinC)))) in tryToFPToSat()
642 m_APInt(ShAmt2)))))) || in foldLoadsRecursive()
657 m_APInt(ShAmt1)))))) { in foldLoadsRecursive()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DBDCE.cpp139 if (match(BO->getOperand(1), m_APInt(Mask))) { in bitTrackingDCE()
H A DReassociate.cpp135 if (match(V0, m_APInt(C))) in XorOpnd()
138 if (match(V1, m_APInt(C))) { in XorOpnd()
1388 if (match(V, m_APInt(C))) { in OptimizeXor()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLoopUnroll.cpp398 if (match(&Inst, m_Add(m_Add(m_Value(X), m_APInt(C1)), m_APInt(C2)))) { in simplifyLoopAfterUnroll()
H A DSimplifyIndVar.cpp835 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift()
837 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift()
2165 m_APInt(NarrowDefRHS))) || in calculatePostIncRange()
H A DLocal.cpp3826 if (match(V, m_LogicalShift(m_Value(X), m_APInt(C)))) { in collectBitParts()
3858 if (match(V, m_And(m_Value(X), m_APInt(C)))) { in collectBitParts()
3945 if (match(V, m_FShl(m_Value(X), m_Value(Y), m_APInt(C))) || in collectBitParts()
3946 match(V, m_FShr(m_Value(X), m_Value(Y), m_APInt(C)))) { in collectBitParts()
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantFold.cpp658 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
H A DConstants.cpp2627 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getExactLogBase2()
2645 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getExactLogBase2()
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonVectorCombine.cpp1680 if (Value * T; match(Exp, m_Shr(m_Value(T), m_APInt(Qn)))) { in matchFxpMul()
1692 if (Value * T; Op.Frac > 0 && match(Exp, m_Add(m_Value(T), m_APInt(C)))) { in matchFxpMul()

12