Home
last modified time | relevance | path

Searched refs:CmpC (Results 1 – 8 of 8) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp1740 const APInt *CmpC; in foldSelectZeroOrOnes() local
1741 if (!match(Cmp->getOperand(1), m_APIntAllowPoison(CmpC))) in foldSelectZeroOrOnes()
1746 if (Cmp->getPredicate() == ICmpInst::ICMP_ULT && *CmpC == 2 && in foldSelectZeroOrOnes()
1751 if (Cmp->getPredicate() == ICmpInst::ICMP_UGT && *CmpC == 1 && in foldSelectZeroOrOnes()
1760 const APInt *CmpC; in foldSelectInstWithICmpConst() local
1763 if (!match(ICI, m_ICmp(Pred, m_Value(V), m_APInt(CmpC)))) in foldSelectInstWithICmpConst()
1771 if (CmpC->isMinValue() && match(TVal, m_SpecificInt(*CmpC + 1))) in foldSelectInstWithICmpConst()
1774 if (CmpC->isMaxValue() && match(TVal, m_SpecificInt(*CmpC - 1))) in foldSelectInstWithICmpConst()
1777 if (CmpC->isMinSignedValue() && match(TVal, m_SpecificInt(*CmpC + 1))) in foldSelectInstWithICmpConst()
1780 if (CmpC->isMaxSignedValue() && match(TVal, m_SpecificInt(*CmpC - 1))) in foldSelectInstWithICmpConst()
[all …]
H A DInstCombineSimplifyDemanded.cpp397 const APInt *CmpC; in SimplifyDemandedUseBits() local
398 if (!match(I->getOperand(0), m_ICmp(m_Value(X), m_APInt(CmpC))) || in SimplifyDemandedUseBits()
399 isa<Constant>(X) || CmpC->getBitWidth() != SelC->getBitWidth()) in SimplifyDemandedUseBits()
403 if (*CmpC == *SelC) in SimplifyDemandedUseBits()
407 if ((*CmpC & DemandedMask) == (*SelC & DemandedMask)) { in SimplifyDemandedUseBits()
408 I->setOperand(OpNo, ConstantInt::get(I->getType(), *CmpC)); in SimplifyDemandedUseBits()
H A DInstCombineCompares.cpp6916 const APInt *CmpC; in foldICmpUsingKnownBits() local
6917 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits()
6919 if (*CmpC == Op0Min + 1) in foldICmpUsingKnownBits()
6921 ConstantInt::get(Op1->getType(), *CmpC - 1)); in foldICmpUsingKnownBits()
6924 if (Op0Known.countMinTrailingZeros() >= CmpC->ceilLogBase2()) in foldICmpUsingKnownBits()
6933 const APInt *CmpC; in foldICmpUsingKnownBits() local
6934 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits()
6936 if (*CmpC == Op0Max - 1) in foldICmpUsingKnownBits()
6938 ConstantInt::get(Op1->getType(), *CmpC + 1)); in foldICmpUsingKnownBits()
6941 if (Op0Known.countMinTrailingZeros() >= CmpC->getActiveBits()) in foldICmpUsingKnownBits()
[all …]
H A DInstCombineAndOrXor.cpp2619 Constant *CmpC = ConstantExpr::getSub(LshrC, Log2C1); in visitAnd() local
2620 Value *Cmp = Builder.CreateICmpEQ(X, CmpC); in visitAnd()
2636 Constant *CmpC = ConstantExpr::getSub(ShlC, Log2C3); in visitAnd() local
2637 Value *Cmp = Builder.CreateICmpEQ(X, CmpC); in visitAnd()
H A DInstCombineCasts.cpp814 Constant *CmpC = ConstantExpr::getSub(C2, Log2C1); in visitTrunc() local
815 return new ICmpInst(ICmpInst::ICMP_EQ, X, CmpC); in visitTrunc()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp1738 const APInt *CmpC, *AddC; in combineToUSubWithOverflow() local
1740 match(B, m_APInt(CmpC)) && *AddC == -(*CmpC)) { in combineToUSubWithOverflow()
2278 auto *CmpC = dyn_cast<ConstantInt>(User->getOperand(1)); in sinkAndCmp0Expression() local
2279 if (!CmpC || !CmpC->isZero()) in sinkAndCmp0Expression()
8648 APInt CmpC = cast<ConstantInt>(Cmp->getOperand(1))->getValue(); in optimizeBranch() local
8661 if (CmpC.isPowerOf2() && Cmp->getPredicate() == ICmpInst::ICMP_ULT && in optimizeBranch()
8662 match(UI, m_Shr(m_Specific(X), m_SpecificInt(CmpC.logBase2())))) { in optimizeBranch()
8675 (match(UI, m_Add(m_Specific(X), m_SpecificInt(-CmpC))) || in optimizeBranch()
8676 match(UI, m_Sub(m_Specific(X), m_SpecificInt(CmpC))) || in optimizeBranch()
8677 match(UI, m_Xor(m_Specific(X), m_SpecificInt(CmpC))))) { in optimizeBranch()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp1344 SmallVector<Constant *, 32> CmpC(VecTy->getNumElements(), in foldExtractedCmps() local
1346 CmpC[Index0] = C0; in foldExtractedCmps()
1347 CmpC[Index1] = C1; in foldExtractedCmps()
1348 Value *VCmp = Builder.CreateCmp(Pred, X, ConstantVector::get(CmpC)); in foldExtractedCmps()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86ISelLowering.cpp46300 SDValue CmpC; in combinePredicateReduction() local
46304 CmpC = DAG.getConstant(0, DL, CmpVT); in combinePredicateReduction()
46308 CmpC = DAG.getConstant(APInt::getLowBitsSet(CmpVT.getSizeInBits(), NumElts), in combinePredicateReduction()
46316 SDValue Setcc = DAG.getSetCC(DL, SetccVT, Movmsk, CmpC, CondCode); in combinePredicateReduction()
56475 APInt CmpC; in combineSetCC() local
56477 if (ISD::isConstantSplatVector(RHS.getNode(), CmpC) && in combineSetCC()
56492 else if ((CC == ISD::SETULT && CmpC == 2) || in combineSetCC()
56493 (CC == ISD::SETULE && CmpC == 1)) { in combineSetCC()
56500 else if ((CC == ISD::SETUGT && (-CmpC) == 3) || in combineSetCC()
56501 (CC == ISD::SETUGE && (-CmpC) == 2)) { in combineSetCC()