| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineShifts.cpp | 453 if (match(Op0, m_APInt(AC)) && match(Op1, m_Add(m_Value(A), m_APInt(AddC))) && in commonShiftTransforms() 624 match(InnerShift->getOperand(1), m_APInt(C1)); in foldShiftedShift() 787 if (!match(C1, m_APInt(Op1C))) in FoldShiftByConstant() 816 if (match(Op0BO->getOperand(1), m_APInt(Op0C))) { in FoldShiftByConstant() 845 match(TBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant() 862 match(FBO->getOperand(1), m_APInt(C)) && in FoldShiftByConstant() 899 if (!match(ShiftAmt, m_APInt(ShAmtAPInt)) || in foldLShrOverflowBit() 1021 if (match(Op1, m_APInt(C))) { in visitShl() 1153 m_APInt(CC))))) in visitShl() 1172 m_APInt(CC))))) { in visitShl() [all …]
|
| H A D | InstCombineAddSub.cpp | 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() 821 if (match(Op1, m_APInt(C1)) && in foldNoWrapAdd() 901 if (!match(Op1, m_APInt(C))) in foldAddWithConstant() 977 if (match(Op0, m_AShr(m_Shl(m_Value(X), m_APInt(C2)), m_APInt(C3))) && in foldAddWithConstant() 1065 if (match(E, m_Mul(m_Value(Op), m_APInt(AI)))) { in MatchMul() 1204 if (match(&I, m_Add(m_UMin(m_Value(X), m_APInt(NotC)), m_APInt(C))) && in foldToUnsignedSaturatedAdd() 1246 m_APInt(MaskCCmp))))) in foldAddToAshr() 1555 if (match(LHS, m_Shl(m_SDiv(m_Specific(RHS), m_APInt(C1)), m_APInt(C2)))) { in visitAdd() 1741 m_APInt(XorC))))))) && in visitAdd() [all …]
|
| H A D | InstCombineSimplifyDemanded.cpp | 44 if (!match(Op, m_APInt(C))) in ShrinkDemandedConstant() 389 if (!match(I->getOperand(OpNo), m_APInt(SelC))) in SimplifyDemandedUseBits() 558 if (match(I->getOperand(1), m_APInt(C)) && in SimplifyDemandedUseBits() 635 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 700 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 770 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 817 if (match(I->getOperand(1), m_APInt(SA))) { in SimplifyDemandedUseBits() 838 if (match(I->getOperand(1), m_APInt(Rem))) { in SimplifyDemandedUseBits() 978 if (!match(I->getOperand(2), m_APInt(SA))) in SimplifyDemandedUseBits() 1025 if (match(II->getArgOperand(1), m_APInt(C)) && in SimplifyDemandedUseBits() [all …]
|
| H A D | InstCombineMulDivRem.cpp | 228 match(C1, m_APInt(IVal))) { in visitMul() 461 if (match(Op0, m_OneUse(m_AShr(m_Value(X), m_APInt(C)))) && in visitMul() 1056 if (match(Op1, m_APInt(C2))) { in commonIDivTransforms() 1124 m_APInt(C1))) && in commonIDivTransforms() 1130 m_APInt(C1)))) { in commonIDivTransforms() 1238 if (match(A, m_APInt(C1)) && match(B, m_APInt(C2)) && C2->ule(*C1)) in commonIDivTransforms() 1393 if (match(Op0, m_LShr(m_Value(X), m_APInt(C1))) && match(Op1, m_APInt(C2))) { in visitUDiv() 1494 if (match(Op1, m_APInt(Op1C))) { in visitSDiv() 1860 if ((!V && match(Op, m_Mul(m_Value(V), m_APInt(Tmp)))) || in simplifyIRemMulShl() 1861 (V && match(Op, m_Mul(m_Specific(V), m_APInt(Tmp))))) in simplifyIRemMulShl() [all …]
|
| H A D | InstCombineAndOrXor.cpp | 121 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() 3161 match(LHS1, m_APInt(LHSC)); in foldAndOrOfICmps() 3162 match(RHS1, m_APInt(RHSC)); in foldAndOrOfICmps() 3437 if (match(C, m_APInt(C0)) && match(D, m_APInt(C1))) { in visitOr() [all …]
|
| H A D | InstCombineSelect.cpp | 124 if (!match(Sel.getTrueValue(), m_APInt(SelTC)) || in foldSelectICmpAnd() 125 !match(Sel.getFalseValue(), m_APInt(SelFC))) in foldSelectICmpAnd() 537 bool OOpIsAPInt = match(OOp, m_APInt(OOpC)); in foldSelectIntoOp() 634 !match(AndVal, m_And(m_Value(X), m_APInt(C1))) || in foldSelectICmpAndZeroShl() 812 if (match(T, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits() 821 if (match(F, m_And(m_Value(X), m_APInt(NotC))) && in foldSetClearBits() 933 (match(A, m_APInt(C)) && in canonicalizeSaturatedSubtract() 937 !(match(B, m_APInt(C)) && in canonicalizeSaturatedSubtract() 966 match(TVal, m_Add(m_Value(X), m_APInt(C))) && X == Cmp0 && in canonicalizeSaturatedAdd() 1635 if (!match(ICI, m_ICmp(Pred, m_Value(V), m_APInt(CmpC)))) in foldSelectInstWithICmpConst() [all …]
|
| H A D | InstCombineCompares.cpp | 1339 if (!match(Y, m_APInt(C))) in foldICmpWithDominatingICmp() 1548 if (!match(Y, m_APInt(XorC))) in foldICmpXorConstant() 1900 if (match(X, m_Select(m_Value(A), m_APInt(TC), m_APInt(FC))) && in foldICmpAndConstant() 2386 if (match(X, m_APInt(ShiftValC))) { in foldICmpShrConstant() 2588 if (!match(X, m_APInt(C2))) in foldICmpUDivConstant() 2644 if (!match(Y, m_APInt(C2))) in foldICmpDivConstant() 2815 if (match(X, m_APInt(C2)) && in foldICmpSubConstant() 2856 if (!match(X, m_APInt(C2))) in foldICmpSubConstant() 3767 if (!match(Op1, m_APInt(COp1))) in foldICmpUSubSatOrUAddSatWithConstant() 7025 if (match(Op1, m_APInt(C))) { in visitICmpInst() [all …]
|
| H A D | InstCombineCalls.cpp | 1107 if (!match(Op0, m_OneUse(m_Add(m_Value(X), m_APInt(C0)))) || in moveAddAfterMinMax() 1108 !match(Op1, m_APInt(C1))) in moveAddAfterMinMax() 1143 if (!match(MinMax2, m_SMax(m_BinOp(AddSub), m_APInt(MinValue)))) in matchSAddSubSat() 1147 if (!match(MinMax2, m_SMin(m_BinOp(AddSub), m_APInt(MaxValue)))) in matchSAddSubSat() 1202 if (!match(I1, m_APInt(C1)) || !I0->hasOneUse()) in foldClampRangeOfTwo() 1208 if (match(I0, m_SMin(m_Value(X), m_APInt(C0))) && *C0 == *C1 + 1) in foldClampRangeOfTwo() 1212 if (match(I0, m_SMax(m_Value(X), m_APInt(C0))) && *C1 == *C0 + 1) in foldClampRangeOfTwo() 1612 if (match(IIOperand, m_SRem(m_Value(X), m_APInt(C))) && *C == 2) in visitCallInst() 2083 if (HasNWAdd && match(Arg1, m_APInt(C1))) { in visitCallInst() 2177 match(Arg1, m_APInt(Val)) && in visitCallInst() [all …]
|
| H A D | InstCombineNegator.cpp | 185 if (match(I->getOperand(1), m_APInt(Op1Val)) && *Op1Val == BitWidth - 1) { in visitImpl()
|
| H A D | InstructionCombining.cpp | 276 if (!match(B, m_APInt(BVal)) || !match(C, m_APInt(CVal))) in maintainNoSignedWrap() 733 if (match(V, m_APInt(CInt)) && !CInt->isMinSignedValue()) in tryFactorization() 2750 return match(CB->getArgOperand(0), m_APInt(Alignment)) && in isAllocSiteRemovable() 2751 match(CB->getArgOperand(1), m_APInt(Size)) && in isAllocSiteRemovable()
|
| H A D | InstCombineCasts.cpp | 903 if (match(Cmp->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp() 1043 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd() 1056 if (match(I->getOperand(1), m_APInt(Amt))) { in canEvaluateZExtd()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | ValueTracking.cpp | 552 if (match(RHS, m_APInt(C))) { in cmpExcludesZero() 661 } else if (match(LHS, m_Or(m_V, m_APInt(Mask))) && match(RHS, m_APInt(C))) { in computeKnownBitsFromCmp() 699 match(RHS, m_APInt(C))) { in computeKnownBitsFromCmp() 1772 if (match(V, m_APInt(C))) { in computeKnownBits() 3028 if (match(IV1, m_APInt(C1)) && match(IV2, m_APInt(C2)) && *C1 != *C2) in isNonEqualPHIs() 3196 if (!match(RHS, m_APInt(CLow))) in isSignedMinMaxClamp() 7548 if (match(V, m_APInt(C))) in getNotValue() 7601 if (!match(CmpRHS, m_APInt(C1))) in matchMinMax() 8321 if (L0 == R0 && match(L1, m_APInt(LC)) && match(R1, m_APInt(RC))) in isImpliedCondICmps() 8839 if (!match(LHS, m_APInt(C)) && !match(RHS, m_APInt(C))) in getRangeForSelectPattern() [all …]
|
| H A D | DemandedBits.cpp | 127 } 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 D | InstructionSimplify.cpp | 1041 if (match(Y, m_APInt(C))) { in isDivZero() 1066 if (match(Y, m_APInt(C)) && in isDivZero() 1694 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyAndOfICmpsWithAdd() 1742 m_APInt(C))) || in simplifyAndOrOfICmpsWithCtpop() 1785 if (!match(Op0, m_ICmp(Pred0, m_Add(m_Value(V), m_APInt(C0)), m_APInt(C1)))) in simplifyOrOfICmpsWithAdd() 2098 if (match(Op1, m_APInt(Mask))) { in simplifyAndInst() 3205 if ((match(LBO, m_UDiv(m_Mul(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS() 3207 (match(LBO, m_LShr(m_Mul(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS() 3209 (match(LBO, m_UDiv(m_Shl(m_Specific(RHS), m_APInt(C1)), m_APInt(C2))) && in simplifyICmpWithBinOpOnLHS() 3349 if (match(RHS, m_APInt(C))) { in simplifyICmpWithBinOp() [all …]
|
| H A D | LazyValueInfo.cpp | 1077 if (match(LHS, m_Add(m_Specific(Val), m_APInt(C)))) { in matchICmpOperand() 1084 if (match(Val, m_Add(m_Specific(LHS), m_APInt(C)))) { in matchICmpOperand() 1183 if (match(LHS, m_And(m_Specific(Val), m_APInt(Mask))) && in getValueFromICmpCondition() 1184 match(RHS, m_APInt(C))) { in getValueFromICmpCondition() 1208 match(RHS, m_APInt(C))) { in getValueFromICmpCondition() 1221 match(LHS, m_AShr(m_Specific(Val), m_APInt(ShAmtC))) && in getValueFromICmpCondition() 1222 match(RHS, m_APInt(C))) { in getValueFromICmpCondition() 1246 if (WO->getLHS() != Val || !match(WO->getRHS(), m_APInt(C))) in getValueFromOverflowCondition()
|
| H A D | IVDescriptors.cpp | 79 if (match(J, m_c_And(m_Instruction(I), m_APInt(M)))) { in lookThroughAnd()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/ |
| H A D | AggressiveInstCombine.cpp | 214 if (!match(V, m_LShr(m_Value(Candidate), m_APInt(BitIndex)))) in matchAndOrChain() 351 m_APInt(MinC))), in tryToFPToSat() 352 m_APInt(MaxC))) && in tryToFPToSat() 354 m_APInt(MaxC))), in tryToFPToSat() 355 m_APInt(MinC)))) in tryToFPToSat() 639 m_APInt(ShAmt2)))))) || in foldLoadsRecursive() 654 m_APInt(ShAmt1)))))) { in foldLoadsRecursive()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | LoopUnroll.cpp | 254 if (match(&Inst, m_Add(m_Add(m_Value(X), m_APInt(C1)), m_APInt(C2)))) { in simplifyLoopAfterUnroll()
|
| H A D | SimplifyIndVar.cpp | 810 m_AShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C))) || in strengthenRightShift() 812 m_LShr(m_Shl(m_Value(), m_Specific(IVOperand)), m_APInt(C)))) { in strengthenRightShift() 2030 m_APInt(NarrowDefRHS))) || in calculatePostIncRange()
|
| H A D | Local.cpp | 3720 if (match(V, m_LogicalShift(m_Value(X), m_APInt(C)))) { in collectBitParts() 3752 if (match(V, m_And(m_Value(X), m_APInt(C)))) { in collectBitParts() 3839 if (match(V, m_FShl(m_Value(X), m_Value(Y), m_APInt(C))) || in collectBitParts() 3840 match(V, m_FShr(m_Value(X), m_Value(Y), m_APInt(C)))) { in collectBitParts()
|
| H A D | SimplifyCFG.cpp | 619 m_And(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction() 642 m_Or(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction() 673 if (match(I->getOperand(0), m_Add(m_Value(RHSVal), m_APInt(RHSC)))) { in matchInstruction()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | Reassociate.cpp | 135 if (match(V0, m_APInt(C))) in XorOpnd() 138 if (match(V1, m_APInt(C))) { in XorOpnd() 1472 if (match(V, m_APInt(C))) { in OptimizeXor()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/IR/ |
| H A D | ConstantFold.cpp | 725 if (match(C1, m_APInt(CV)) || match(C2, m_APInt(CV))) in ConstantFoldBinaryInstruction()
|
| H A D | Constants.cpp | 2488 if (match(C, m_APInt(IVal)) && IVal->isPowerOf2()) in getExactLogBase2() 2506 if (!match(Elt, m_APInt(IVal)) || !IVal->isPowerOf2()) in getExactLogBase2()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonVectorCombine.cpp | 1680 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()
|