Home
last modified time | relevance | path

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

123

/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombineCompares.cpp202 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 …]
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 …]
DInstCombine.h139 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);
DInstCombineCasts.cpp503 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/
DInstCombineCompares.cpp236 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 …]
DInstCombineCasts.cpp583 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 …]
DInstCombineSelect.cpp370 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 …]
DInstCombineInternal.h268 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/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DSimplifyIndVar.cpp542 if (ICmpInst *ICI = dyn_cast<ICmpInst>(U)) { in eliminateTrunc() local
543 if (ICI->getOperand(0) == TI && L->isLoopInvariant(ICI->getOperand(1))) { in eliminateTrunc()
544 assert(L->contains(ICI->getParent()) && "LCSSA form broken?"); in eliminateTrunc()
546 if (ICI->isSigned() && !DoesSExtCollapse) in eliminateTrunc()
548 if (ICI->isUnsigned() && !DoesZExtCollapse) in eliminateTrunc()
551 ICmpUsers.push_back(ICI); in eliminateTrunc()
558 auto CanUseZExt = [&](ICmpInst *ICI) { in eliminateTrunc() argument
560 if (ICI->isUnsigned()) in eliminateTrunc()
566 if (ICI->isEquality()) in eliminateTrunc()
572 const SCEV *SCEVOP1 = SE->getSCEV(ICI->getOperand(0)); in eliminateTrunc()
[all …]
/external/llvm/lib/Analysis/
DLazyValueInfo.cpp848 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/
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()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DLoopPredication.cpp247 Optional<LoopICmp> parseLoopICmp(ICmpInst *ICI) { in parseLoopICmp() argument
248 return parseLoopICmp(ICI->getPredicate(), ICI->getOperand(0), in parseLoopICmp()
249 ICI->getOperand(1)); in parseLoopICmp()
261 Optional<Value *> widenICmpRangeCheck(ICmpInst *ICI, SCEVExpander &Expander,
508 Optional<Value *> LoopPredication::widenICmpRangeCheck(ICmpInst *ICI, in widenICmpRangeCheck() argument
512 LLVM_DEBUG(ICI->dump()); in widenICmpRangeCheck()
518 auto RangeCheck = parseLoopICmp(ICI); in widenICmpRangeCheck()
603 if (ICmpInst *ICI = dyn_cast<ICmpInst>(Condition)) { in widenGuardConditions() local
604 if (auto NewRangeCheck = widenICmpRangeCheck(ICI, Expander, Builder)) { in widenGuardConditions()
DAlignmentFromAssumptions.cpp206 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()
DScalarizer.cpp109 ICmpSplitter(ICmpInst &ici) : ICI(ici) {} in ICmpSplitter()
113 return Builder.CreateICmp(ICI.getPredicate(), Op0, Op1, Name); in operator ()()
116 ICmpInst &ICI; member
170 bool visitICmpInst(ICmpInst &ICI);
180 bool visitCallInst(CallInst &ICI);
532 bool Scalarizer::visitICmpInst(ICmpInst &ICI) { in visitICmpInst() argument
533 return splitBinary(ICI, ICmpSplitter(ICI)); in visitICmpInst()
DInductiveRangeCheckElimination.cpp161 static RangeCheckKind parseRangeCheckICmp(Loop *L, ICmpInst *ICI,
312 InductiveRangeCheck::parseRangeCheckICmp(Loop *L, ICmpInst *ICI, in parseRangeCheckICmp() argument
319 ICmpInst::Predicate Pred = ICI->getPredicate(); in parseRangeCheckICmp()
320 Value *LHS = ICI->getOperand(0); in parseRangeCheckICmp()
321 Value *RHS = ICI->getOperand(1); in parseRangeCheckICmp()
388 ICmpInst *ICI = dyn_cast<ICmpInst>(Condition); in extractRangeChecksFromCond() local
389 if (!ICI) in extractRangeChecksFromCond()
394 auto RCKind = parseRangeCheckICmp(L, ICI, SE, Index, Length, IsSigned); in extractRangeChecksFromCond()
870 ICmpInst *ICI = dyn_cast<ICmpInst>(LatchBr->getCondition()); in parseLoopStructure() local
871 if (!ICI || !isa<IntegerType>(ICI->getOperand(0)->getType())) { in parseLoopStructure()
[all …]
/external/libcxx/test/std/containers/sequences/deque/deque.special/
Dcopy.pass.cpp53 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-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineCasts.cpp809 Instruction *InstCombiner::transformZExtICmp(ICmpInst *ICI, ZExtInst &CI, in transformZExtICmp() argument
815 if (match(ICI->getOperand(1), m_APInt(Op1CV))) { in transformZExtICmp()
819 if ((ICI->getPredicate() == ICmpInst::ICMP_SLT && Op1CV->isNullValue()) || in transformZExtICmp()
820 (ICI->getPredicate() == ICmpInst::ICMP_SGT && Op1CV->isAllOnesValue())) { in transformZExtICmp()
821 if (!DoTransform) return ICI; in transformZExtICmp()
823 Value *In = ICI->getOperand(0); in transformZExtICmp()
830 if (ICI->getPredicate() == ICmpInst::ICMP_SGT) { in transformZExtICmp()
848 ICI->isEquality()) { in transformZExtICmp()
850 KnownBits Known = computeKnownBits(ICI->getOperand(0), 0, &CI); in transformZExtICmp()
854 if (!DoTransform) return ICI; in transformZExtICmp()
[all …]
DInstCombineSelect.cpp594 static Value *canonicalizeSaturatedSubtract(const ICmpInst *ICI, in canonicalizeSaturatedSubtract() argument
598 ICmpInst::Predicate Pred = ICI->getPredicate(); in canonicalizeSaturatedSubtract()
610 Value *A = ICI->getOperand(0); in canonicalizeSaturatedSubtract()
611 Value *B = ICI->getOperand(1); in canonicalizeSaturatedSubtract()
652 static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal, in foldSelectCttzCtlz() argument
654 ICmpInst::Predicate Pred = ICI->getPredicate(); in foldSelectCttzCtlz()
655 Value *CmpLHS = ICI->getOperand(0); in foldSelectCttzCtlz()
656 Value *CmpRHS = ICI->getOperand(1); in foldSelectCttzCtlz()
659 if (!ICI->isEquality() || !match(CmpRHS, m_Zero())) in foldSelectCttzCtlz()
912 ICmpInst *ICI) { in foldSelectInstWithICmp() argument
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/
DSimplifyCFG.cpp357 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/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DCmpInstAnalysis.cpp22 unsigned llvm::getICmpCode(const ICmpInst *ICI, bool InvertPred) { in getICmpCode() argument
23 ICmpInst::Predicate Pred = InvertPred ? ICI->getInversePredicate() in getICmpCode()
24 : ICI->getPredicate(); in getICmpCode()
/external/llvm/lib/Transforms/Scalar/
DInductiveRangeCheckElimination.cpp124 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 …]
DAlignmentFromAssumptions.cpp206 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()
/external/libcxx/test/std/containers/sequences/deque/deque.cons/
Dassign_iter_iter.pass.cpp71 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/
DLoopInfo.cpp188 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()
DLazyValueInfo.cpp825 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()

123