Lines Matching refs:CxtI

103 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {  in safeCxtI()  argument
106 if (CxtI && CxtI->getParent()) in safeCxtI()
107 return CxtI; in safeCxtI()
110 CxtI = dyn_cast<Instruction>(V); in safeCxtI()
111 if (CxtI && CxtI->getParent()) in safeCxtI()
112 return CxtI; in safeCxtI()
117 static const Instruction *safeCxtI(const Value *V1, const Value *V2, const Instruction *CxtI) { in safeCxtI() argument
120 if (CxtI && CxtI->getParent()) in safeCxtI()
121 return CxtI; in safeCxtI()
124 CxtI = dyn_cast<Instruction>(V1); in safeCxtI()
125 if (CxtI && CxtI->getParent()) in safeCxtI()
126 return CxtI; in safeCxtI()
128 CxtI = dyn_cast<Instruction>(V2); in safeCxtI()
129 if (CxtI && CxtI->getParent()) in safeCxtI()
130 return CxtI; in safeCxtI()
167 AssumptionCache *AC, const Instruction *CxtI, in computeKnownBits() argument
171 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownBits()
176 const Instruction *CxtI, in computeKnownBits() argument
179 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownBits()
184 AssumptionCache *AC, const Instruction *CxtI, in computeKnownBits() argument
188 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in computeKnownBits()
198 isGuaranteedNotToBeUndef(M, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
204 isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
212 isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT) && in haveNoCommonBitsSetSpecialCases()
213 isGuaranteedNotToBeUndef(Y, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
220 isGuaranteedNotToBeUndef(Y, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
228 isGuaranteedNotToBeUndef(A, SQ.AC, SQ.CxtI, SQ.DT) && in haveNoCommonBitsSetSpecialCases()
229 isGuaranteedNotToBeUndef(B, SQ.AC, SQ.CxtI, SQ.DT)) in haveNoCommonBitsSetSpecialCases()
274 AssumptionCache *AC, const Instruction *CxtI, in isKnownToBeAPowerOfTwo() argument
278 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in isKnownToBeAPowerOfTwo()
312 const Instruction *CxtI, const DominatorTree *DT, in isKnownNonEqual() argument
321 SimplifyQuery(DL, DT, AC, safeCxtI(V2, V1, CxtI), UseInstrInfo)); in isKnownNonEqual()
344 const Instruction *CxtI, in ComputeNumSignBits() argument
347 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo)); in ComputeNumSignBits()
352 const Instruction *CxtI, in ComputeMaxSignificantBits() argument
354 unsigned SignBits = ComputeNumSignBits(V, DL, Depth, AC, CxtI, DT); in ComputeMaxSignificantBits()
409 isGuaranteedNotToBeUndef(Op0, Q.AC, Q.CxtI, Q.DT, Depth + 1); in computeKnownBitsMul()
494 const Instruction *CxtI, in isValidAssumeForContext() argument
505 if (Inv->getParent() == CxtI->getParent()) { in isValidAssumeForContext()
508 if (Inv->comesBefore(CxtI)) in isValidAssumeForContext()
514 if (!AllowEphemerals && Inv == CxtI) in isValidAssumeForContext()
523 auto Range = make_range(CxtI->getIterator(), Inv->getIterator()); in isValidAssumeForContext()
527 return AllowEphemerals || !isEphemeralValueOf(Inv, CxtI); in isValidAssumeForContext()
532 if (DT->dominates(Inv, CxtI)) in isValidAssumeForContext()
534 } else if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor()) { in isValidAssumeForContext()
581 if (!Q.AC || !Q.CxtI) in isKnownNonZeroFromAssume()
589 assert(I->getFunction() == Q.CxtI->getFunction() && in isKnownNonZeroFromAssume()
600 !NullPointerIsDefined(Q.CxtI->getFunction(), in isKnownNonZeroFromAssume()
602 isValidAssumeForContext(I, Q.CxtI, Q.DT)) in isKnownNonZeroFromAssume()
618 if (cmpExcludesZero(Pred, RHS) && isValidAssumeForContext(I, Q.CxtI, Q.DT)) in isKnownNonZeroFromAssume()
784 if (!Q.CxtI) in computeKnownBitsFromContext()
791 if (Q.DT->dominates(Edge0, Q.CxtI->getParent())) in computeKnownBitsFromContext()
796 if (Q.DT->dominates(Edge1, Q.CxtI->getParent())) in computeKnownBitsFromContext()
818 assert(I->getParent()->getParent() == Q.CxtI->getParent()->getParent() && in computeKnownBitsFromContext()
828 isValidAssumeForContext(I, Q.CxtI, Q.DT)) in computeKnownBitsFromContext()
840 if (Arg == V && isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromContext()
847 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromContext()
862 if (!isValidAssumeForContext(I, Q.CxtI, Q.DT)) in computeKnownBitsFromContext()
1053 if (!isGuaranteedNotToBeUndef(Arm, Q.AC, Q.CxtI, Q.DT, Depth + 1)) in adjustKnownBitsForSelectArm()
1439 RecQ.CxtI = P; in computeKnownBitsFromOperator()
1479 RecQ.CxtI = RInst; in computeKnownBitsFromOperator()
1484 RecQ.CxtI = LInst; in computeKnownBitsFromOperator()
1550 RecQ.CxtI = P->getIncomingBlock(u)->getTerminator(); in computeKnownBitsFromOperator()
1568 if (match(RecQ.CxtI, in computeKnownBitsFromOperator()
1979 if (isGuaranteedNotToBePoison(I->getOperand(0), Q.AC, Q.CxtI, Q.DT, in computeKnownBitsFromOperator()
2173 Q.CxtI = PN->getIncomingBlock(U)->getTerminator(); in isPowerOfTwoRecurrence()
2184 Q.CxtI = BO->getParent()->getTerminator(); in isPowerOfTwoRecurrence()
2235 if (Q.CxtI && match(V, m_VScale())) { in isKnownToBeAPowerOfTwo()
2236 const Function *F = Q.CxtI->getFunction(); in isKnownToBeAPowerOfTwo()
2348 RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator(); in isKnownToBeAPowerOfTwo()
2951 RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator(); in isKnownNonZeroFromOperator()
2956 if (match(RecQ.CxtI, in isKnownNonZeroFromOperator()
3026 isGuaranteedNotToBePoison(I->getOperand(0), Q.AC, Q.CxtI, Q.DT, in isKnownNonZeroFromOperator()
3297 isKnownNonNullFromDominatingCondition(V, Q.CxtI, Q.DT)) in isKnownNonZero()
3513 RecQ.CxtI = IncomBB->getTerminator(); in isNonEqualPHIs()
4008 RecQ.CxtI = PN->getIncomingBlock(i)->getTerminator(); in ComputeNumSignBitsImpl()
4767 const Instruction *CxtI, in computeKnownFPClassFromCond() argument
4776 Pred, *CxtI->getParent()->getParent(), LHS, *CRHS, LHS != V); in computeKnownFPClassFromCond()
4799 if (!Q.CxtI) in computeKnownFPClassFromContext()
4808 if (Q.DT->dominates(Edge0, Q.CxtI->getParent())) in computeKnownFPClassFromContext()
4809 computeKnownFPClassFromCond(V, Cond, /*CondIsTrue=*/true, Q.CxtI, in computeKnownFPClassFromContext()
4813 if (Q.DT->dominates(Edge1, Q.CxtI->getParent())) in computeKnownFPClassFromContext()
4814 computeKnownFPClassFromCond(V, Cond, /*CondIsTrue=*/false, Q.CxtI, in computeKnownFPClassFromContext()
4829 assert(I->getFunction() == Q.CxtI->getParent()->getParent() && in computeKnownFPClassFromContext()
4834 if (!isValidAssumeForContext(I, Q.CxtI, Q.DT)) in computeKnownFPClassFromContext()
4838 Q.CxtI, KnownFromContext); in computeKnownFPClassFromContext()
5444 ExpArg, true, Q.IIQ.UseInstrInfo, Q.AC, Q.CxtI, Q.DT, Depth + 1); in computeKnownFPClass()
7110 if (isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT)) in computeOverflowForUnsignedSub()
7115 if (match(SQ.CxtI, in computeOverflowForUnsignedSub()
7117 if (auto C = isImpliedByDomCondition(CmpInst::ICMP_UGE, LHS, RHS, SQ.CxtI, in computeOverflowForUnsignedSub()
7143 if (isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT)) in computeOverflowForSignedSub()