| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineMulDivRem.cpp | 240 if (match(&I, m_Mul(m_Value(NewOp), m_Constant(C1)))) { in visitMul() 369 if (match(Op0, m_Neg(m_Value(X))) && match(Op1, m_Constant(Op1C))) in visitMul() 785 if (match(Op1, m_Constant(C)) && C->isFiniteNonZeroFP() && in foldFMulReassoc() 790 if (match(Op0, m_OneUse(m_FDiv(m_Constant(C1), m_Value(X))))) { in foldFMulReassoc() 797 if (match(Op0, m_FDiv(m_Value(X), m_Constant(C1)))) { in foldFMulReassoc() 816 if (match(Op0, m_OneUse(m_FAdd(m_Value(X), m_Constant(C1))))) { in foldFMulReassoc() 824 if (match(Op0, m_OneUse(m_FSub(m_Constant(C1), m_Value(X))))) { in foldFMulReassoc() 1002 if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_Constant(C))) in visitFMul() 1646 match(D, m_Constant(C))) { in narrowUDivURem() 1657 match(N, m_Constant(C))) { in narrowUDivURem() [all …]
|
| H A D | InstCombineVectorOps.cpp | 1473 match(InsElt2.getOperand(1), m_Constant(ScalarC)) && in hoistInsEltConst() 1495 if (!match(Shuf->getOperand(1), m_Constant(ShufConstVec)) || in foldConstantInsEltIntoShuffle() 1496 !match(InsElt.getOperand(1), m_Constant(InsEltScalar)) || in foldConstantInsEltIntoShuffle() 1552 !match(InsElt.getOperand(1), m_Constant(Val[0])) || in foldConstantInsEltIntoShuffle() 1554 !match(IEI->getOperand(1), m_Constant(Val[1]))) in foldConstantInsEltIntoShuffle() 2233 if (match(Op0, m_BinOp(m_Specific(Op1), m_Constant(C)))) in foldSelectShuffleWith1Binop() 2235 else if (match(Op1, m_BinOp(m_Specific(Op0), m_Constant(C)))) in foldSelectShuffleWith1Binop() 2358 if (match(B0, m_BinOp(m_Constant(C0), m_Value(X))) && in foldSelectShuffle() 2359 match(B1, m_BinOp(m_Constant(C1), m_Value(Y)))) in foldSelectShuffle() 2361 else if (match(B0, m_CombineOr(m_BinOp(m_Value(X), m_Constant(C0)), in foldSelectShuffle() [all …]
|
| H A D | InstCombineSelect.cpp | 63 if (!match(Sel.getCondition(), m_Cmp(Pred, m_Value(X), m_Constant(C)))) in foldSelectBinOpIdentity() 1389 !match(OldOp, m_Constant()) && in foldSelectValueEquivalence() 1498 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C0)))) in canonicalizeClampLike() 1552 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C1))))) in canonicalizeClampLike() 1563 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C2))))) in canonicalizeClampLike() 1670 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C0)))))) in tryToReuseConstantFromSelectInComparison() 1690 if (Pred == CmpInst::ICMP_ULT && match(X, m_Add(m_Value(), m_Constant()))) in tryToReuseConstantFromSelectInComparison() 1889 if (!match(Cmp, m_ICmp(Predicate, m_Value(X), m_Constant(C1)))) in foldSelectWithConstOpToBinOp() 1895 if (match(TrueVal, m_Constant())) { in foldSelectWithConstOpToBinOp() 1900 if (!match(FalseVal, m_Constant(C3)) || !TrueVal->hasOneUse()) in foldSelectWithConstOpToBinOp() [all …]
|
| H A D | InstCombineCasts.cpp | 643 if (match(BinOp0, m_Constant(C))) { in narrowBinOp() 649 if (match(BinOp1, m_Constant(C))) { in narrowBinOp() 673 if (match(BinOp0, m_Trunc(m_Value(A))) && match(BinOp1, m_Constant(C))) { in narrowBinOp() 858 if (match(Src, m_LShr(m_SExt(m_Value(A)), m_Constant(C)))) { in visitTrunc() 908 if (match(Src, m_Shl(m_Value(A), m_Constant(C))) && in visitTrunc() 909 !match(A, m_Shr(m_Value(), m_Constant()))) { in visitTrunc() 1289 if (match(Src, m_OneUse(m_And(m_Trunc(m_Value(X)), m_Constant(C)))) && in visitZExt() 1295 if (match(Src, m_OneUse(m_Xor(m_Value(And), m_Constant(C)))) && in visitZExt() 1307 if (match(Src, m_And(m_Trunc(m_Value(X)), m_Constant(C))) && in visitZExt() 1568 if (match(Src, m_AShr(m_Shl(m_Trunc(m_Value(A)), m_Constant(BA)), in visitSExt() [all …]
|
| H A D | InstCombineShifts.cpp | 360 if (!match(I.getOperand(1), m_Constant(C1))) in foldShiftOfShiftedBinOp() 378 return match(V, m_BinOp(ShiftOpcode, m_Value(X), m_Constant(C0))) && in foldShiftOfShiftedBinOp() 443 if (match(Op0, m_Constant(C)) && in commonShiftTransforms() 444 match(Op1, m_NUWAddLike(m_Value(A), m_Constant(C1)))) { in commonShiftTransforms() 500 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms() 1662 m_ZExtOrSelf(m_Sub(m_Constant(C1), in foldVariableSignZeroExtensionOfVariableHighBitExtract() 1664 m_ZExtOrSelf(m_Sub(m_Constant(C2), in foldVariableSignZeroExtensionOfVariableHighBitExtract() 1683 m_Sub(m_Constant(C0), m_ZExtOrSelf(m_Specific(NBits))))) || in foldVariableSignZeroExtensionOfVariableHighBitExtract()
|
| H A D | InstCombineAndOrXor.cpp | 1278 if (!match(Cmp0, m_ICmp(Pred0, m_Value(X), m_Constant(C))) || in foldAndOrOfICmpsWithConstEq() 1973 if (!match(Op0, m_OneUse(m_Add(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1974 !match(Op0, m_OneUse(m_Mul(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1975 !match(Op0, m_OneUse(m_LShr(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1976 !match(Op0, m_OneUse(m_Shl(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp() 1977 !match(Op0, m_OneUse(m_Sub(m_Constant(C), m_Specific(Op1))))) in narrowMaskedBinOp() 2942 if (match(L, m_Constant(LC)) && match(R, m_Constant(RC)) && in convertOrOfShiftsToFunnelShift() 3205 if (match(A, m_Constant(AConst)) && match(B, m_Constant(BConst))) in getSelectCondition() 3239 if (match(A, (m_Xor(m_SExt(m_Value(Cond)), m_Constant(AConst)))) && in getSelectCondition() 3240 match(B, (m_Xor(m_SExt(m_Specific(Cond)), m_Constant(BConst)))) && in getSelectCondition() [all …]
|
| H A D | InstCombineAddSub.cpp | 814 if (!match(Op1, m_Constant(Op1C))) in foldNoWrapAdd() 839 m_NSWAddLike(m_Value(X), m_Constant(NarrowC)))))) { in foldNoWrapAdd() 847 m_OneUse(m_ZExt(m_NUWAddLike(m_Value(X), m_Constant(NarrowC)))))) { in foldNoWrapAdd() 870 if (match(Op0, m_Sub(m_Constant(Op00C), m_Value(X)))) in foldAddWithConstant() 1424 m_Shl(m_Constant(SignExtendingValueBaseConstant), in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract() 2601 if (match(Op0, m_OneUse(m_And(m_Specific(Op1), m_Constant(C))))) { in visitSub() 2907 if (match(FNegOp, m_FMul(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant() 2917 if (match(FNegOp, m_FDiv(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant() 2921 if (match(FNegOp, m_FDiv(m_Constant(C), m_Value(X)))) in foldFNegIntoConstant() 2936 if (I.hasNoSignedZeros() && match(FNegOp, m_FAdd(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant() [all …]
|
| H A D | InstructionCombining.cpp | 385 if (!match(BinOp1->getOperand(1), m_Constant(C1)) || in simplifyAssocCastAssoc() 386 !match(BinOp2->getOperand(1), m_Constant(C2))) in simplifyAssocCastAssoc() 580 match(Op0, m_OneUse(m_BinOp(m_Value(A), m_Constant(C1)))) && in SimplifyAssociativeOrCommutative() 581 match(Op1, m_OneUse(m_BinOp(m_Value(B), m_Constant(C2)))) && in SimplifyAssociativeOrCommutative() 1656 if (!match(BO.getOperand(1), m_Constant(Op1FpC)) && in foldFBinOpOfIntCasts() 2525 if (!Op0->hasOneUse() || !match(Op1, m_Constant(WideC))) in narrowMathIfNoOverflow() 2573 m_Select(m_Value(Cond), m_Constant(TrueC), m_Constant(FalseC)))) in foldSelectGEP() 5083 else if (match(U, m_Select(m_Specific(&I), m_Constant(), m_Value()))) in visitFreeze() 5126 if (match(Op0, m_Constant(C)) && C->containsUndefOrPoisonElement() && in visitFreeze()
|
| H A D | InstCombineCompares.cpp | 1209 if (match(Val, m_TruncOrSelf(m_Shr(m_Value(X), m_Constant(C))))) { in foldSignBitTest() 3105 m_Select(m_Value(A), m_Constant(C1), m_Constant(C2)))) || in foldICmpBinOpWithConstantViaTruthTable() 3107 m_Select(m_Value(B), m_Constant(C3), m_Constant(C4))) || in foldICmpBinOpWithConstantViaTruthTable() 6064 if (match(Op0, m_OneUse(m_Or(m_Value(X), m_Constant(C)))) && in foldICmpEquality() 7354 if (!LHS->hasOneUse() || !match(RHS, m_Constant(C))) in foldVectorCmp() 7508 if (match(Op0, m_Intrinsic<Intrinsic::abs>(m_Value(X), m_Constant(C))) && in foldICmpCommutative() 8677 if (match(Op0, m_Instruction(LHSI)) && match(Op1, m_Constant(RHSC))) { in visitFCmpInst() 8727 if (match(Op1, m_Constant(C))) in visitFCmpInst()
|
| H A D | InstCombineCalls.cpp | 1912 if (match(I0, m_ZExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst() 1962 if (match(I0, m_SExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst() 2495 if (match(Arg1, m_Constant(C)) && C->isNotMinSignedValue()) { in visitCallInst() 2555 if (IID == Intrinsic::ssub_sat && match(Arg1, m_Constant(C)) && in visitCallInst()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | Reassociate.cpp | 825 if (match(TheNeg, m_BinOp(m_Constant(C), m_Value())) && in NegateValue() 2030 if (match(I->getOperand(0), m_Constant())) in getNegatibleInsts() 2042 if (match(I->getOperand(0), m_Constant()) && in getNegatibleInsts() 2043 match(I->getOperand(1), m_Constant())) in getNegatibleInsts() 2086 assert(!match(Negatible->getOperand(1), m_Constant()) && in canonicalizeNegFPConstantsForOp() 2093 assert(!match(Negatible->getOperand(0), m_Constant()) && in canonicalizeNegFPConstantsForOp()
|
| H A D | CallSiteSplitting.cpp | 137 if (!match(Cond, m_ICmp(Pred, m_Value(), m_Constant()))) in recordCondition()
|
| H A D | JumpThreading.cpp | 596 if (!PredCst && match(V, m_Cmp(Pred, m_Value(Val), m_Constant(Cst)))) in computeValueKnownInPredecessorsImpl()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | TargetTransformInfoImpl.h | 491 if (match(I, m_Select(m_Value(), m_Constant(), m_Constant()))) in shouldTreatInstructionLikeSelect()
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | InstructionSimplify.cpp | 1956 if ((match(Op0, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub() 1957 match(Op1, m_Sub(m_Constant(C2), m_Specific(X)))) || in simplifyLogicOfAddSub() 1958 (match(Op1, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub() 1959 match(Op0, m_Sub(m_Constant(C2), m_Specific(X))))) { in simplifyLogicOfAddSub() 4952 match(TrueVal, m_Constant(TrueC)) && in simplifySelectInst() 4953 match(FalseVal, m_Constant(FalseC))) { in simplifySelectInst() 5514 if (!Scalable && match(Op0, m_InsertElt(m_Value(), m_Constant(C), in simplifyShuffleVectorInst()
|
| H A D | VectorUtils.cpp | 361 if (match(V, m_Add(m_Value(Val), m_Constant(C)))) in findScalarElement()
|
| H A D | ValueTracking.cpp | 8805 if (match(CmpI->getOperand(1), m_Constant(CmpConst)) && in lookThroughCastConst() 10098 } else if (match(RHS, m_Constant())) in findValuesAffectedByCondition()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
| H A D | VectorCombine.cpp | 1127 if (match(Op.get(), m_InsertElt(m_Constant(VecC), m_Value(V), in scalarizeOpOrCmp() 1145 } else if (match(Op.get(), m_Constant(VecC))) { in scalarizeOpOrCmp() 1275 if (!match(B0, m_Cmp(P0, m_Instruction(I0), m_Constant(C0))) || in foldExtractedCmps() 1276 !match(B1, m_Cmp(P1, m_Instruction(I1), m_Constant(C1)))) in foldExtractedCmps()
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 1506 if (match(IVInc, m_Add(m_Instruction(LHS), m_Constant(Step))) || in matchIncrement() 1508 m_Instruction(LHS), m_Constant(Step))))) in matchIncrement() 1510 if (match(IVInc, m_Sub(m_Instruction(LHS), m_Constant(Step))) || in matchIncrement() 1512 m_Instruction(LHS), m_Constant(Step))))) { in matchIncrement()
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | PatternMatch.h | 165 inline class_match<Constant> m_Constant() { return class_match<Constant>(); } in m_Constant() function 848 inline bind_ty<Constant> m_Constant(Constant *&C) { return C; } in m_Constant() function
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
| H A D | ARMTargetTransformInfo.cpp | 196 PatternMatch::m_Constant(XorMask))) && in instCombineIntrinsic()
|