Home
last modified time | relevance | path

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

/netbsd-src/external/apache2/llvm/dist/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()
469 if (match(Op0, m_OneUse(m_FDiv(m_Constant(C1), m_Value(X))))) { in visitFMul()
475 if (match(Op0, m_FDiv(m_Value(X), m_Constant(C1)))) { in visitFMul()
491 if (match(Op0, m_OneUse(m_FAdd(m_Value(X), m_Constant(C1))))) { in visitFMul()
[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()
1212 m_ZExtOrSelf(m_Sub(m_Constant(C1), in foldVariableSignZeroExtensionOfVariableHighBitExtract()
1214 m_ZExtOrSelf(m_Sub(m_Constant(C2), in foldVariableSignZeroExtensionOfVariableHighBitExtract()
1233 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()
854 if (match(Op0, m_OneUse(m_ZExt(m_NUWAdd(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()
1960 if (match(Op0, m_OneUse(m_And(m_Specific(Op1), m_Constant(C))))) { in visitSub()
2136 if (match(&I, m_FNeg(m_OneUse(m_FMul(m_Value(X), m_Constant(C)))))) in foldFNegIntoConstant()
2139 if (match(&I, m_FNeg(m_OneUse(m_FDiv(m_Value(X), m_Constant(C)))))) in foldFNegIntoConstant()
2142 if (match(&I, m_FNeg(m_OneUse(m_FDiv(m_Constant(C), m_Value(X)))))) in foldFNegIntoConstant()
[all …]
H A DInstCombineVectorOps.cpp1235 match(InsElt2.getOperand(1), m_Constant(ScalarC)) && in hoistInsEltConst()
1257 if (!match(Shuf->getOperand(1), m_Constant(ShufConstVec)) || in foldConstantInsEltIntoShuffle()
1258 !match(InsElt.getOperand(1), m_Constant(InsEltScalar)) || in foldConstantInsEltIntoShuffle()
1310 !match(InsElt.getOperand(1), m_Constant(Val[0])) || in foldConstantInsEltIntoShuffle()
1312 !match(IEI->getOperand(1), m_Constant(Val[1]))) in foldConstantInsEltIntoShuffle()
1772 if (match(BO1, m_Constant(C))) { in getAlternateBinop()
1799 if (match(Op0, m_BinOp(m_Specific(Op1), m_Constant(C)))) in foldSelectShuffleWith1Binop()
1801 else if (match(Op1, m_BinOp(m_Specific(Op0), m_Constant(C)))) in foldSelectShuffleWith1Binop()
1908 if (match(B0, m_BinOp(m_Value(X), m_Constant(C0))) && in foldSelectShuffle()
1909 match(B1, m_BinOp(m_Value(Y), m_Constant(C1)))) in foldSelectShuffle()
[all …]
H A DInstCombineCasts.cpp642 if (match(BinOp0, m_Constant(C))) { in narrowBinOp()
648 if (match(BinOp1, m_Constant(C))) { in narrowBinOp()
803 if (match(Src, m_OneUse(m_LShr(m_Value(X), m_Constant(C))))) { in visitTrunc()
810 if (match(Src, m_OneUse(m_c_Or(m_LShr(m_Value(X), m_Constant(C)), in visitTrunc()
823 if (match(Src, m_LShr(m_SExt(m_Value(A)), m_Constant(C)))) { in visitTrunc()
856 if (match(Src, m_OneUse(m_Shr(m_Trunc(m_Value(A)), m_Constant(C))))) { in visitTrunc()
888 if (match(Src, m_Shl(m_Value(A), m_Constant(C))) && in visitTrunc()
889 !match(A, m_Shr(m_Value(), m_Constant()))) { in visitTrunc()
1302 match(SrcI, m_OneUse(m_And(m_Trunc(m_Value(X)), m_Constant(C)))) && in visitZExt()
1308 if (SrcI && match(SrcI, m_OneUse(m_Xor(m_Value(And), m_Constant(C)))) && in visitZExt()
[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()
1752 !match(Op0, m_OneUse(m_LShr(m_Specific(Op1), m_Constant(C)))) && in narrowMaskedBinOp()
1753 !match(Op0, m_OneUse(m_Shl(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()
2331 if (match(A, (m_Xor(m_SExt(m_Value(Cond)), m_Constant(AConst)))) && in getSelectCondition()
2332 match(B, (m_Xor(m_SExt(m_Specific(Cond)), m_Constant(BConst)))) && in getSelectCondition()
[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()
492 match(Op0, m_OneUse(m_BinOp(m_Value(A), m_Constant(C1)))) && in SimplifyAssociativeOrCommutative()
493 match(Op1, m_OneUse(m_BinOp(m_Value(B), m_Constant(C2))))) { in SimplifyAssociativeOrCommutative()
585 if (match(Op, m_Shl(m_Value(), m_Constant(C)))) { in getBinOpsForFactorization()
1010 if (!match(A, m_Constant(ConstA)) || !match(B, m_Constant(ConstB))) in FoldOpIntoSelect()
1787 if (!Op0->hasOneUse() || !match(Op1, m_Constant(WideC))) in narrowMathIfNoOverflow()
1837 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.cpp948 if (match(I0, m_ZExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst()
971 if (match(I0, m_SExt(m_Value(X))) && match(I1, m_Constant(C)) && in visitCallInst()
989 if (match(I1, m_Constant(C)) && I0->hasOneUse()) { in visitCallInst()
1190 if (match(Arg1, m_Constant(C)) && C->isNotMinSignedValue()) { in visitCallInst()
1236 if (IID == Intrinsic::ssub_sat && match(Arg1, m_Constant(C)) && in visitCallInst()
H A DInstCombineCompares.cpp1335 if (match(Val, m_TruncOrSelf(m_Shr(m_Value(X), m_Constant(C))))) { in foldSignBitTest()
3388 if (!match(M, m_Constant())) // Can not do this fold with non-constant. in foldICmpWithLowBitMaskedVal()
3397 if (!match(M, m_Constant())) // Can not do this fold with non-constant. in foldICmpWithLowBitMaskedVal()
5519 if (!LHS->hasOneUse() || !match(RHS, m_Constant(C))) in foldVectorCmp()
6238 if (match(Op0, m_Instruction(LHSI)) && match(Op1, m_Constant(RHSC))) { in visitFCmpInst()
6274 if (match(Op1, m_Constant(C))) { in visitFCmpInst()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp587 if (!match(Ins0, m_InsertElt(m_Constant(VecC0), m_Value(V0), in scalarizeBinopOrCmp()
589 !match(Ins0, m_Constant(VecC0))) in scalarizeBinopOrCmp()
591 if (!match(Ins1, m_InsertElt(m_Constant(VecC1), m_Value(V1), in scalarizeBinopOrCmp()
593 !match(Ins1, m_Constant(VecC1))) in scalarizeBinopOrCmp()
692 if (!match(B0, m_OneUse(m_Cmp(P0, m_Instruction(I0), m_Constant(C0)))) || in foldExtractedCmps()
693 !match(B1, m_OneUse(m_Cmp(P1, m_Instruction(I1), m_Constant(C1)))) || in foldExtractedCmps()
/netbsd-src/external/apache2/llvm/dist/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()
/netbsd-src/external/apache2/llvm/dist/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()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A DInstructionSimplify.cpp1959 if ((match(Op0, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub()
1960 match(Op1, m_Sub(m_Constant(C2), m_Specific(X)))) || in simplifyLogicOfAddSub()
1961 (match(Op1, m_Add(m_Value(X), m_Constant(C1))) && in simplifyLogicOfAddSub()
1962 match(Op0, m_Sub(m_Constant(C2), m_Specific(X))))) { in simplifyLogicOfAddSub()
4189 match(TrueVal, m_Constant(TrueC)) && in SimplifySelectInst()
4190 match(FalseVal, m_Constant(FalseC))) { in SimplifySelectInst()
4700 if (!Scalable && match(Op0, m_InsertElt(m_Value(), m_Constant(C), in SimplifyShuffleVectorInst()
H A DVectorUtils.cpp319 if (match(V, m_Add(m_Value(Val), m_Constant(C)))) in findScalarElement()
H A DValueTracking.cpp6044 if (match(CmpI->getOperand(1), m_Constant(CmpConst)) && in lookThroughCast()
/netbsd-src/external/apache2/llvm/dist/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()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/ARM/
H A DARMTargetTransformInfo.cpp175 PatternMatch::m_Constant(XorMask))) && in instCombineIntrinsic()