Home
last modified time | relevance | path

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

/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp172 if (match(&I, m_Mul(m_Shl(m_Value(NewOp), m_Constant(C2)), in visitMul()
173 m_Constant(C1))) && in visitMul()
187 if (match(&I, m_Mul(m_Value(NewOp), m_Constant(C1)))) { in visitMul()
224 if (match(Op0, m_OneUse(m_Add(m_Value(X), m_Constant(C1))))) { in visitMul()
248 if (match(Op0, m_Neg(m_Value(X))) && match(Op1, m_Constant(Op1C))) in visitMul()
457 if (match(Op0, m_FNeg(m_Value(X))) && match(Op1, m_Constant(C))) in visitFMul()
467 if (match(Op1, m_Constant(C)) && C->isFiniteNonZeroFP()) { in visitFMul()
475 if (match(Op0, m_FDiv(m_Value(X), m_Constant(C1)))) { in visitFMul()
915 if (!match(ShiftLeft, m_Shl(m_Constant(CI), m_Value(N)))) in foldUDivShl()
1224 if (!match(I.getOperand(1), m_Constant(C))) in foldFDivConstantDivisor()
[all …]
H A DInstCombineShifts.cpp338 if (!match(I.getOperand(1), m_Constant(C1))) in foldShiftOfShiftedLogic()
352 match(V, m_OneUse(m_Shift(m_Value(X), m_Constant(C0)))) && in foldShiftOfShiftedLogic()
405 if (match(Op0, m_Constant()) && match(Op1, m_Add(m_Value(A), m_Constant(C)))) in commonShiftTransforms()
414 if (Op1->hasOneUse() && match(Op1, m_SRem(m_Value(A), m_Constant(C))) && in commonShiftTransforms()
1011 if (match(Op1, m_Constant(C1))) { in visitShl()
1015 if (match(Op0, m_OneUse(m_Shl(m_Constant(C2), m_Value(X))))) in visitShl()
1019 if (match(Op0, m_Mul(m_Value(X), m_Constant(C2)))) in visitShl()
1216 m_ZExtOrSelf(m_Sub(m_Constant(C1), in foldVariableSignZeroExtensionOfVariableHighBitExtract()
1218 m_ZExtOrSelf(m_Sub(m_Constant(C2), in foldVariableSignZeroExtensionOfVariableHighBitExtract()
1237 m_Sub(m_Constant(C0), m_ZExtOrSelf(m_Specific(NBits))))) || in foldVariableSignZeroExtensionOfVariableHighBitExtract()
H A DInstCombineAddSub.cpp829 if (!match(Op1, m_Constant(Op1C))) in foldNoWrapAdd()
847 if (match(Op0, m_OneUse(m_SExt(m_NSWAdd(m_Value(X), m_Constant(NarrowC)))))) { in foldNoWrapAdd()
877 if (match(Op0, m_Sub(m_Constant(Op00C), m_Value(X)))) in foldAddWithConstant()
1187 m_ZExtOrSelf(m_Sub(m_Constant(C), m_ZExtOrSelf(m_Value(NBits))))) || in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract()
1231 m_Shl(m_Constant(SignExtendingValueBaseConstant), in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract()
1981 if (match(Op0, m_OneUse(m_And(m_Specific(Op1), m_Constant(C))))) { in visitSub()
2161 if (match(FNegOp, m_FMul(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant()
2164 if (match(FNegOp, m_FDiv(m_Value(X), m_Constant(C)))) in foldFNegIntoConstant()
2167 if (match(FNegOp, m_FDiv(m_Constant(C), m_Value(X)))) { in foldFNegIntoConstant()
2361 if (match(Op0, m_FMul(m_Specific(Op1), m_Constant(C)))) { in visitFSub()
[all …]
H A DInstCombineVectorOps.cpp1295 match(InsElt2.getOperand(1), m_Constant(ScalarC)) && in hoistInsEltConst()
1317 if (!match(Shuf->getOperand(1), m_Constant(ShufConstVec)) || in foldConstantInsEltIntoShuffle()
1370 !match(InsElt.getOperand(1), m_Constant(Val[0])) || in foldConstantInsEltIntoShuffle()
1372 !match(IEI->getOperand(1), m_Constant(Val[1]))) in foldConstantInsEltIntoShuffle()
1832 if (match(BO1, m_Constant(C))) { in getAlternateBinop()
1859 if (match(Op0, m_BinOp(m_Specific(Op1), m_Constant(C)))) in foldSelectShuffleWith1Binop()
1861 else if (match(Op1, m_BinOp(m_Specific(Op0), m_Constant(C)))) in foldSelectShuffleWith1Binop()
1968 if (match(B0, m_BinOp(m_Value(X), m_Constant(C0))) && in foldSelectShuffle()
1969 match(B1, m_BinOp(m_Value(Y), m_Constant(C1)))) in foldSelectShuffle()
1971 else if (match(B0, m_BinOp(m_Constant(C0), m_Value(X))) && in foldSelectShuffle()
[all …]
H A DInstCombineAndOrXor.cpp1174 if (!match(Cmp0, m_ICmp(Pred0, m_Value(X), m_Constant(C))) || in foldAndOrOfICmpsWithConstEq()
1750 if (!match(Op0, m_OneUse(m_Add(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp()
1751 !match(Op0, m_OneUse(m_Mul(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp()
1754 !match(Op0, m_OneUse(m_Sub(m_Constant(C), m_Specific(Op1))))) in narrowMaskedBinOp()
2150 if (match(L, m_Constant(LC)) && match(R, m_Constant(RC)) && in matchFunnelShift()
2307 if (match(A, m_Constant(AConst)) && match(B, m_Constant(BConst))) in getSelectCondition()
3163 if (D->hasOneUse() && match(M, m_Constant(C))) { in visitMaskedMerge()
3379 if (match(NotVal, m_AShr(m_Constant(C), m_Value(Y))) && in visitXor()
3389 if (match(NotVal, m_LShr(m_Constant(C), m_Value(Y))) && in visitXor()
3416 if (match(Op1, m_Constant(C1))) { in visitXor()
[all …]
H A DInstCombineCasts.cpp660 if (match(BinOp0, m_Constant(C))) { in narrowBinOp()
666 if (match(BinOp1, m_Constant(C))) { in narrowBinOp()
821 if (match(Src, m_OneUse(m_LShr(m_Value(X), m_Constant(C))))) { in visitTrunc()
828 if (match(Src, m_OneUse(m_c_Or(m_LShr(m_Value(X), m_Constant(C)), in visitTrunc()
841 if (match(Src, m_LShr(m_SExt(m_Value(A)), m_Constant(C)))) { in visitTrunc()
874 if (match(Src, m_OneUse(m_Shr(m_Trunc(m_Value(A)), m_Constant(C))))) { in visitTrunc()
906 if (match(Src, m_Shl(m_Value(A), m_Constant(C))) && in visitTrunc()
907 !match(A, m_Shr(m_Value(), m_Constant()))) { in visitTrunc()
1593 if (match(Src, m_AShr(m_Shl(m_Trunc(m_Value(A)), m_Constant(BA)), in visitSExt()
1594 m_Constant(CA))) && in visitSExt()
[all …]
H A DInstructionCombining.cpp331 if (!match(BinOp1->getOperand(1), m_Constant(C1)) || in simplifyAssocCastAssoc()
332 !match(BinOp2->getOperand(1), m_Constant(C2))) in simplifyAssocCastAssoc()
511 match(Op0, m_OneUse(m_BinOp(m_Value(A), m_Constant(C1)))) && in SimplifyAssociativeOrCommutative()
512 match(Op1, m_OneUse(m_BinOp(m_Value(B), m_Constant(C2))))) { in SimplifyAssociativeOrCommutative()
604 if (match(Op, m_Shl(m_Value(), m_Constant(C)))) { in getBinOpsForFactorization()
1051 if (!match(A, m_Constant(ConstA)) || !match(B, m_Constant(ConstB))) in FoldOpIntoSelect()
1828 if (!Op0->hasOneUse() || !match(Op1, m_Constant(WideC))) in narrowMathIfNoOverflow()
1878 m_Select(m_Value(Cond), m_Constant(TrueC), m_Constant(FalseC)))) in foldSelectGEP()
H A DInstCombineSelect.cpp67 if (!match(Sel.getCondition(), m_Cmp(Pred, m_Value(X), m_Constant(C)))) in foldSelectBinOpIdentity()
1244 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C0)))) in canonicalizeClampLike()
1287 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C1))))) in canonicalizeClampLike()
1298 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C2))))) in canonicalizeClampLike()
1377 m_CombineAnd(m_AnyIntegralConstant(), m_Constant(C0)))))) in tryToReuseConstantFromSelectInComparison()
1914 if (!match(Sel.getTrueValue(), m_Constant(C)) && in foldSelectExtConst()
1915 !match(Sel.getFalseValue(), m_Constant(C))) in foldSelectExtConst()
1979 if (!CondValTy || !match(CondVal, m_Constant(CondC))) in canonicalizeSelectToShuffle()
H A DInstCombineCalls.cpp978 if (match(I0, m_ZExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst()
1001 if (match(I0, m_SExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst()
1019 if (match(I1, m_Constant(C)) && I0->hasOneUse()) { in visitCallInst()
1225 if (match(Arg1, m_Constant(C)) && C->isNotMinSignedValue()) { in visitCallInst()
1271 if (IID == Intrinsic::ssub_sat && match(Arg1, m_Constant(C)) && in visitCallInst()
H A DInstCombineCompares.cpp1358 if (match(Val, m_TruncOrSelf(m_Shr(m_Value(X), m_Constant(C))))) { in foldSignBitTest()
3456 if (!match(M, m_Constant())) // Can not do this fold with non-constant. in foldICmpWithLowBitMaskedVal()
3465 if (!match(M, m_Constant())) // Can not do this fold with non-constant. in foldICmpWithLowBitMaskedVal()
5628 if (!LHS->hasOneUse() || !match(RHS, m_Constant(C))) in foldVectorCmp()
6347 if (match(Op0, m_Instruction(LHSI)) && match(Op1, m_Constant(RHSC))) { in visitFCmpInst()
6383 if (match(Op1, m_Constant(C))) { in visitFCmpInst()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp590 if (!match(Ins0, m_InsertElt(m_Constant(VecC0), m_Value(V0), in scalarizeBinopOrCmp()
592 !match(Ins0, m_Constant(VecC0))) in scalarizeBinopOrCmp()
594 if (!match(Ins1, m_InsertElt(m_Constant(VecC1), m_Value(V1), in scalarizeBinopOrCmp()
596 !match(Ins1, m_Constant(VecC1))) in scalarizeBinopOrCmp()
695 if (!match(B0, m_OneUse(m_Cmp(P0, m_Instruction(I0), m_Constant(C0)))) || in foldExtractedCmps()
696 !match(B1, m_OneUse(m_Cmp(P1, m_Instruction(I1), m_Constant(C1)))) || in foldExtractedCmps()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp2059 if (match(I->getOperand(0), m_Constant())) in getNegatibleInsts()
2071 if (match(I->getOperand(0), m_Constant()) && in getNegatibleInsts()
2072 match(I->getOperand(1), m_Constant())) in getNegatibleInsts()
2115 assert(!match(Negatible->getOperand(1), m_Constant()) && in canonicalizeNegFPConstantsForOp()
2122 assert(!match(Negatible->getOperand(0), m_Constant()) && in canonicalizeNegFPConstantsForOp()
H A DCallSiteSplitting.cpp139 if (!match(Cond, m_ICmp(Pred, m_Value(), m_Constant()))) in recordCondition()
/freebsd-13.1/contrib/llvm-project/llvm/include/llvm/IR/
H A DPatternMatch.h142 inline class_match<Constant> m_Constant() { return class_match<Constant>(); } in m_Constant() function
761 inline bind_ty<Constant> m_Constant(Constant *&C) { return C; } in m_Constant() function
782 return m_CombineAnd(m_Constant(), m_Unless(m_ConstantExpr())); in m_ImmConstant()
789 return m_CombineAnd(m_Constant(C), m_Unless(m_ConstantExpr())); in m_ImmConstant()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp1987 if ((match(Op0, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub()
1988 match(Op1, m_Sub(m_Constant(C2), m_Specific(X)))) || in simplifyLogicOfAddSub()
1989 (match(Op1, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub()
1990 match(Op0, m_Sub(m_Constant(C2), m_Specific(X))))) { in simplifyLogicOfAddSub()
4261 match(TrueVal, m_Constant(TrueC)) && in SimplifySelectInst()
4262 match(FalseVal, m_Constant(FalseC))) { in SimplifySelectInst()
4776 if (!Scalable && match(Op0, m_InsertElt(m_Value(), m_Constant(C), in SimplifyShuffleVectorInst()
H A DVectorUtils.cpp329 if (match(V, m_Add(m_Value(Val), m_Constant(C)))) in findScalarElement()
H A DValueTracking.cpp6102 if (match(CmpI->getOperand(1), m_Constant(CmpConst)) && in lookThroughCast()
/freebsd-13.1/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp1313 if (match(IVInc, m_Add(m_Instruction(LHS), m_Constant(Step))) || in matchIncrement()
1315 m_Instruction(LHS), m_Constant(Step))))) in matchIncrement()
1317 if (match(IVInc, m_Sub(m_Instruction(LHS), m_Constant(Step))) || in matchIncrement()
1319 m_Instruction(LHS), m_Constant(Step))))) { in matchIncrement()
/freebsd-13.1/contrib/llvm-project/llvm/lib/Target/ARM/
H A DARMTargetTransformInfo.cpp175 PatternMatch::m_Constant(XorMask))) && in instCombineIntrinsic()