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.cpp980 const APInt *C, *CmpC; in canonicalizeSaturatedAdd() local
983 match(FVal, m_AllOnes()) && match(Cmp1, m_APInt(CmpC)) && *CmpC == ~*C) { in canonicalizeSaturatedAdd()
1650 const APInt *CmpC; in foldSelectZeroOrOnes() local
1651 if (!match(Cmp->getOperand(1), m_APIntAllowPoison(CmpC))) in foldSelectZeroOrOnes()
1656 if (Cmp->getPredicate() == ICmpInst::ICMP_ULT && *CmpC == 2 && in foldSelectZeroOrOnes()
1661 if (Cmp->getPredicate() == ICmpInst::ICMP_UGT && *CmpC == 1 && in foldSelectZeroOrOnes()
1670 const APInt *CmpC; in foldSelectInstWithICmpConst() local
1673 if (!match(ICI, m_ICmp(Pred, m_Value(V), m_APInt(CmpC)))) in foldSelectInstWithICmpConst()
1681 if (CmpC->isMinValue() && match(TVal, m_SpecificInt(*CmpC + 1))) in foldSelectInstWithICmpConst()
1684 if (CmpC->isMaxValue() && match(TVal, m_SpecificInt(*CmpC - 1))) in foldSelectInstWithICmpConst()
[all …]
H A DInstCombineSimplifyDemanded.cpp390 const APInt *CmpC; in SimplifyDemandedUseBits() local
392 if (!match(I->getOperand(0), m_ICmp(Pred, m_Value(X), m_APInt(CmpC))) || in SimplifyDemandedUseBits()
393 isa<Constant>(X) || CmpC->getBitWidth() != SelC->getBitWidth()) in SimplifyDemandedUseBits()
397 if (*CmpC == *SelC) in SimplifyDemandedUseBits()
401 if ((*CmpC & DemandedMask) == (*SelC & DemandedMask)) { in SimplifyDemandedUseBits()
402 I->setOperand(OpNo, ConstantInt::get(I->getType(), *CmpC)); in SimplifyDemandedUseBits()
H A DInstCombineCompares.cpp6510 const APInt *CmpC; in foldICmpUsingKnownBits() local
6511 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits()
6513 if (*CmpC == Op0Min + 1) in foldICmpUsingKnownBits()
6515 ConstantInt::get(Op1->getType(), *CmpC - 1)); in foldICmpUsingKnownBits()
6518 if (Op0Known.countMinTrailingZeros() >= CmpC->ceilLogBase2()) in foldICmpUsingKnownBits()
6527 const APInt *CmpC; in foldICmpUsingKnownBits() local
6528 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits()
6530 if (*CmpC == Op0Max - 1) in foldICmpUsingKnownBits()
6532 ConstantInt::get(Op1->getType(), *CmpC + 1)); in foldICmpUsingKnownBits()
6535 if (Op0Known.countMinTrailingZeros() >= CmpC->getActiveBits()) in foldICmpUsingKnownBits()
[all …]
H A DInstCombineAndOrXor.cpp2542 Constant *CmpC = ConstantExpr::getSub(LshrC, Log2C1); in visitAnd() local
2543 Value *Cmp = Builder.CreateICmpEQ(X, CmpC); in visitAnd()
2559 Constant *CmpC = ConstantExpr::getSub(ShlC, Log2C3); in visitAnd() local
2560 Value *Cmp = Builder.CreateICmpEQ(X, CmpC); in visitAnd()
H A DInstCombineCasts.cpp747 Constant *CmpC = ConstantExpr::getSub(C2, Log2C1); in visitTrunc() local
748 return new ICmpInst(ICmpInst::ICMP_EQ, X, CmpC); in visitTrunc()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DCodeGenPrepare.cpp1736 const APInt *CmpC, *AddC; in combineToUSubWithOverflow() local
1738 match(B, m_APInt(CmpC)) && *AddC == -(*CmpC)) { in combineToUSubWithOverflow()
2031 auto *CmpC = dyn_cast<ConstantInt>(User->getOperand(1)); in sinkAndCmp0Expression() local
2032 if (!CmpC || !CmpC->isZero()) in sinkAndCmp0Expression()
8253 APInt CmpC = cast<ConstantInt>(Cmp->getOperand(1))->getValue(); in optimizeBranch() local
8266 if (CmpC.isPowerOf2() && Cmp->getPredicate() == ICmpInst::ICMP_ULT && in optimizeBranch()
8267 match(UI, m_Shr(m_Specific(X), m_SpecificInt(CmpC.logBase2())))) { in optimizeBranch()
8280 (match(UI, m_Add(m_Specific(X), m_SpecificInt(-CmpC))) || in optimizeBranch()
8281 match(UI, m_Sub(m_Specific(X), m_SpecificInt(CmpC))))) { in optimizeBranch()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVectorCombine.cpp1105 SmallVector<Constant *, 32> CmpC(VecTy->getNumElements(), in foldExtractedCmps() local
1107 CmpC[Index0] = C0; in foldExtractedCmps()
1108 CmpC[Index1] = C1; in foldExtractedCmps()
1109 Value *VCmp = Builder.CreateCmp(Pred, X, ConstantVector::get(CmpC)); in foldExtractedCmps()
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/
H A DX86ISelLowering.cpp44471 SDValue CmpC; in combinePredicateReduction() local
44475 CmpC = DAG.getConstant(0, DL, CmpVT); in combinePredicateReduction()
44479 CmpC = DAG.getConstant(APInt::getLowBitsSet(CmpVT.getSizeInBits(), NumElts), in combinePredicateReduction()
44487 SDValue Setcc = DAG.getSetCC(DL, SetccVT, Movmsk, CmpC, CondCode); in combinePredicateReduction()
54432 APInt CmpC; in combineSetCC() local
54434 if (ISD::isConstantSplatVector(RHS.getNode(), CmpC) && in combineSetCC()
54449 else if ((CC == ISD::SETULT && CmpC == 2) || in combineSetCC()
54450 (CC == ISD::SETULE && CmpC == 1)) { in combineSetCC()
54457 else if ((CC == ISD::SETUGT && (-CmpC) == 3) || in combineSetCC()
54458 (CC == ISD::SETUGE && (-CmpC) == 2)) { in combineSetCC()