Home
last modified time | relevance | path

Searched refs:ICI (Results 1 – 14 of 14) sorted by relevance

/external/llvm/lib/Transforms/InstCombine/
DInstCombineCompares.cpp203 CmpInst &ICI, ConstantInt *AndCst) { in FoldCmpLoadFromIndexedGlobal() argument
279 Constant *CompareRHS = cast<Constant>(ICI.getOperand(1)); in FoldCmpLoadFromIndexedGlobal()
292 Constant *C = ConstantFoldCompareInstOperands(ICI.getPredicate(), Elt, in FoldCmpLoadFromIndexedGlobal()
380 return ReplaceInstUsesWith(ICI, ConstantInt::getFalse(GEP->getContext())); in FoldCmpLoadFromIndexedGlobal()
400 return ReplaceInstUsesWith(ICI, ConstantInt::getTrue(GEP->getContext())); in FoldCmpLoadFromIndexedGlobal()
708 Instruction *InstCombiner::FoldICmpAddOpCst(ICmpInst &ICI, in FoldICmpAddOpCst() argument
716 return ReplaceInstUsesWith(ICI, ConstantInt::get(ICI.getType(), isTrue)); in FoldICmpAddOpCst()
721 return ReplaceInstUsesWith(ICI, ConstantInt::getFalse(X->getContext())); in FoldICmpAddOpCst()
725 return ReplaceInstUsesWith(ICI, ConstantInt::getTrue(X->getContext())); in FoldICmpAddOpCst()
773 Instruction *InstCombiner::FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI, in FoldICmpDivCst() argument
[all …]
DInstCombineSelect.cpp29 ICmpInst *ICI = dyn_cast<ICmpInst>(SI->getCondition()); in MatchSelectPattern() local
30 if (ICI == 0) return SPF_UNKNOWN; in MatchSelectPattern()
32 LHS = ICI->getOperand(0); in MatchSelectPattern()
33 RHS = ICI->getOperand(1); in MatchSelectPattern()
36 if (SI->getTrueValue() == ICI->getOperand(0) && in MatchSelectPattern()
37 SI->getFalseValue() == ICI->getOperand(1)) { in MatchSelectPattern()
38 switch (ICI->getPredicate()) { in MatchSelectPattern()
52 if (SI->getTrueValue() == ICI->getOperand(1) && in MatchSelectPattern()
53 SI->getFalseValue() == ICI->getOperand(0)) { in MatchSelectPattern()
54 switch (ICI->getPredicate()) { in MatchSelectPattern()
[all …]
DInstCombineCasts.cpp510 Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI, in transformZExtICmp() argument
515 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp()
520 if ((ICI->getPredicate() == ICmpInst::ICMP_SLT && Op1CV == 0) || in transformZExtICmp()
521 (ICI->getPredicate() == ICmpInst::ICMP_SGT &&Op1CV.isAllOnesValue())) { in transformZExtICmp()
522 if (!DoXform) return ICI; in transformZExtICmp()
524 Value *In = ICI->getOperand(0); in transformZExtICmp()
531 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp()
549 ICI->isEquality()) { in transformZExtICmp()
553 ComputeMaskedBits(ICI->getOperand(0), KnownZero, KnownOne); in transformZExtICmp()
557 if (!DoXform) return ICI; in transformZExtICmp()
[all …]
DInstCombine.h149 GlobalVariable *GV, CmpInst &ICI,
153 Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI);
154 Instruction *visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
157 Instruction *FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI,
159 Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI,
161 Instruction *FoldICmpAddOpCst(ICmpInst &ICI, Value *X, ConstantInt *CI,
188 Instruction *visitSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI);
231 Instruction *transformZExtICmp(ICmpInst *ICI, Instruction &CI,
233 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
DInstructionCombining.cpp1400 ICmpInst *ICI = cast<ICmpInst>(I); in isAllocSiteRemovable() local
1402 if (!ICI->isEquality() || !isa<ConstantPointerNull>(ICI->getOperand(1))) in isAllocSiteRemovable()
/external/llvm/lib/Transforms/Utils/
DCmpInstAnalysis.cpp44 unsigned llvm::getICmpCode(const ICmpInst *ICI, bool InvertPred) { in getICmpCode() argument
45 ICmpInst::Predicate Pred = InvertPred ? ICI->getInversePredicate() in getICmpCode()
46 : ICI->getPredicate(); in getICmpCode()
DSimplifyCFG.cpp429 if (ICmpInst *ICI = dyn_cast<ICmpInst>(I)) { in GatherConstantCompares() local
431 if (ICI->getPredicate() == (isEQ ? ICmpInst::ICMP_EQ:ICmpInst::ICMP_NE)) { in GatherConstantCompares()
440 ConstantRange::makeICmpRegion(ICI->getPredicate(), C->getValue()); in GatherConstantCompares()
531 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) in isValueEqualityComparison() local
532 if ((ICI->getPredicate() == ICmpInst::ICMP_EQ || in isValueEqualityComparison()
533 ICI->getPredicate() == ICmpInst::ICMP_NE) && in isValueEqualityComparison()
534 GetConstantInt(ICI->getOperand(1), TD)) in isValueEqualityComparison()
535 CV = ICI->getOperand(0); in isValueEqualityComparison()
559 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetValueEqualityComparisonCases() local
560 BasicBlock *Succ = BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_NE); in GetValueEqualityComparisonCases()
[all …]
/external/llvm/lib/Analysis/
DLazyValueInfo.cpp802 ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition()); in getEdgeValueLocal() local
803 if (ICI && isa<Constant>(ICI->getOperand(1))) { in getEdgeValueLocal()
804 if (ICI->isEquality() && ICI->getOperand(0) == Val) { in getEdgeValueLocal()
807 if (isTrueDest == (ICI->getPredicate() == ICmpInst::ICMP_EQ)) in getEdgeValueLocal()
808 Result = LVILatticeVal::get(cast<Constant>(ICI->getOperand(1))); in getEdgeValueLocal()
810 Result = LVILatticeVal::getNot(cast<Constant>(ICI->getOperand(1))); in getEdgeValueLocal()
817 if (ICI->getPredicate() == ICmpInst::ICMP_ULT) in getEdgeValueLocal()
818 match(ICI->getOperand(0), m_Add(m_Specific(Val), in getEdgeValueLocal()
821 ConstantInt *CI = dyn_cast<ConstantInt>(ICI->getOperand(1)); in getEdgeValueLocal()
822 if (CI && (ICI->getOperand(0) == Val || NegOffset)) { in getEdgeValueLocal()
[all …]
DScalarEvolution.cpp3832 if (ICmpInst *ICI = dyn_cast<ICmpInst>(U->getOperand(0))) { in createSCEV() local
3833 Value *LHS = ICI->getOperand(0); in createSCEV()
3834 Value *RHS = ICI->getOperand(1); in createSCEV()
3835 switch (ICI->getPredicate()) { in createSCEV()
6112 ICmpInst *ICI = dyn_cast<ICmpInst>(FoundCondValue); in isImpliedCond() local
6113 if (!ICI) return false; in isImpliedCond()
6121 getTypeSizeInBits(ICI->getOperand(0)->getType())) in isImpliedCond()
6128 FoundPred = ICI->getInversePredicate(); in isImpliedCond()
6130 FoundPred = ICI->getPredicate(); in isImpliedCond()
6132 const SCEV *FoundLHS = getSCEV(ICI->getOperand(0)); in isImpliedCond()
[all …]
/external/llvm/include/llvm/Transforms/Utils/
DCmpInstAnalysis.h47 unsigned getICmpCode(const ICmpInst *ICI, bool InvertPred = false);
/external/llvm/lib/Transforms/ObjCARC/
DDependencyAnalysis.cpp79 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(Inst)) { in CanUse() local
83 if (!IsPotentialRetainableObjPtr(ICI->getOperand(1), *PA.getAA())) in CanUse()
/external/llvm/lib/Analysis/IPA/
DGlobalsModRef.cpp286 } else if (ICmpInst *ICI = dyn_cast<ICmpInst>(U)) { in AnalyzeUsesOfPointer() local
287 if (!isa<ConstantPointerNull>(ICI->getOperand(1))) in AnalyzeUsesOfPointer()
/external/llvm/lib/Transforms/IPO/
DGlobalOpt.cpp1099 ICmpInst *ICI = cast<ICmpInst>(LoadUse.getUser()); in OptimizeGlobalAddressOfMalloc() local
1104 LI->isUnordered() ? (Instruction*)ICI : LI); in OptimizeGlobalAddressOfMalloc()
1106 switch (ICI->getPredicate()) { in OptimizeGlobalAddressOfMalloc()
1115 LV = BinaryOperator::CreateNot(LV, "notinit", ICI); in OptimizeGlobalAddressOfMalloc()
1124 ICI->replaceAllUsesWith(LV); in OptimizeGlobalAddressOfMalloc()
1125 ICI->eraseFromParent(); in OptimizeGlobalAddressOfMalloc()
1258 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(User)) { in LoadUsesSimpleEnoughForHeapSRA() local
1259 if (!isa<ConstantPointerNull>(ICI->getOperand(1))) in LoadUsesSimpleEnoughForHeapSRA()
/external/llvm/lib/Transforms/Scalar/
DLoopStrengthReduce.cpp3003 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) { in CollectLoopInvariantFixupsAndFormulae() local
3005 Value *OtherOp = const_cast<Value *>(ICI->getOperand(OtherIdx)); in CollectLoopInvariantFixupsAndFormulae()