/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineCompares.cpp | 202 CmpInst &ICI, ConstantInt *AndCst) { in FoldCmpLoadFromIndexedGlobal() argument 274 Constant *CompareRHS = cast<Constant>(ICI.getOperand(1)); in FoldCmpLoadFromIndexedGlobal() 286 Constant *C = ConstantFoldCompareInstOperands(ICI.getPredicate(), Elt, in FoldCmpLoadFromIndexedGlobal() 374 return ReplaceInstUsesWith(ICI, ConstantInt::getFalse(GEP->getContext())); in FoldCmpLoadFromIndexedGlobal() 394 return ReplaceInstUsesWith(ICI, ConstantInt::getTrue(GEP->getContext())); in FoldCmpLoadFromIndexedGlobal() 680 Instruction *InstCombiner::FoldICmpAddOpCst(ICmpInst &ICI, in FoldICmpAddOpCst() argument 688 return ReplaceInstUsesWith(ICI, ConstantInt::get(ICI.getType(), isTrue)); in FoldICmpAddOpCst() 693 return ReplaceInstUsesWith(ICI, ConstantInt::getFalse(X->getContext())); in FoldICmpAddOpCst() 697 return ReplaceInstUsesWith(ICI, ConstantInt::getTrue(X->getContext())); in FoldICmpAddOpCst() 745 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 | 139 GlobalVariable *GV, CmpInst &ICI, 143 Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI); 144 Instruction *visitICmpInstWithInstAndIntCst(ICmpInst &ICI, 147 Instruction *FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI, 149 Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI, 151 Instruction *FoldICmpAddOpCst(ICmpInst &ICI, Value *X, ConstantInt *CI, 178 Instruction *visitSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI); 221 Instruction *transformZExtICmp(ICmpInst *ICI, Instruction &CI, 223 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
|
D | InstCombineCasts.cpp | 503 Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI, in transformZExtICmp() argument 508 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp() 513 if ((ICI->getPredicate() == ICmpInst::ICMP_SLT && Op1CV == 0) || in transformZExtICmp() 514 (ICI->getPredicate() == ICmpInst::ICMP_SGT &&Op1CV.isAllOnesValue())) { in transformZExtICmp() 515 if (!DoXform) return ICI; in transformZExtICmp() 517 Value *In = ICI->getOperand(0); in transformZExtICmp() 524 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp() 544 ICI->isEquality()) { in transformZExtICmp() 549 ComputeMaskedBits(ICI->getOperand(0), TypeMask, KnownZero, KnownOne); in transformZExtICmp() 553 if (!DoXform) return ICI; in transformZExtICmp() [all …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCompares.cpp | 236 CmpInst &ICI, ConstantInt *AndCst) { in FoldCmpLoadFromIndexedGlobal() argument 308 Constant *CompareRHS = cast<Constant>(ICI.getOperand(1)); in FoldCmpLoadFromIndexedGlobal() 321 Constant *C = ConstantFoldCompareInstOperands(ICI.getPredicate(), Elt, in FoldCmpLoadFromIndexedGlobal() 411 return replaceInstUsesWith(ICI, Builder->getFalse()); in FoldCmpLoadFromIndexedGlobal() 431 return replaceInstUsesWith(ICI, Builder->getTrue()); in FoldCmpLoadFromIndexedGlobal() 1059 Instruction *InstCombiner::FoldAllocaCmp(ICmpInst &ICI, AllocaInst *Alloca, in FoldAllocaCmp() argument 1061 assert(ICI.isEquality() && "Cannot fold non-equality comparison."); in FoldAllocaCmp() 1132 ICI, in FoldAllocaCmp() 1133 ConstantInt::get(CmpTy, !CmpInst::isTrueWhenEqual(ICI.getPredicate()))); in FoldAllocaCmp() 1137 Instruction *InstCombiner::FoldICmpAddOpCst(Instruction &ICI, in FoldICmpAddOpCst() argument [all …]
|
D | InstCombineCasts.cpp | 583 Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, Instruction &CI, in transformZExtICmp() argument 588 if (ConstantInt *Op1C = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in transformZExtICmp() 593 if ((ICI->getPredicate() == ICmpInst::ICMP_SLT && Op1CV == 0) || in transformZExtICmp() 594 (ICI->getPredicate() == ICmpInst::ICMP_SGT && Op1CV.isAllOnesValue())) { in transformZExtICmp() 595 if (!DoXform) return ICI; in transformZExtICmp() 597 Value *In = ICI->getOperand(0); in transformZExtICmp() 604 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp() 622 ICI->isEquality()) { in transformZExtICmp() 626 computeKnownBits(ICI->getOperand(0), KnownZero, KnownOne, 0, &CI); in transformZExtICmp() 630 if (!DoXform) return ICI; in transformZExtICmp() [all …]
|
D | InstCombineSelect.cpp | 370 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal, in foldSelectCttzCtlz() argument 372 ICmpInst::Predicate Pred = ICI->getPredicate(); in foldSelectCttzCtlz() 373 Value *CmpLHS = ICI->getOperand(0); in foldSelectCttzCtlz() 374 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz() 377 if (!ICI->isEquality() || !match(CmpRHS, m_Zero())) in foldSelectCttzCtlz() 416 ICmpInst *ICI) { in visitSelectInstWithICmp() argument 418 ICmpInst::Predicate Pred = ICI->getPredicate(); in visitSelectInstWithICmp() 419 Value *CmpLHS = ICI->getOperand(0); in visitSelectInstWithICmp() 420 Value *CmpRHS = ICI->getOperand(1); in visitSelectInstWithICmp() 427 if (ICI->hasOneUse()) in visitSelectInstWithICmp() [all …]
|
D | InstCombineInternal.h | 268 GlobalVariable *GV, CmpInst &ICI, 272 Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI); 273 Instruction *visitICmpInstWithInstAndIntCst(ICmpInst &ICI, Instruction *LHS, 275 Instruction *FoldICmpDivCst(ICmpInst &ICI, BinaryOperator *DivI, 277 Instruction *FoldICmpShrCst(ICmpInst &ICI, BinaryOperator *DivI, 283 Instruction *FoldICmpAddOpCst(Instruction &ICI, Value *X, ConstantInt *CI, 287 Instruction *FoldAllocaCmp(ICmpInst &ICI, AllocaInst *Alloca, Value *Other); 312 Instruction *visitSelectInstWithICmp(SelectInst &SI, ICmpInst *ICI); 388 Instruction *transformZExtICmp(ICmpInst *ICI, Instruction &CI, 390 Instruction *transformSExtICmp(ICmpInst *ICI, Instruction &CI);
|
/external/llvm/lib/Analysis/ |
D | LazyValueInfo.cpp | 848 static bool getValueFromFromCondition(Value *Val, ICmpInst *ICI, 869 if (ICmpInst *ICI = dyn_cast<ICmpInst>(C)) { in intersectAssumeBlockValueConstantRange() local 871 if (getValueFromFromCondition(Val, ICI, Result)) in intersectAssumeBlockValueConstantRange() 943 if (auto *ICI = dyn_cast<ICmpInst>(SI->getCondition())) { in solveBlockValueSelect() local 945 if (!getValueFromFromCondition(SI->getTrueValue(), ICI, in solveBlockValueSelect() 948 if (!getValueFromFromCondition(SI->getFalseValue(), ICI, in solveBlockValueSelect() 964 ICmpInst::Predicate Pred = ICI->getPredicate(); in solveBlockValueSelect() 965 Value *A = ICI->getOperand(0); in solveBlockValueSelect() 966 if (ConstantInt *CIBase = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in solveBlockValueSelect() 1168 bool getValueFromFromCondition(Value *Val, ICmpInst *ICI, in getValueFromFromCondition() argument [all …]
|
/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 | 437 ICmpInst *ICI; in matchInstruction() local 439 if (!((ICI = dyn_cast<ICmpInst>(I)) && in matchInstruction() 450 if (ICI->getPredicate() == (isEQ ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE)) { in matchInstruction() 492 if (match(ICI->getOperand(0), in matchInstruction() 515 if (match(ICI->getOperand(0), in matchInstruction() 532 if (!setValueOnce(ICI->getOperand(0))) in matchInstruction() 537 return ICI->getOperand(0); in matchInstruction() 542 ICI->getPredicate(), C->getValue()); in matchInstruction() 655 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { in isValueEqualityComparison() local 656 if (ICI->isEquality() && GetConstantInt(ICI->getOperand(1), DL)) in isValueEqualityComparison() [all …]
|
/external/libcxx/test/std/containers/sequences/deque/deque.special/ |
D | copy.pass.cpp | 53 typedef input_iterator<CI> ICI; in testN() typedef 66 assert(std::copy(ICI(c2.cbegin()), ICI(c2.cend()), c1.begin()) == c1.end()); in testN()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/ |
D | SimplifyCFG.cpp | 357 if (ICmpInst *ICI = dyn_cast<ICmpInst>(I)) { in GatherConstantCompares() local 359 if (ICI->getPredicate() == (isEQ ? ICmpInst::ICMP_EQ:ICmpInst::ICMP_NE)) { in GatherConstantCompares() 368 ConstantRange::makeICmpRegion(ICI->getPredicate(), C->getValue()); in GatherConstantCompares() 461 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) in isValueEqualityComparison() local 462 if ((ICI->getPredicate() == ICmpInst::ICMP_EQ || in isValueEqualityComparison() 463 ICI->getPredicate() == ICmpInst::ICMP_NE) && in isValueEqualityComparison() 464 GetConstantInt(ICI->getOperand(1), TD)) in isValueEqualityComparison() 465 CV = ICI->getOperand(0); in isValueEqualityComparison() 488 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetValueEqualityComparisonCases() local 489 Cases.push_back(std::make_pair(GetConstantInt(ICI->getOperand(1), TD), in GetValueEqualityComparisonCases() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | InductiveRangeCheckElimination.cpp | 124 static RangeCheckKind parseRangeCheckICmp(Loop *L, ICmpInst *ICI, 254 InductiveRangeCheck::parseRangeCheckICmp(Loop *L, ICmpInst *ICI, in parseRangeCheckICmp() argument 269 ICmpInst::Predicate Pred = ICI->getPredicate(); in parseRangeCheckICmp() 270 Value *LHS = ICI->getOperand(0); in parseRangeCheckICmp() 271 Value *RHS = ICI->getOperand(1); in parseRangeCheckICmp() 361 ICmpInst *ICI = dyn_cast<ICmpInst>(Condition); in extractRangeChecksFromCond() local 362 if (!ICI) in extractRangeChecksFromCond() 366 auto RCKind = parseRangeCheckICmp(L, ICI, SE, Index, Length); in extractRangeChecksFromCond() 656 ICmpInst *ICI = dyn_cast<ICmpInst>(LatchBr->getCondition()); in parseLoopStructure() local 657 if (!ICI || !isa<IntegerType>(ICI->getOperand(0)->getType())) { in parseLoopStructure() [all …]
|
D | AlignmentFromAssumptions.cpp | 206 ICmpInst *ICI = dyn_cast<ICmpInst>(I->getArgOperand(0)); in extractAlignmentInfo() local 207 if (!ICI) in extractAlignmentInfo() 211 if (ICI->getPredicate() != ICmpInst::ICMP_EQ) in extractAlignmentInfo() 215 Value *CmpLHS = ICI->getOperand(0); in extractAlignmentInfo() 216 Value *CmpRHS = ICI->getOperand(1); in extractAlignmentInfo()
|
D | Scalarizer.cpp | 83 ICmpSplitter(ICmpInst &ici) : ICI(ici) {} in ICmpSplitter() 86 return Builder.CreateICmp(ICI.getPredicate(), Op0, Op1, Name); in operator ()() 88 ICmpInst &ICI; member 427 bool Scalarizer::visitICmpInst(ICmpInst &ICI) { in visitICmpInst() argument 428 return splitBinary(ICI, ICmpSplitter(ICI)); in visitICmpInst()
|
/external/libcxx/test/std/containers/sequences/deque/deque.cons/ |
D | assign_iter_iter.pass.cpp | 71 typedef input_iterator<CI> ICI; in testI() typedef 72 c1.assign(ICI(c2.begin()), ICI(c2.end())); in testI()
|
/external/swiftshader/third_party/LLVM/lib/Analysis/ |
D | LoopInfo.cpp | 188 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { in getTripCount() local 189 if (ICI->getOperand(0) == Inc) { in getTripCount() 191 if (ICI->getPredicate() == ICmpInst::ICMP_NE) in getTripCount() 192 return ICI->getOperand(1); in getTripCount() 193 } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) { in getTripCount() 194 return ICI->getOperand(1); in getTripCount()
|
D | LazyValueInfo.cpp | 825 ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition()); in getEdgeValue() local 826 if (ICI && ICI->getOperand(0) == Val && in getEdgeValue() 827 isa<Constant>(ICI->getOperand(1))) { in getEdgeValue() 828 if (ICI->isEquality()) { in getEdgeValue() 831 if (isTrueDest == (ICI->getPredicate() == ICmpInst::ICMP_EQ)) in getEdgeValue() 832 Result = LVILatticeVal::get(cast<Constant>(ICI->getOperand(1))); in getEdgeValue() 834 Result = LVILatticeVal::getNot(cast<Constant>(ICI->getOperand(1))); in getEdgeValue() 838 if (ConstantInt *CI = dyn_cast<ConstantInt>(ICI->getOperand(1))) { in getEdgeValue() 842 ConstantRange::makeICmpRegion(ICI->getPredicate(), CmpRange); in getEdgeValue()
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | CmpInstAnalysis.h | 47 unsigned getICmpCode(const ICmpInst *ICI, bool InvertPred = false);
|
/external/llvm/lib/Transforms/ObjCARC/ |
D | DependencyAnalysis.cpp | 96 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(Inst)) { in CanUse() local 100 if (!IsPotentialRetainableObjPtr(ICI->getOperand(1), *PA.getAA())) in CanUse()
|
/external/libcxx/test/std/containers/sequences/deque/deque.modifiers/ |
D | insert_iter_iter.pass.cpp | 171 typedef input_iterator<CI> ICI; in testI() typedef 173 CI i = c1.insert(c1.begin() + P, ICI(c2.begin()), ICI(c2.end())); in testI()
|
/external/llvm/lib/Transforms/IPO/ |
D | GlobalOpt.cpp | 857 ICmpInst *ICI = dyn_cast<ICmpInst>(LoadUse.getUser()); in OptimizeGlobalAddressOfMalloc() local 858 if (!ICI) { in OptimizeGlobalAddressOfMalloc() 867 LI->isUnordered() ? (Instruction*)ICI : LI); in OptimizeGlobalAddressOfMalloc() 869 switch (ICI->getPredicate()) { in OptimizeGlobalAddressOfMalloc() 878 LV = BinaryOperator::CreateNot(LV, "notinit", ICI); in OptimizeGlobalAddressOfMalloc() 887 ICI->replaceAllUsesWith(LV); in OptimizeGlobalAddressOfMalloc() 888 ICI->eraseFromParent(); in OptimizeGlobalAddressOfMalloc() 1017 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(UI)) { in LoadUsesSimpleEnoughForHeapSRA() local 1018 if (!isa<ConstantPointerNull>(ICI->getOperand(1))) in LoadUsesSimpleEnoughForHeapSRA()
|
/external/swiftshader/third_party/LLVM/lib/Analysis/IPA/ |
D | GlobalsModRef.cpp | 285 } else if (ICmpInst *ICI = dyn_cast<ICmpInst>(U)) { in AnalyzeUsesOfPointer() local 286 if (!isa<ConstantPointerNull>(ICI->getOperand(1))) in AnalyzeUsesOfPointer()
|
/external/swiftshader/third_party/LLVM/lib/Transforms/IPO/ |
D | GlobalOpt.cpp | 922 ICmpInst *ICI = cast<ICmpInst>(LoadUse.getUser()); in OptimizeGlobalAddressOfMalloc() local 924 Value *LV = new LoadInst(InitBool, InitBool->getName()+".val", ICI); in OptimizeGlobalAddressOfMalloc() 926 switch (ICI->getPredicate()) { in OptimizeGlobalAddressOfMalloc() 935 LV = BinaryOperator::CreateNot(LV, "notinit", ICI); in OptimizeGlobalAddressOfMalloc() 944 ICI->replaceAllUsesWith(LV); in OptimizeGlobalAddressOfMalloc() 945 ICI->eraseFromParent(); in OptimizeGlobalAddressOfMalloc() 1078 if (const ICmpInst *ICI = dyn_cast<ICmpInst>(User)) { in LoadUsesSimpleEnoughForHeapSRA() local 1079 if (!isa<ConstantPointerNull>(ICI->getOperand(1))) in LoadUsesSimpleEnoughForHeapSRA()
|