| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 464 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 D | InstCombineAddSub.cpp | 770 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 D | InstCombineAndOrXor.cpp | 122 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 D | InstCombineSimplifyDemanded.cpp | 50 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 D | InstCombineMulDivRem.cpp | 226 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 D | InstCombineSelect.cpp | 128 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 D | InstCombineCompares.cpp | 1375 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 D | InstCombineCalls.cpp | 1152 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 D | InstructionCombining.cpp | 313 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 D | InstCombineCasts.cpp | 481 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 D | InstCombineNegator.cpp | 181 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | ValueTracking.cpp | 223 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 D | DemandedBits.cpp | 125 } 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 D | InstructionSimplify.cpp | 997 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 D | LazyValueInfo.cpp | 1105 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 D | HashRecognize.cpp | 350 if (match(I, m_c_BinOp(m_APInt(C), m_Value()))) in digRecurrence()
|
| H A D | IVDescriptors.cpp | 81 if (match(J, m_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/ |
| H A D | AggressiveInstCombine.cpp | 225 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 D | BDCE.cpp | 139 if (match(BO->getOperand(1), m_APInt(Mask))) { in bitTrackingDCE()
|
| H A D | Reassociate.cpp | 135 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 D | LoopUnroll.cpp | 394 if (match(&Inst, m_Add(m_Add(m_Value(X), m_APInt(C1)), m_APInt(C2)))) { in simplifyLoopAfterUnroll()
|
| H A D | SimplifyIndVar.cpp | 837 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 D | Local.cpp | 3918 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 D | ConstantFold.cpp | 653 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
| H A D | VectorCombine.cpp | 1800 if (!match(U, m_ExtractElt(m_Value(), m_APInt(Idx)))) in scalarizeExtExtract() 3661 m_APInt(SplatVal0), m_APInt(SplatVal1)))) in foldInterleaveIntrinsics()
|