Lines Matching defs:CxtI

102 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
105 if (CxtI && CxtI->getParent())
106 return CxtI;
109 CxtI = dyn_cast<Instruction>(V);
110 if (CxtI && CxtI->getParent())
111 return CxtI;
116 static const Instruction *safeCxtI(const Value *V1, const Value *V2, const Instruction *CxtI) {
119 if (CxtI && CxtI->getParent())
120 return CxtI;
123 CxtI = dyn_cast<Instruction>(V1);
124 if (CxtI && CxtI->getParent())
125 return CxtI;
127 CxtI = dyn_cast<Instruction>(V2);
128 if (CxtI && CxtI->getParent())
129 return CxtI;
166 AssumptionCache *AC, const Instruction *CxtI,
170 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
175 const Instruction *CxtI,
178 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
183 AssumptionCache *AC, const Instruction *CxtI,
187 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
197 isGuaranteedNotToBeUndef(M, SQ.AC, SQ.CxtI, SQ.DT))
203 isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT))
211 isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT) &&
212 isGuaranteedNotToBeUndef(Y, SQ.AC, SQ.CxtI, SQ.DT))
219 isGuaranteedNotToBeUndef(Y, SQ.AC, SQ.CxtI, SQ.DT))
227 isGuaranteedNotToBeUndef(A, SQ.AC, SQ.CxtI, SQ.DT) &&
228 isGuaranteedNotToBeUndef(B, SQ.AC, SQ.CxtI, SQ.DT))
282 AssumptionCache *AC, const Instruction *CxtI,
286 SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
320 const Instruction *CxtI, const DominatorTree *DT,
330 SimplifyQuery(DL, DT, AC, safeCxtI(V2, V1, CxtI), UseInstrInfo));
353 const Instruction *CxtI,
356 V, Depth, SimplifyQuery(DL, DT, AC, safeCxtI(V, CxtI), UseInstrInfo));
361 const Instruction *CxtI,
363 unsigned SignBits = ComputeNumSignBits(V, DL, Depth, AC, CxtI, DT);
425 isGuaranteedNotToBeUndef(Op0, Q.AC, Q.CxtI, Q.DT, Depth + 1);
510 const Instruction *CxtI,
521 if (Inv->getParent() == CxtI->getParent()) {
524 if (Inv->comesBefore(CxtI))
530 if (!AllowEphemerals && Inv == CxtI)
535 // the control flow, not even CxtI itself.
539 auto Range = make_range(CxtI->getIterator(), Inv->getIterator());
543 return AllowEphemerals || !isEphemeralValueOf(Inv, CxtI);
546 // Inv and CxtI are in different blocks.
548 if (DT->dominates(Inv, CxtI))
550 } else if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor() ||
633 if (!Q.AC || !Q.CxtI)
641 assert(I->getFunction() == Q.CxtI->getFunction() &&
652 !NullPointerIsDefined(Q.CxtI->getFunction(),
654 isValidAssumeForContext(I, Q.CxtI, Q.DT))
670 if (cmpExcludesZero(Pred, RHS) && isValidAssumeForContext(I, Q.CxtI, Q.DT))
836 if (!Q.CxtI)
843 if (Q.DT->dominates(Edge0, Q.CxtI->getParent()))
848 if (Q.DT->dominates(Edge1, Q.CxtI->getParent()))
870 assert(I->getParent()->getParent() == Q.CxtI->getParent()->getParent() &&
878 // Allow AllowEphemerals in isValidAssumeForContext, as the CxtI might
883 isValidAssumeForContext(I, Q.CxtI, Q.DT, /*AllowEphemerals*/ true))
895 if (Arg == V && isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
902 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
917 if (!isValidAssumeForContext(I, Q.CxtI, Q.DT))
1108 if (!isGuaranteedNotToBeUndef(Arm, Q.AC, Q.CxtI, Q.DT, Depth + 1))
1561 RecQ.CxtI = P;
1604 RecQ.CxtI = RInst;
1609 RecQ.CxtI = LInst;
1682 Instruction *CxtI;
1683 breakSelfRecursivePHI(&U, P, IncValue, CxtI, &CxtPhi);
1692 SimplifyQuery RecQ = Q.getWithoutCondContext().getWithInstruction(CxtI);
1710 if (match(RecQ.CxtI,
2120 if (isGuaranteedNotToBePoison(I->getOperand(0), Q.AC, Q.CxtI, Q.DT,
2314 Q.CxtI = PN->getIncomingBlock(U)->getTerminator();
2325 Q.CxtI = BO->getParent()->getTerminator();
2392 if (Q.AC && Q.CxtI) {
2399 isValidAssumeForContext(I, Q.CxtI, Q.DT))
2405 if (Q.DC && Q.CxtI && Q.DT) {
2412 Q.DT->dominates(Edge0, Q.CxtI->getParent()))
2418 Q.DT->dominates(Edge1, Q.CxtI->getParent()))
2427 if (Q.CxtI && match(V, m_VScale())) {
2428 const Function *F = Q.CxtI->getFunction();
2540 RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator();
3144 RecQ.CxtI = PN->getIncomingBlock(U)->getTerminator();
3149 if (match(RecQ.CxtI,
3219 isGuaranteedNotToBePoison(I->getOperand(0), Q.AC, Q.CxtI, Q.DT,
3490 isKnownNonNullFromDominatingCondition(V, Q.CxtI, Q.DT))
3706 RecQ.CxtI = IncomBB->getTerminator();
4152 RecQ.CxtI = PN->getIncomingBlock(i)->getTerminator();
4943 const Instruction *CxtI,
4949 computeKnownFPClassFromCond(V, A, Depth + 1, CondIsTrue, CxtI,
4951 computeKnownFPClassFromCond(V, B, Depth + 1, CondIsTrue, CxtI,
4962 Pred, *CxtI->getParent()->getParent(), LHS, *CRHS, LHS != V);
4985 if (!Q.CxtI)
4994 if (Q.DT->dominates(Edge0, Q.CxtI->getParent()))
4996 Q.CxtI, KnownFromContext);
4999 if (Q.DT->dominates(Edge1, Q.CxtI->getParent()))
5001 Q.CxtI, KnownFromContext);
5015 assert(I->getFunction() == Q.CxtI->getParent()->getParent() &&
5020 if (!isValidAssumeForContext(I, Q.CxtI, Q.DT))
5024 /*CondIsTrue=*/true, Q.CxtI, KnownFromContext);
5630 ExpArg, true, Q.IIQ.UseInstrInfo, Q.AC, Q.CxtI, Q.DT, Depth + 1);
6090 Instruction *CxtI;
6091 breakSelfRecursivePHI(&U, P, IncValue, CxtI);
6102 Q.getWithoutCondContext().getWithInstruction(CxtI));
7350 if (isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT))
7353 if (auto C = isImpliedByDomCondition(CmpInst::ICMP_UGE, LHS, RHS, SQ.CxtI,
7380 if (isGuaranteedNotToBeUndef(LHS, SQ.AC, SQ.CxtI, SQ.DT))
7799 // CxtI may be null or a cloned instruction.
9479 /*CxtI=*/nullptr, /*DT=*/nullptr, MaxAnalysisRecursionDepth - 1);
9482 /*CxtI=*/nullptr, /*DT=*/nullptr, MaxAnalysisRecursionDepth - 1);