Home
last modified time | relevance | path

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

12

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineShifts.cpp464 if (match(Op0, m_APInt(AC)) && match(Op1, m_Add(m_Value(A), m_APInt(AddC))) && in commonShiftTransforms()
542 if (!match(InnerShift->getOperand(1), m_APInt(InnerShiftConst))) in canEvaluateShiftedShift()
633 return !IsLeftShift && match(I->getOperand(1), m_APInt(MulConst)) && in canEvaluateShifted()
650 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift()
810 match(Op0, m_SDiv(m_Value(X), m_APInt(DivC))) && !DivC->isZero() && in FoldShiftByConstant()
822 if (!match(C1, m_APInt(Op1C))) in FoldShiftByConstant()
851 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) { in FoldShiftByConstant()
880 match(TBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
897 match(FBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant()
934 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.cpp122 match(A, m_APInt(ConstA)); in getMaskedICmpType()
123 match(B, m_APInt(ConstB)); in getMaskedICmpType()
124 match(C, m_APInt(ConstC)); in getMaskedICmpType()
361 if (!match(B, m_APInt(BCst)) || !match(D, m_APInt(DCst)) || in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
362 !match(E, m_APInt(OrigECst))) in foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed()
604 if (match(B, m_APInt(ConstB)) && match(D, m_APInt(ConstD))) { in foldLogOpOfMaskedICmps()
659 if (!match(C, m_APInt(OldConstC)) || !match(E, m_APInt(OldConstE))) in foldLogOpOfMaskedICmps()
1033 return match(B, m_APIntAllowPoison(BCst)) && match(D, m_APInt(DCst)) && in foldNegativePower2AndShiftedMask()
1034 match(E, m_APInt(ECst)) && *DCst == *ECst && in foldNegativePower2AndShiftedMask()
1163 if (match(X, m_OneUse(m_LShr(m_Value(Y), m_APInt(Shift)))) && in matchIntPart()
[all …]
H A DInstCombineSimplifyDemanded.cpp50 if (!match(Op, m_APInt(C))) in ShrinkDemandedConstant()
342 if (match(I->getOperand(1), m_APInt(C)) && !C->isAllOnes()) { in SimplifyDemandedUseBits()
389 if (!match(I->getOperand(OpNo), m_APInt(SelC))) in SimplifyDemandedUseBits()
398 if (!match(I->getOperand(0), m_ICmp(m_Value(X), m_APInt(CmpC))) || in SimplifyDemandedUseBits()
430 if (match(I->getOperand(0), m_OneUse(m_LShr(m_Value(X), m_APInt(C))))) { in SimplifyDemandedUseBits()
560 if (match(I->getOperand(1), m_APInt(C)) && in SimplifyDemandedUseBits()
628 if (match(I->getOperand(1), m_APInt(C)) && C->countr_zero() == CTZ) { in SimplifyDemandedUseBits()
648 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
650 if (match(I->getOperand(0), m_Shr(m_Value(), m_APInt(ShrAmt)))) in SimplifyDemandedUseBits()
735 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits()
[all …]
H A DInstCombineMulDivRem.cpp226 match(C1, m_APInt(IVal))) { in visitMul()
249 if (match(NewCst, m_APInt(V)) && *V != V->getBitWidth() - 1) in visitMul()
264 match(&I, m_Mul(m_Exact(m_Shr(m_Value(NewOp), m_APInt(ShiftC))), in visitMul()
265 m_APInt(MulAP))) && in visitMul()
404 if (match(Op1, m_APInt(C1)) && in visitMul()
512 if (match(Op0, m_OneUse(m_AShr(m_Value(X), m_APInt(C)))) && in visitMul()
524 if (match(&I, m_c_BinOp(m_LShr(m_Value(X), m_APInt(C)), m_Value(Y))) && in visitMul()
1326 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms()
1331 if ((IsSigned && match(Op0, m_SDiv(m_Value(X), m_APInt(C1)))) || in commonIDivTransforms()
1332 (!IsSigned && match(Op0, m_UDiv(m_Value(X), m_APInt(C1))))) { in commonIDivTransforms()
[all …]
H A DInstCombineSelect.cpp128 if (!match(TrueVal, m_APInt(SelTC)) || !match(FalseVal, m_APInt(SelFC))) in foldSelectICmpAnd()
525 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp()
696 !match(AndVal, m_And(m_Value(X), m_APInt(C1))) || in foldSelectICmpAndZeroShl()
697 !match(TVal, m_Zero()) || !match(FVal, m_Shl(m_Specific(X), m_APInt(C2)))) in foldSelectICmpAndZeroShl()
851 if (match(T, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
852 match(F, m_OneUse(m_Or(m_Specific(X), m_APInt(C)))) && *NotC == ~(*C)) { in foldSetClearBits()
860 if (match(F, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits()
861 match(T, m_OneUse(m_Or(m_Specific(X), m_APInt(C)))) && *NotC == ~(*C)) { in foldSetClearBits()
971 (match(A, m_APInt(C)) && in canonicalizeSaturatedSubtract()
975 !(match(B, m_APInt(C)) && in canonicalizeSaturatedSubtract()
[all …]
H A DInstCombineCompares.cpp1375 if (!match(Y, m_APInt(C))) in foldICmpWithDominatingICmp()
1426 m_ICmp(DomPred, m_Specific(X), m_APInt(DomC)))) in foldICmpWithDominatingICmp()
1519 match(X, m_Shr(m_Value(ShOp), m_APInt(ShAmtC))) && in foldICmpTruncConstant()
1601 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant()
1680 m_AShr(m_Deferred(X), m_APInt(ShiftC)))))) in foldICmpXorShiftConst()
1709 if (match(Shift->getOperand(1), m_APInt(C3))) { in foldICmpAndShift()
1794 if (!match(And, m_And(m_Value(X), m_APInt(C2)))) in foldICmpAndConstConst()
2010 if (match(And, m_And(m_OneUse(m_Add(m_Value(A), m_APInt(Addend))), in foldICmpAndConstant()
2107 if (match(OrOp1, m_APInt(MaskC)) && Cmp.isEquality()) { in foldICmpOrConstant()
2140 if (C.isNonNegative() && match(Or, m_Or(m_Value(X), m_APInt(OrC)))) { in foldICmpOrConstant()
[all …]
H A DInstCombineCalls.cpp1152 if (!match(Op0, m_OneUse(m_Add(m_Value(X), m_APInt(C0)))) || in moveAddAfterMinMax()
1153 !match(Op1, m_APInt(C1))) in moveAddAfterMinMax()
1187 if (match(&MinMax1, m_SMin(m_Instruction(MinMax2), m_APInt(MaxValue)))) { in matchSAddSubSat()
1188 if (!match(MinMax2, m_SMax(m_BinOp(AddSub), m_APInt(MinValue)))) in matchSAddSubSat()
1191 m_SMax(m_Instruction(MinMax2), m_APInt(MinValue)))) { in matchSAddSubSat()
1192 if (!match(MinMax2, m_SMin(m_BinOp(AddSub), m_APInt(MaxValue)))) in matchSAddSubSat()
1245 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo()
1251 if (match(I0, m_SMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
1255 if (match(I0, m_SMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo()
1259 if (match(I0, m_UMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo()
[all …]
H A DInstructionCombining.cpp313 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in maintainNoSignedWrap()
782 if (match(V, m_APInt(CInt)) && !CInt->isMinSignedValue()) in tryFactorization()
1889 match(&I, m_ICmp(m_Specific(PN), m_APInt(Ignored)))) in foldOpIntoPhi()
2598 if (!match(Src, m_PtrAdd(m_Value(Base), m_APInt(C1)))) in canonicalizeGEPOfConstGEPI8()
2604 if (!match(GEP.getOperand(1), m_AddLike(m_Value(VarIndex), m_APInt(C2)))) in canonicalizeGEPOfConstGEPI8()
2965 return match(V, m_APInt(C)) && !C->isZero(); in shouldCanonicalizeGEPToPtrAdd()
3251 match(ExactIns, m_Shr(m_Value(V), m_APInt(C))) && in visitGetElementPtrInst()
3254 else if (match(ExactIns, m_UDiv(m_Value(V), m_APInt(C)))) { in visitGetElementPtrInst()
3260 } else if (match(ExactIns, m_SDiv(m_Value(V), m_APInt(C)))) { in visitGetElementPtrInst()
3452 return match(CB->getArgOperand(0), m_APInt(Alignment)) && in isAllocSiteRemovable()
[all …]
H A DInstCombineCasts.cpp481 m_APInt(ShiftAmount))))) in foldVecExtTruncToExtElt()
843 if (match(Src, m_Shl(m_APInt(C), m_Value(X))) && (*C)[0] == 1) { in visitTrunc()
984 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
1131 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
1144 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
H A DInstCombineNegator.cpp181 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DValueTracking.cpp223 if (((match(RHS, m_Shl(m_Value(), m_Sub(m_APInt(R), m_Value(V)))) && in haveNoCommonBitsSetSpecialCases()
225 (match(RHS, m_LShr(m_Value(), m_Sub(m_APInt(R), m_Value(V)))) && in haveNoCommonBitsSetSpecialCases()
572 if (match(RHS, m_APInt(C))) { in cmpExcludesZero()
704 if (!match(RHS, m_APInt(C))) in computeKnownBitsFromCmp()
717 if (match(Y, m_APInt(Mask))) in computeKnownBitsFromCmp()
723 if (match(Y, m_APInt(Mask))) in computeKnownBitsFromCmp()
753 if (match(LHS, m_CombineOr(m_V, m_AddLike(m_V, m_APInt(Offset))))) { in computeKnownBitsFromCmp()
1154 if (!match(RHS, m_APInt(CLow))) in isSignedMinMaxClamp()
1162 if (!match(RHS2, m_APInt(CHigh))) in isSignedMinMaxClamp()
1182 !match(II->getArgOperand(1), m_APInt(CLow)) || in isSignedMinMaxIntrinsicClamp()
[all …]
H A DDemandedBits.cpp125 } else if (match(II->getOperand(2), m_APInt(SA))) { in determineLiveOperandBits()
175 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
192 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
206 if (match(UserI->getOperand(1), m_APInt(ShiftAmtC))) { in determineLiveOperandBits()
H A DInstructionSimplify.cpp997 if (match(X, m_APInt(C)) && !C->isMinSignedValue()) { in isDivZero()
1007 if (match(Y, m_APInt(C))) { in isDivZero()
1032 if (match(Y, m_APInt(C)) && computeKnownBits(X, Q).getMaxValue().ult(*C)) in isDivZero()
1146 if (IsExact && match(Op1, m_APInt(DivC))) { in simplifyDiv()
1188 if (match(Op1, m_APInt(C0))) { in simplifyRem()
1279 if (match(C, m_APInt(AmountC)) && AmountC->uge(AmountC->getBitWidth())) in isPoisonShift()
1456 if (Q.IIQ.UseInstrInfo && match(Op1, m_APInt(ShRAmt)) && in simplifyLShrInst()
1457 match(Op0, m_c_Or(m_NUWShl(m_Value(X), m_APInt(ShLAmt)), m_Value(Y))) && in simplifyLShrInst()
1624 if (!match(Cmp0->getOperand(1), m_APInt(C0)) || in simplifyAndOrOfICmpsWithConstants()
1625 !match(Cmp1->getOperand(1), m_APInt(C1))) in simplifyAndOrOfICmpsWithConstants()
[all …]
H A DLazyValueInfo.cpp1105 if (match(LHS, m_AddLike(m_Specific(Val), m_APInt(C)))) { in matchICmpOperand()
1112 if (match(Val, m_AddLike(m_Specific(LHS), m_APInt(C)))) { in matchICmpOperand()
1232 if (match(LHS, m_And(m_Specific(Val), m_APInt(Mask))) && in getValueFromICmpCondition()
1233 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1254 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1267 match(LHS, m_AShr(m_Specific(Val), m_APInt(ShAmtC))) && in getValueFromICmpCondition()
1268 match(RHS, m_APInt(C))) { in getValueFromICmpCondition()
1327 if (WO->getLHS() != Val || !match(WO->getRHS(), m_APInt(C))) in getValueFromOverflowCondition()
H A DHashRecognize.cpp350 if (match(I, m_c_BinOp(m_APInt(C), m_Value()))) in digRecurrence()
H A DIVDescriptors.cpp81 if (match(J, m_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/
H A DAggressiveInstCombine.cpp225 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain()
334 m_APInt(AndMask)))) { in tryToRecognizePopCount()
379 m_APInt(MinC))), in tryToFPToSat()
380 m_APInt(MaxC))) && in tryToFPToSat()
382 m_APInt(MaxC))), in tryToFPToSat()
383 m_APInt(MinC)))) in tryToFPToSat()
650 m_APInt(ShAmt2)))))) || in foldLoadsRecursive()
665 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()
1386 if (match(V, m_APInt(C))) { in OptimizeXor()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLoopUnroll.cpp394 if (match(&Inst, m_Add(m_Add(m_Value(X), m_APInt(C1)), m_APInt(C2)))) { in simplifyLoopAfterUnroll()
H A DSimplifyIndVar.cpp837 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift()
839 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift()
2175 m_APInt(NarrowDefRHS))) || in calculatePostIncRange()
H A DLocal.cpp3918 if (match(V, m_LogicalShift(m_Value(X), m_APInt(C)))) { in collectBitParts()
3950 if (match(V, m_And(m_Value(X), m_APInt(C)))) { in collectBitParts()
4037 if (match(V, m_FShl(m_Value(X), m_Value(Y), m_APInt(C))) || in collectBitParts()
4038 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.cpp653 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp1800 if (!match(U, m_ExtractElt(m_Value(), m_APInt(Idx)))) in scalarizeExtExtract()
3661 m_APInt(SplatVal0), m_APInt(SplatVal1)))) in foldInterleaveIntrinsics()

12