/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCompares.cpp | 203 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 …]
|
D | InstCombineSelect.cpp | 29 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 …]
|
D | InstCombine.h | 143 GlobalVariable *GV, CmpInst &ICI, 147 Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI); 148 Instruction *visitICmpInstWithInstAndIntCst(ICmpInst &ICI, 151 Instruction *FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI, 153 Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI, 155 Instruction *FoldICmpAddOpCst(ICmpInst &ICI, Value *X, ConstantInt *CI, 182 Instruction *visitSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI); 225 Instruction *transformZExtICmp(ICmpInst *ICI, Instruction &CI, 227 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
|
D | InstCombineCasts.cpp | 501 Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI, in transformZExtICmp() argument 506 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp() 511 if ((ICI->getPredicate() == ICmpInst::ICMP_SLT && Op1CV == 0) || in transformZExtICmp() 512 (ICI->getPredicate() == ICmpInst::ICMP_SGT &&Op1CV.isAllOnesValue())) { in transformZExtICmp() 513 if (!DoXform) return ICI; in transformZExtICmp() 515 Value *In = ICI->getOperand(0); in transformZExtICmp() 522 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp() 540 ICI->isEquality()) { in transformZExtICmp() 544 ComputeMaskedBits(ICI->getOperand(0), KnownZero, KnownOne); in transformZExtICmp() 548 if (!DoXform) return ICI; in transformZExtICmp() [all …]
|
D | InstructionCombining.cpp | 1132 ICmpInst *ICI = cast<ICmpInst>(I); in isAllocSiteRemovable() local 1134 if (!ICI->isEquality() || !isa<ConstantPointerNull>(ICI->getOperand(1))) in isAllocSiteRemovable()
|
/external/llvm/lib/Transforms/Utils/ |
D | CmpInstAnalysis.cpp | 44 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()
|
D | SimplifyCFG.cpp | 418 if (ICmpInst *ICI = dyn_cast<ICmpInst>(I)) { in GatherConstantCompares() local 420 if (ICI->getPredicate() == (isEQ ? ICmpInst::ICMP_EQ:ICmpInst::ICMP_NE)) { in GatherConstantCompares() 429 ConstantRange::makeICmpRegion(ICI->getPredicate(), C->getValue()); in GatherConstantCompares() 520 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) in isValueEqualityComparison() local 521 if ((ICI->getPredicate() == ICmpInst::ICMP_EQ || in isValueEqualityComparison() 522 ICI->getPredicate() == ICmpInst::ICMP_NE) && in isValueEqualityComparison() 523 GetConstantInt(ICI->getOperand(1), TD)) in isValueEqualityComparison() 524 CV = ICI->getOperand(0); in isValueEqualityComparison() 548 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetValueEqualityComparisonCases() local 549 BasicBlock *Succ = BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_NE); in GetValueEqualityComparisonCases() [all …]
|
/external/llvm/lib/Analysis/ |
D | LazyValueInfo.cpp | 798 ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition()); in getEdgeValueLocal() local 799 if (ICI && isa<Constant>(ICI->getOperand(1))) { in getEdgeValueLocal() 800 if (ICI->isEquality() && ICI->getOperand(0) == Val) { in getEdgeValueLocal() 803 if (isTrueDest == (ICI->getPredicate() == ICmpInst::ICMP_EQ)) in getEdgeValueLocal() 804 Result = LVILatticeVal::get(cast<Constant>(ICI->getOperand(1))); in getEdgeValueLocal() 806 Result = LVILatticeVal::getNot(cast<Constant>(ICI->getOperand(1))); in getEdgeValueLocal() 813 if (ICI->getPredicate() == ICmpInst::ICMP_ULT) in getEdgeValueLocal() 814 match(ICI->getOperand(0), m_Add(m_Specific(Val), in getEdgeValueLocal() 817 ConstantInt *CI = dyn_cast<ConstantInt>(ICI->getOperand(1)); in getEdgeValueLocal() 818 if (CI && (ICI->getOperand(0) == Val || NegOffset)) { in getEdgeValueLocal() [all …]
|
D | ScalarEvolution.cpp | 3826 if (ICmpInst *ICI = dyn_cast<ICmpInst>(U->getOperand(0))) { in createSCEV() local 3827 Value *LHS = ICI->getOperand(0); in createSCEV() 3828 Value *RHS = ICI->getOperand(1); in createSCEV() 3829 switch (ICI->getPredicate()) { in createSCEV() 6103 ICmpInst *ICI = dyn_cast<ICmpInst>(FoundCondValue); in isImpliedCond() local 6104 if (!ICI) return false; in isImpliedCond() 6112 getTypeSizeInBits(ICI->getOperand(0)->getType())) in isImpliedCond() 6119 FoundPred = ICI->getInversePredicate(); in isImpliedCond() 6121 FoundPred = ICI->getPredicate(); in isImpliedCond() 6123 const SCEV *FoundLHS = getSCEV(ICI->getOperand(0)); in isImpliedCond() [all …]
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | CmpInstAnalysis.h | 47 unsigned getICmpCode(const ICmpInst *ICI, bool InvertPred = false);
|
/external/llvm/lib/Analysis/IPA/ |
D | GlobalsModRef.cpp | 286 } 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/ |
D | GlobalOpt.cpp | 1093 ICmpInst *ICI = cast<ICmpInst>(LoadUse.getUser()); in OptimizeGlobalAddressOfMalloc() local 1098 LI->isUnordered() ? (Instruction*)ICI : LI); in OptimizeGlobalAddressOfMalloc() 1100 switch (ICI->getPredicate()) { in OptimizeGlobalAddressOfMalloc() 1109 LV = BinaryOperator::CreateNot(LV, "notinit", ICI); in OptimizeGlobalAddressOfMalloc() 1118 ICI->replaceAllUsesWith(LV); in OptimizeGlobalAddressOfMalloc() 1119 ICI->eraseFromParent(); in OptimizeGlobalAddressOfMalloc() 1252 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(User)) { in LoadUsesSimpleEnoughForHeapSRA() local 1253 if (!isa<ConstantPointerNull>(ICI->getOperand(1))) in LoadUsesSimpleEnoughForHeapSRA()
|
/external/llvm/lib/Transforms/Scalar/ |
D | ObjCARC.cpp | 1925 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(Inst)) { in CanUse() local 1929 if (!IsPotentialUse(ICI->getOperand(1), *PA.getAA())) in CanUse()
|
D | LoopStrengthReduce.cpp | 2991 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UserInst)) { in CollectLoopInvariantFixupsAndFormulae() local 2993 Value *OtherOp = const_cast<Value *>(ICI->getOperand(OtherIdx)); in CollectLoopInvariantFixupsAndFormulae()
|