Home
last modified time | relevance | path

Searched refs:m_Constant (Results 1 – 21 of 21) sorted by relevance

/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp226 if (match(&I, m_Mul(m_Shl(m_Value(NewOp), m_Constant(C2)), in visitMul()
227 m_Constant(C1))) && in visitMul()
240 if (match(&I, m_Mul(m_Value(NewOp), m_Constant(C1)))) { in visitMul()
582 if (match(Op1, m_Constant(C)) && C->isFiniteNonZeroFP()) { in foldFMulReassoc()
584 if (match(Op0, m_OneUse(m_FDiv(m_Constant(C1), m_Value(X))))) { in foldFMulReassoc()
591 if (match(Op0, m_FDiv(m_Value(X), m_Constant(C1)))) { in foldFMulReassoc()
787 if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_Constant(C))) in visitFMul()
1353 match(D, m_Constant(C))) { in narrowUDivURem()
1364 match(N, m_Constant(C))) { in narrowUDivURem()
1590 if (!match(I.getOperand(1), m_Constant(C))) in foldFDivConstantDivisor()
[all …]
H A DInstCombineShifts.cpp357 if (!match(I.getOperand(1), m_Constant(C1))) in foldShiftOfShiftedBinOp()
375 return match(V, m_BinOp(ShiftOpcode, m_Value(X), m_Constant(C0))) && in foldShiftOfShiftedBinOp()
439 if (match(Op0, m_Constant(C)) && in commonShiftTransforms()
440 match(Op1, m_NUWAdd(m_Value(A), m_Constant(C1)))) { in commonShiftTransforms()
489 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms()
1203 if (match(Op1, m_Constant(C1))) { in visitShl()
1207 if (match(Op0, m_Mul(m_Value(X), m_Constant(C2)))) in visitShl()
1516 m_ZExtOrSelf(m_Sub(m_Constant(C1), in foldVariableSignZeroExtensionOfVariableHighBitExtract()
1518 m_ZExtOrSelf(m_Sub(m_Constant(C2), in foldVariableSignZeroExtensionOfVariableHighBitExtract()
1537 m_Sub(m_Constant(C0), m_ZExtOrSelf(m_Specific(NBits))))) || in foldVariableSignZeroExtensionOfVariableHighBitExtract()
H A DInstCombineCasts.cpp559 if (match(BinOp0, m_Constant(C))) { in narrowBinOp()
565 if (match(BinOp1, m_Constant(C))) { in narrowBinOp()
745 if (match(Src, m_OneUse(m_LShr(m_Value(X), m_Constant(C))))) { in visitTrunc()
764 if (match(Src, m_LShr(m_SExt(m_Value(A)), m_Constant(C)))) { in visitTrunc()
814 if (match(Src, m_Shl(m_Value(A), m_Constant(C))) && in visitTrunc()
815 !match(A, m_Shr(m_Value(), m_Constant()))) { in visitTrunc()
1198 if (match(Src, m_OneUse(m_And(m_Trunc(m_Value(X)), m_Constant(C)))) && in visitZExt()
1204 if (match(Src, m_OneUse(m_Xor(m_Value(And), m_Constant(C)))) && in visitZExt()
1216 if (match(Src, m_And(m_Trunc(m_Value(X)), m_Constant(C))) && in visitZExt()
1479 if (match(Src, m_AShr(m_Shl(m_Trunc(m_Value(A)), m_Constant(BA)), in visitSExt()
[all …]
H A DInstCombineVectorOps.cpp1387 match(InsElt2.getOperand(1), m_Constant(ScalarC)) && in hoistInsEltConst()
1409 if (!match(Shuf->getOperand(1), m_Constant(ShufConstVec)) || in foldConstantInsEltIntoShuffle()
1410 !match(InsElt.getOperand(1), m_Constant(InsEltScalar)) || in foldConstantInsEltIntoShuffle()
1466 !match(InsElt.getOperand(1), m_Constant(Val[0])) || in foldConstantInsEltIntoShuffle()
1468 !match(IEI->getOperand(1), m_Constant(Val[1]))) in foldConstantInsEltIntoShuffle()
2063 if (match(BO1, m_Constant(C))) { in getAlternateBinop()
2145 if (match(Op0, m_BinOp(m_Specific(Op1), m_Constant(C)))) in foldSelectShuffleWith1Binop()
2147 else if (match(Op1, m_BinOp(m_Specific(Op0), m_Constant(C)))) in foldSelectShuffleWith1Binop()
2257 if (match(B0, m_BinOp(m_Constant(C0), m_Value(X))) && in foldSelectShuffle()
2258 match(B1, m_BinOp(m_Constant(C1), m_Value(Y)))) in foldSelectShuffle()
[all …]
H A DInstCombineAddSub.cpp814 if (!match(Op1, m_Constant(Op1C))) in foldNoWrapAdd()
832 if (match(Op0, m_OneUse(m_SExt(m_NSWAdd(m_Value(X), m_Constant(NarrowC)))))) { in foldNoWrapAdd()
863 if (match(Op0, m_Sub(m_Constant(Op00C), m_Value(X)))) in foldAddWithConstant()
1303 m_ZExtOrSelf(m_Sub(m_Constant(C), m_ZExtOrSelf(m_Value(NBits))))) || in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract()
1347 m_Shl(m_Constant(SignExtendingValueBaseConstant), in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract()
2445 if (match(Op0, m_OneUse(m_And(m_Specific(Op1), m_Constant(C))))) { in visitSub()
2673 if (match(FNegOp, m_FMul(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant()
2677 if (match(FNegOp, m_FDiv(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant()
2681 if (match(FNegOp, m_FDiv(m_Constant(C), m_Value(X)))) in foldFNegIntoConstant()
2915 if (match(Op0, m_FMul(m_Specific(Op1), m_Constant(C)))) { in visitFSub()
[all …]
H A DInstCombineAndOrXor.cpp1187 if (!match(Cmp0, m_ICmp(Pred0, m_Value(X), m_Constant(C))) || in foldAndOrOfICmpsWithConstEq()
1837 if (!match(Op0, m_OneUse(m_Add(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp()
1838 !match(Op0, m_OneUse(m_Mul(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp()
1841 !match(Op0, m_OneUse(m_Sub(m_Constant(C), m_Specific(Op1))))) in narrowMaskedBinOp()
2775 if (match(L, m_Constant(LC)) && match(R, m_Constant(RC)) && in matchFunnelShift()
3017 if (match(A, m_Constant(AConst)) && match(B, m_Constant(BConst))) in getSelectCondition()
4126 if (D->hasOneUse() && match(M, m_Constant(C))) { in visitMaskedMerge()
4387 if (match(NotVal, m_AShr(m_Constant(C), m_Value(Y))) && in foldNot()
4397 if (match(NotVal, m_LShr(m_Constant(C), m_Value(Y))) && in foldNot()
4558 if (match(Op1, m_Constant(C1))) { in visitXor()
[all …]
H A DInstCombineSelect.cpp62 if (!match(Sel.getCondition(), m_Cmp(Pred, m_Value(X), m_Constant(C)))) in foldSelectBinOpIdentity()
1369 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C0)))) in canonicalizeClampLike()
1423 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C1))))) in canonicalizeClampLike()
1434 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C2))))) in canonicalizeClampLike()
1541 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C0)))))) in tryToReuseConstantFromSelectInComparison()
1561 if (Pred == CmpInst::ICMP_ULT && match(X, m_Add(m_Value(), m_Constant()))) in tryToReuseConstantFromSelectInComparison()
1726 !match(TrueVal, m_Constant()) && !match(FalseVal, m_Constant()) && in foldSelectInstWithICmp()
2071 if (!match(Sel.getTrueValue(), m_Constant(C)) && in foldSelectExtConst()
2072 !match(Sel.getFalseValue(), m_Constant(C))) in foldSelectExtConst()
2118 if (!CondValTy || !match(CondVal, m_Constant(CondC))) in canonicalizeSelectToShuffle()
H A DInstructionCombining.cpp338 if (!match(BinOp1->getOperand(1), m_Constant(C1)) || in simplifyAssocCastAssoc()
339 !match(BinOp2->getOperand(1), m_Constant(C2))) in simplifyAssocCastAssoc()
533 match(Op0, m_OneUse(m_BinOp(m_Value(A), m_Constant(C1)))) && in SimplifyAssociativeOrCommutative()
534 match(Op1, m_OneUse(m_BinOp(m_Value(B), m_Constant(C2)))) && in SimplifyAssociativeOrCommutative()
627 if (match(Op, m_Shl(m_Value(), m_Constant(C)))) { in getBinOpsForFactorization()
1438 m_ICmp(Pred, m_Specific(Op), m_Constant(C))) && in constantFoldOperationIntoSelectOperand()
2076 if (!Op0->hasOneUse() || !match(Op1, m_Constant(WideC))) in narrowMathIfNoOverflow()
2126 m_Select(m_Value(Cond), m_Constant(TrueC), m_Constant(FalseC)))) in foldSelectGEP()
4157 else if (match(U, m_Select(m_Specific(&I), m_Constant(), m_Value()))) in visitFreeze()
4179 if (match(Op0, m_Constant(C)) && C->containsUndefOrPoisonElement()) { in visitFreeze()
H A DInstCombineCompares.cpp1180 if (match(Val, m_TruncOrSelf(m_Shr(m_Value(X), m_Constant(C))))) { in foldSignBitTest()
4069 if (!match(M, m_Constant())) // Can not do this fold with non-constant. in foldICmpWithLowBitMaskedVal()
4078 if (!match(M, m_Constant())) // Can not do this fold with non-constant. in foldICmpWithLowBitMaskedVal()
5331 if (match(Op0, m_OneUse(m_Or(m_Value(X), m_Constant(C)))) && in foldICmpEquality()
6741 if (!LHS->hasOneUse() || !match(RHS, m_Constant(C))) in foldVectorCmp()
6895 if (match(Op0, m_Intrinsic<Intrinsic::abs>(m_Value(X), m_Constant(C))) && in foldICmpCommutative()
7741 if (match(Op0, m_Instruction(LHSI)) && match(Op1, m_Constant(RHSC))) { in visitFCmpInst()
7772 if (match(Op1, m_Constant(C))) in visitFCmpInst()
H A DInstCombineCalls.cpp1638 if (match(I0, m_ZExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst()
1660 if (match(I0, m_SExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst()
2113 if (match(Arg1, m_Constant(C)) && C->isNotMinSignedValue()) { in visitCallInst()
2159 if (IID == Intrinsic::ssub_sat && match(Arg1, m_Constant(C)) && in visitCallInst()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/
H A DDomConditionCache.cpp39 if (match(Cond, m_ICmp(Pred, m_Value(A), m_Constant()))) { in findAffectedValues()
H A DInstructionSimplify.cpp1991 if ((match(Op0, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub()
1992 match(Op1, m_Sub(m_Constant(C2), m_Specific(X)))) || in simplifyLogicOfAddSub()
1993 (match(Op1, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub()
1994 match(Op0, m_Sub(m_Constant(C2), m_Specific(X))))) { in simplifyLogicOfAddSub()
4900 match(TrueVal, m_Constant(TrueC)) && in simplifySelectInst()
4901 match(FalseVal, m_Constant(FalseC))) { in simplifySelectInst()
5440 if (!Scalable && match(Op0, m_InsertElt(m_Value(), m_Constant(C), in simplifyShuffleVectorInst()
H A DVectorUtils.cpp212 if (match(V, m_Add(m_Value(Val), m_Constant(C)))) in findScalarElement()
H A DValueTracking.cpp7883 if (match(CmpI->getOperand(1), m_Constant(CmpConst)) && in lookThroughCast()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp891 if (!match(Ins0, m_InsertElt(m_Constant(VecC0), m_Value(V0), in scalarizeBinopOrCmp()
893 !match(Ins0, m_Constant(VecC0))) in scalarizeBinopOrCmp()
895 if (!match(Ins1, m_InsertElt(m_Constant(VecC1), m_Value(V1), in scalarizeBinopOrCmp()
897 !match(Ins1, m_Constant(VecC1))) in scalarizeBinopOrCmp()
1001 if (!match(B0, m_OneUse(m_Cmp(P0, m_Instruction(I0), m_Constant(C0)))) || in foldExtractedCmps()
1002 !match(B1, m_OneUse(m_Cmp(P1, m_Instruction(I1), m_Constant(C1)))) || in foldExtractedCmps()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp926 if (match(TheNeg, m_BinOp(m_Constant(C), m_Value())) && in NegateValue()
2112 if (match(I->getOperand(0), m_Constant())) in getNegatibleInsts()
2124 if (match(I->getOperand(0), m_Constant()) && in getNegatibleInsts()
2125 match(I->getOperand(1), m_Constant())) in getNegatibleInsts()
2168 assert(!match(Negatible->getOperand(1), m_Constant()) && in canonicalizeNegFPConstantsForOp()
2175 assert(!match(Negatible->getOperand(0), m_Constant()) && in canonicalizeNegFPConstantsForOp()
H A DCallSiteSplitting.cpp137 if (!match(Cond, m_ICmp(Pred, m_Value(), m_Constant()))) in recordCondition()
H A DJumpThreading.cpp599 if (!PredCst && match(V, m_Cmp(Pred, m_Value(Val), m_Constant(Cst)))) { in computeValueKnownInPredecessorsImpl()
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/IR/
H A DPatternMatch.h144 inline class_match<Constant> m_Constant() { return class_match<Constant>(); } in m_Constant() function
739 inline bind_ty<Constant> m_Constant(Constant *&C) { return C; } in m_Constant() function
760 return m_CombineAnd(m_Constant(), m_Unless(m_ConstantExpr())); in m_ImmConstant()
767 return m_CombineAnd(m_Constant(C), m_Unless(m_ConstantExpr())); in m_ImmConstant()
/freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp1507 if (match(IVInc, m_Add(m_Instruction(LHS), m_Constant(Step))) || in matchIncrement()
1509 m_Instruction(LHS), m_Constant(Step))))) in matchIncrement()
1511 if (match(IVInc, m_Sub(m_Instruction(LHS), m_Constant(Step))) || in matchIncrement()
1513 m_Instruction(LHS), m_Constant(Step))))) { in matchIncrement()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/ARM/
H A DARMTargetTransformInfo.cpp177 PatternMatch::m_Constant(XorMask))) && in instCombineIntrinsic()