| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 842 const APInt *C, *CmpC; in canonicalizeSaturatedAdd() local 845 match(FVal, m_AllOnes()) && match(Cmp1, m_APInt(CmpC)) && *CmpC == ~*C) { in canonicalizeSaturatedAdd() 1009 const APInt *CmpC; in adjustMinMax() local 1010 if (!Cmp.hasOneUse() || !match(CmpRHS, m_APInt(CmpC))) in adjustMinMax() 1022 AdjustedRHS = ConstantInt::get(CmpRHS->getType(), *CmpC + 1); in adjustMinMax() 1520 const APInt *CmpC; in foldSelectZeroOrOnes() local 1521 if (!match(Cmp->getOperand(1), m_APIntAllowUndef(CmpC))) in foldSelectZeroOrOnes() 1526 if (Cmp->getPredicate() == ICmpInst::ICMP_ULT && *CmpC == 2 && in foldSelectZeroOrOnes() 1531 if (Cmp->getPredicate() == ICmpInst::ICMP_UGT && *CmpC == 1 && in foldSelectZeroOrOnes() 1539 const APInt *CmpC; in foldSelectInstWithICmpConst() local [all …]
|
| H A D | InstCombineSimplifyDemanded.cpp | 357 const APInt *CmpC; in SimplifyDemandedUseBits() local 359 if (!match(I->getOperand(0), m_ICmp(Pred, m_Value(X), m_APInt(CmpC))) || in SimplifyDemandedUseBits() 360 isa<Constant>(X) || CmpC->getBitWidth() != SelC->getBitWidth()) in SimplifyDemandedUseBits() 364 if (*CmpC == *SelC) in SimplifyDemandedUseBits() 368 if ((*CmpC & DemandedMask) == (*SelC & DemandedMask)) { in SimplifyDemandedUseBits() 369 I->setOperand(OpNo, ConstantInt::get(I->getType(), *CmpC)); in SimplifyDemandedUseBits()
|
| H A D | InstCombineCompares.cpp | 5549 const APInt *CmpC; in foldICmpUsingKnownBits() local 5550 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5552 if (*CmpC == Op0Min + 1) in foldICmpUsingKnownBits() 5566 const APInt *CmpC; in foldICmpUsingKnownBits() local 5567 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5569 if (*CmpC == Op0Max - 1) in foldICmpUsingKnownBits() 5583 const APInt *CmpC; in foldICmpUsingKnownBits() local 5584 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() 5594 const APInt *CmpC; in foldICmpUsingKnownBits() local 5595 if (match(Op1, m_APInt(CmpC))) { in foldICmpUsingKnownBits() [all …]
|
| H A D | InstCombineAndOrXor.cpp | 1959 Constant *CmpC = ConstantExpr::getSub(LshrC, Log2C1); in visitAnd() local 1960 Value *Cmp = Builder.CreateICmpEQ(X, CmpC); in visitAnd() 1976 Constant *CmpC = ConstantExpr::getSub(ShlC, Log2C3); in visitAnd() local 1977 Value *Cmp = Builder.CreateICmpEQ(X, CmpC); in visitAnd()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/ |
| H A D | VectorCombine.cpp | 788 SmallVector<Constant *, 32> CmpC(VecTy->getNumElements(), in foldExtractedCmps() local 790 CmpC[Index0] = C0; in foldExtractedCmps() 791 CmpC[Index1] = C1; in foldExtractedCmps() 792 Value *VCmp = Builder.CreateCmp(Pred, X, ConstantVector::get(CmpC)); in foldExtractedCmps()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | CodeGenPrepare.cpp | 1557 const APInt *CmpC, *AddC; in combineToUSubWithOverflow() local 1559 match(B, m_APInt(CmpC)) && *AddC == -(*CmpC)) { in combineToUSubWithOverflow() 1783 auto *CmpC = dyn_cast<ConstantInt>(User->getOperand(1)); in sinkAndCmp0Expression() local 1784 if (!CmpC || !CmpC->isZero()) in sinkAndCmp0Expression() 7849 APInt CmpC = cast<ConstantInt>(Cmp->getOperand(1))->getValue(); in optimizeBranch() local 7862 if (CmpC.isPowerOf2() && Cmp->getPredicate() == ICmpInst::ICMP_ULT && in optimizeBranch() 7863 match(UI, m_Shr(m_Specific(X), m_SpecificInt(CmpC.logBase2())))) { in optimizeBranch() 7875 (match(UI, m_Add(m_Specific(X), m_SpecificInt(-CmpC))) || in optimizeBranch() 7876 match(UI, m_Sub(m_Specific(X), m_SpecificInt(CmpC))))) { in optimizeBranch()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86ISelLowering.cpp | 43225 SDValue CmpC; in combinePredicateReduction() local 43229 CmpC = DAG.getConstant(0, DL, CmpVT); in combinePredicateReduction() 43233 CmpC = DAG.getConstant(APInt::getLowBitsSet(CmpVT.getSizeInBits(), NumElts), in combinePredicateReduction() 43242 SDValue Setcc = DAG.getSetCC(DL, SetccVT, Movmsk, CmpC, CondCode); in combinePredicateReduction()
|