Home
last modified time | relevance | path

Searched refs:m_ImmConstant (Results 1 – 17 of 17) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineNegator.cpp216 if (match(Sel->getTrueValue(), m_ImmConstant(TrueC)) && in visitImpl()
217 match(Sel->getFalseValue(), m_ImmConstant(FalseC))) { in visitImpl()
235 (I->hasOneUse() || match(I->getOperand(0), m_ImmConstant()))) { in visitImpl()
267 m_LShr(m_Value(X), m_ImmConstant(ShAmt)))), in visitImpl()
411 if (!match(I->getOperand(1), m_ImmConstant(Op1C)) || !IsTrulyNegation) in visitImpl()
H A DInstCombineAddSub.cpp860 if (!match(Op1, m_ImmConstant(Op1C))) in foldAddWithConstant()
913 if (match(Op0, m_DisjointOr(m_Value(X), m_ImmConstant(Op01C)))) { in foldAddWithConstant()
1576 if (match(&I, m_c_Add(m_Add(m_Value(A), m_ImmConstant(C1)), in visitAdd()
1577 m_Sub(m_ImmConstant(C2), m_Value(B)))) && in visitAdd()
1585 if (match(&I, m_c_Add(m_OneUse(m_Sub(m_ImmConstant(C1), m_Value(A))), in visitAdd()
1714 m_Value(Cond), m_ICmp(Pred, m_Deferred(A), m_ImmConstant(C))); in visitAdd()
1967 if (match(&I, m_c_FAdd(m_FMul(m_Value(X), m_ImmConstant(MulC)), in visitFAdd()
2149 if (match(Op0, m_ImmConstant(C))) { in visitSub()
2154 if (match(Op1, m_Add(m_Value(X), m_ImmConstant(C2)))) { in visitSub()
2257 if (match(Op0, m_OneUse(m_Add(m_Value(X), m_ImmConstant(CX)))) && in visitSub()
[all …]
H A DInstCombineMulDivRem.cpp230 if (match(&I, m_Mul(m_Shl(m_Value(NewOp), m_ImmConstant(C2)), in visitMul()
231 m_ImmConstant(C1))) && in visitMul()
304 if (match(Op1, m_ImmConstant(MulC))) { in visitMul()
309 if (match(Op0, m_OneUse(m_AddLike(m_Value(X), m_ImmConstant(C1))))) { in visitMul()
482 if (match(Op1, m_ImmConstant(ImmC))) { in visitMul()
1185 if (match(Op0, m_ImmConstant()) && in commonIDivTransforms()
1186 match(Op1, m_Select(m_Value(), m_ImmConstant(), m_ImmConstant()))) { in commonIDivTransforms()
2127 if (match(Op0, m_ImmConstant()) && in commonIRemTransforms()
2128 match(Op1, m_Select(m_Value(), m_ImmConstant(), m_ImmConstant()))) { in commonIRemTransforms()
H A DInstCombineCalls.cpp553 if (match(Op0, m_Shl(m_ImmConstant(C), m_Value(X))) && in foldCttzCtlz()
561 if (match(Op0, m_Exact(m_LShr(m_ImmConstant(C), m_Value(X)))) && in foldCttzCtlz()
576 if (match(Op0, m_LShr(m_ImmConstant(C), m_Value(X))) && in foldCttzCtlz()
584 if (match(Op0, m_NUWShl(m_ImmConstant(C), m_Value(X))) && in foldCttzCtlz()
1236 if (!match(LHS->getArgOperand(1), m_ImmConstant(C0)) || in reassociateMinMaxWithConstants()
1237 !match(II->getArgOperand(1), m_ImmConstant(C1))) in reassociateMinMaxWithConstants()
1269 m_MaxOrMin(m_Value(X), m_ImmConstant(C)))), in reassociateMinMaxWithConstantInOperand()
1277 match(X, m_ImmConstant()) || match(Y, m_ImmConstant())) in reassociateMinMaxWithConstantInOperand()
2045 if (match(II->getArgOperand(2), m_ImmConstant(ShAmtC))) { in visitCallInst()
2257 match(Arg0, m_NUWSub(m_ImmConstant(C), m_Value(A))) && in visitCallInst()
[all …]
H A DInstCombineShifts.cpp379 (V->hasOneUse() || match(W, m_ImmConstant())) && in foldShiftOfShiftedBinOp()
574 if (match(V, m_ImmConstant())) in canEvaluateShifted()
774 if (match(Op0, m_BinOp(I.getOpcode(), m_ImmConstant(C2), m_Value(X)))) { in FoldShiftByConstant()
1224 if (match(Op1, m_ImmConstant(C1))) { in visitShl()
1228 if (match(Op0, m_Mul(m_Value(X), m_ImmConstant(C2)))) in visitShl()
H A DInstructionCombining.cpp645 if (match(Op, m_Shl(m_Value(), m_ImmConstant(C)))) { in getBinOpsForFactorization()
806 if (!match(I->getOperand(ConstIdx), m_ImmConstant(C))) in tryFoldInstWithCtpopWithNot()
990 if (!match(Shift, m_ImmConstant(CShift))) in foldBinOpShiftWithShift()
992 if (!match(Mask, m_ImmConstant(CMask))) in foldBinOpShiftWithShift()
1637 if (!match(BO0, m_SExt(m_Value(X))) || !match(BO1, m_ImmConstant(C)) || in foldBinopOfSextBoolToSelect()
1939 if (match(Phi0->getIncomingValue(0), m_ImmConstant(C0))) { in foldBinopWithPhiOperands()
1942 } else if (match(Phi0->getIncomingValue(1), m_ImmConstant(C0))) { in foldBinopWithPhiOperands()
1948 if (!match(Phi1->getIncomingValueForBlock(ConstBB), m_ImmConstant(C1))) in foldBinopWithPhiOperands()
2134 m_ImmConstant(C))) && in foldVectorBinop()
2533 if (match(V, m_ImmConstant(C))) in getFreelyInvertedImpl()
H A DInstCombineAndOrXor.cpp2173 if (!match(&I, m_c_BinOp(m_Shift(m_ImmConstant(ShiftedC1), m_Value(ShAmt)), in foldBinOpOfDisplacedShifts()
2174 m_Shift(m_ImmConstant(ShiftedC2), in foldBinOpOfDisplacedShifts()
2176 m_ImmConstant(AddC)))))) in foldBinOpOfDisplacedShifts()
2533 if (match(Op0, m_OneUse(m_LShr(m_Shl(m_ImmConstant(C1), m_Value(X)), in visitAnd()
2534 m_ImmConstant(C2)))) && in visitAnd()
2549 if (match(Op0, m_OneUse(m_Shl(m_LShr(m_ImmConstant(C1), m_Value(X)), in visitAnd()
2550 m_ImmConstant(C2)))) && in visitAnd()
4529 if (match(NotVal, m_Add(m_Value(X), m_ImmConstant(C)))) in foldNot()
4687 if (match(Op0, m_OneUse(m_Or(m_Value(X), m_ImmConstant(C2)))) && in visitXor()
4688 match(C1, m_ImmConstant())) { in visitXor()
[all …]
H A DInstCombineCasts.cpp233 return match(V, m_ImmConstant()); in canAlwaysEvaluateInType()
744 m_ImmConstant(C2))))) { in visitTrunc()
752 if (match(Src, m_OneUse(m_LShr(m_Value(X), m_ImmConstant(C))))) { in visitTrunc()
759 if (match(Src, m_OneUse(m_c_Or(m_LShr(m_Value(X), m_ImmConstant(C)), in visitTrunc()
1518 m_ImmConstant(CA))) && in visitSExt()
H A DInstCombineCompares.cpp1835 unsigned RequireUsesRemoved = match(B, m_ImmConstant()) ? 1 : 3; in foldICmpAndConstConst()
2054 if (Cmp.isEquality() && match(OrOp1, m_ImmConstant()) && in foldICmpOrConstant()
2895 if (Cmp.isEquality() && match(X, m_ImmConstant(SubC))) { in foldICmpSubConstant()
3751 (OneUses == 1 && match(IIOp0->getOperand(2), m_ImmConstant()) && in foldICmpIntrinsicWithIntrinsic()
3752 match(IIOp1->getOperand(2), m_ImmConstant()))) { in foldICmpIntrinsicWithIntrinsic()
4794 if (!match(Op1, m_ImmConstant())) in foldICmpAndXX()
4924 m_ImmConstant(C)))) && in foldICmpBinOp()
4931 m_ImmConstant(C)))) && in foldICmpBinOp()
5128 if (match(B, m_ImmConstant(Cst1)) && match(D, m_ImmConstant(Cst2)) && in foldICmpBinOp()
5645 (int(match(X, m_ImmConstant()) && match(Y, m_ImmConstant()))); in foldICmpEquality()
[all …]
H A DInstCombineSelect.cpp1316 if (match(V, m_ImmConstant()) && in foldSelectValueEquivalence()
1322 if (match(NewOp, m_ImmConstant()) || NewOp == V) { in foldSelectValueEquivalence()
1336 if (OldOp == CmpLHS && match(NewOp, m_ImmConstant()) && in foldSelectValueEquivalence()
1538 if (!match(ReplacementLow, m_ImmConstant(LowC)) || in canonicalizeClampLike()
1539 !match(ReplacementHigh, m_ImmConstant(HighC))) in canonicalizeClampLike()
H A DInstCombineSimplifyDemanded.cpp674 if (match(I->getOperand(0), m_LShr(m_ImmConstant(C), m_Value(X)))) { in SimplifyDemandedUseBits()
755 if (match(I->getOperand(0), m_Shl(m_ImmConstant(C), m_Value(X)))) { in SimplifyDemandedUseBits()
H A DInstCombineVectorOps.cpp2071 if (match(BO1, m_ImmConstant(C))) { in getAlternateBinop()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86InstCombineIntrinsic.cpp702 bool AIsConst = match(ArgA, m_ImmConstant()); in simplifyTernarylogic()
703 bool BIsConst = match(ArgB, m_ImmConstant()); in simplifyTernarylogic()
704 bool CIsConst = match(ArgC, m_ImmConstant()); in simplifyTernarylogic()
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DPatternMatch.h854 m_ImmConstant() { in m_ImmConstant() function
861 m_ImmConstant(Constant *&C) { in m_ImmConstant() function
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DInstructionSimplify.cpp3854 else if (match(RHS, m_ImmConstant())) { in simplifyICmpInst()
3933 else if (match(RHS, m_ImmConstant())) { in simplifyICmpInst()
6481 if (match(Op1, m_ImmConstant(C))) { in simplifyBinaryIntrinsic()
6504 if (match(Op0, m_ImmConstant())) in simplifyBinaryIntrinsic()
H A DValueTracking.cpp9090 if (L0 != R0 || match(L0, m_ImmConstant())) { in isImpliedCondICmps()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSimplifyCFG.cpp3599 m_CombineOr(m_Select(m_Value(), m_ImmConstant(), m_Value()), in FoldTwoEntryPHINode()
3600 m_Select(m_Value(), m_Value(), m_ImmConstant())))); in FoldTwoEntryPHINode()