Lines Matching refs:CxtI

102 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {  in safeCxtI()  argument
105 if (CxtI && CxtI->getParent()) in safeCxtI()
106 return CxtI; in safeCxtI()
109 CxtI = dyn_cast<Instruction>(V); in safeCxtI()
110 if (CxtI && CxtI->getParent()) in safeCxtI()
111 return CxtI; in safeCxtI()
116 static const Instruction *safeCxtI(const Value *V1, const Value *V2, const Instruction *CxtI) { in safeCxtI() argument
119 if (CxtI && CxtI->getParent()) in safeCxtI()
120 return CxtI; in safeCxtI()
123 CxtI = dyn_cast<Instruction>(V1); in safeCxtI()
124 if (CxtI && CxtI->getParent()) in safeCxtI()
125 return CxtI; in safeCxtI()
127 CxtI = dyn_cast<Instruction>(V2); in safeCxtI()
128 if (CxtI && CxtI->getParent()) in safeCxtI()
129 return CxtI; in safeCxtI()
166 AssumptionCache *AC, const Instruction *CxtI, in computeKnownBits() argument
170 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownBits()
175 const Instruction *CxtI, in computeKnownBits() argument
178 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownBits()
183 AssumptionCache *AC, const Instruction *CxtI, in computeKnownBits() argument
187 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownBits()
197 isGuaranteedNotToBeUndef(M, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
203 isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
211 isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT) && in haveNoCommonBitsSetSpecialCases()
212 isGuaranteedNotToBeUndef(Y, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
219 isGuaranteedNotToBeUndef(Y, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
227 isGuaranteedNotToBeUndef(A, SQ.AC, SQ.CxtI, SQ.DT) && in haveNoCommonBitsSetSpecialCases()
228 isGuaranteedNotToBeUndef(B, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
266 AssumptionCache *AC, const Instruction *CxtI, in isKnownToBeAPowerOfTwo() argument
270 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in isKnownToBeAPowerOfTwo()
280 AssumptionCache *AC, const Instruction *CxtI, in isKnownNonZero() argument
283 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in isKnownNonZero()
311 const Instruction *CxtI, const DominatorTree *DT, in isKnownNonEqual() argument
315 SimplifyQuery(DL, DT, AC, safeCxtI(V2, V1, CxtI), UseInstrInfo)); in isKnownNonEqual()
338 const Instruction *CxtI, in ComputeNumSignBits() argument
341 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in ComputeNumSignBits()
346 const Instruction *CxtI, in ComputeMaxSignificantBits() argument
348 unsigned SignBits = ComputeNumSignBits(V, DL, Depth, AC, CxtI, DT); in ComputeMaxSignificantBits()
402 isGuaranteedNotToBeUndef(Op0, Q.AC, Q.CxtI, Q.DT, Depth + 1); in computeKnownBitsMul()
487 const Instruction *CxtI, in isValidAssumeForContext() argument
498 if (Inv->getParent() == CxtI->getParent()) { in isValidAssumeForContext()
501 if (Inv->comesBefore(CxtI)) in isValidAssumeForContext()
507 if (!AllowEphemerals && Inv == CxtI) in isValidAssumeForContext()
516 auto Range = make_range(CxtI->getIterator(), Inv->getIterator()); in isValidAssumeForContext()
520 return AllowEphemerals || !isEphemeralValueOf(Inv, CxtI); in isValidAssumeForContext()
525 if (DT->dominates(Inv, CxtI)) in isValidAssumeForContext()
527 } else if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor()) { in isValidAssumeForContext()
574 if (!Q.AC || !Q.CxtI) in isKnownNonZeroFromAssume()
582 assert(I->getFunction() == Q.CxtI->getFunction() && in isKnownNonZeroFromAssume()
593 !NullPointerIsDefined(Q.CxtI->getFunction(), in isKnownNonZeroFromAssume()
595 isValidAssumeForContext(I, Q.CxtI, Q.DT)) in isKnownNonZeroFromAssume()
611 if (cmpExcludesZero(Pred, RHS) && isValidAssumeForContext(I, Q.CxtI, Q.DT)) in isKnownNonZeroFromAssume()
711 if (!Q.CxtI) in computeKnownBitsFromContext()
722 if (Q.DT->dominates(Edge0, Q.CxtI->getParent())) in computeKnownBitsFromContext()
727 if (Q.DT->dominates(Edge1, Q.CxtI->getParent())) in computeKnownBitsFromContext()
750 assert(I->getParent()->getParent() == Q.CxtI->getParent()->getParent() && in computeKnownBitsFromContext()
760 isValidAssumeForContext(I, Q.CxtI, Q.DT)) in computeKnownBitsFromContext()
772 if (Arg == V && isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromContext()
779 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromContext()
794 if (!isValidAssumeForContext(I, Q.CxtI, Q.DT)) in computeKnownBitsFromContext()
1264 RecQ.CxtI = P; in computeKnownBitsFromOperator()
1304 RecQ.CxtI = RInst; in computeKnownBitsFromOperator()
1309 RecQ.CxtI = LInst; in computeKnownBitsFromOperator()
1375 RecQ.CxtI = P->getIncomingBlock(u)->getTerminator(); in computeKnownBitsFromOperator()
1392 if (match(RecQ.CxtI, in computeKnownBitsFromOperator()
1693 if (isGuaranteedNotToBePoison(I->getOperand(0), Q.AC, Q.CxtI, Q.DT, in computeKnownBitsFromOperator()
1885 Q.CxtI = PN->getIncomingBlock(U)->getTerminator(); in isPowerOfTwoRecurrence()
1896 Q.CxtI = BO->getParent()->getTerminator(); in isPowerOfTwoRecurrence()
1947 if (Q.CxtI && match(V, m_VScale())) { in isKnownToBeAPowerOfTwo()
1948 const Function *F = Q.CxtI->getFunction(); in isKnownToBeAPowerOfTwo()
2055 RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator(); in isKnownToBeAPowerOfTwo()
2619 RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator(); in isKnownNonZeroFromOperator()
2624 if (match(RecQ.CxtI, in isKnownNonZeroFromOperator()
2656 isGuaranteedNotToBePoison(I->getOperand(0), Q.AC, Q.CxtI, Q.DT, in isKnownNonZeroFromOperator()
2852 isKnownNonNullFromDominatingCondition(V, Q.CxtI, Q.DT)) in isKnownNonZero()
3036 RecQ.CxtI = IncomBB->getTerminator(); in isNonEqualPHIs()
3503 RecQ.CxtI = PN->getIncomingBlock(i)->getTerminator(); in ComputeNumSignBitsImpl()
4259 assert(F == Q.CxtI->getParent()->getParent() && in computeKnownFPClassFromAssumes()
4264 if (!isValidAssumeForContext(I, Q.CxtI, Q.DT)) in computeKnownFPClassFromAssumes()
4832 ExpArg, true, Q.IIQ.UseInstrInfo, Q.AC, Q.CxtI, Q.DT, Depth + 1); in computeKnownFPClass()
5316 AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT, in computeKnownFPClass() argument
5321 SimplifyQuery(DL, TLI, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownFPClass()
5328 const Instruction *CxtI, const DominatorTree *DT, bool UseInstrInfo) { in computeKnownFPClass() argument
5332 SimplifyQuery(DL, TLI, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownFPClass()
6433 if (isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT)) in computeOverflowForUnsignedSub()
6438 if (match(SQ.CxtI, in computeOverflowForUnsignedSub()
6440 if (auto C = isImpliedByDomCondition(CmpInst::ICMP_UGE, LHS, RHS, SQ.CxtI, in computeOverflowForUnsignedSub()
6466 if (isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT)) in computeOverflowForSignedSub()