Lines Matching defs:CxtI

105   const Instruction *CxtI;
127 Query(const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI,
130 : DL(DL), AC(AC), CxtI(CxtI), DT(DT), ORE(ORE), IIQ(UseInstrInfo) {}
133 : DL(Q.DL), AC(Q.AC), CxtI(Q.CxtI), DT(Q.DT), ORE(Q.ORE), IIQ(Q.IIQ),
152 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
155 if (CxtI && CxtI->getParent())
156 return CxtI;
159 CxtI = dyn_cast<Instruction>(V);
160 if (CxtI && CxtI->getParent())
161 return CxtI;
171 AssumptionCache *AC, const Instruction *CxtI,
175 Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo, ORE));
183 const Instruction *CxtI,
188 V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo, ORE));
193 const Instruction *CxtI, const DominatorTree *DT,
210 computeKnownBits(LHS, LHSKnown, DL, 0, AC, CxtI, DT, nullptr, UseInstrInfo);
211 computeKnownBits(RHS, RHSKnown, DL, 0, AC, CxtI, DT, nullptr, UseInstrInfo);
215 bool llvm::isOnlyUsedInZeroEqualityComparison(const Instruction *CxtI) {
216 for (const User *U : CxtI->users()) {
232 AssumptionCache *AC, const Instruction *CxtI,
235 V, OrZero, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo));
241 AssumptionCache *AC, const Instruction *CxtI,
244 Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo));
249 const Instruction *CxtI, const DominatorTree *DT,
252 computeKnownBits(V, DL, Depth, AC, CxtI, DT, nullptr, UseInstrInfo);
257 AssumptionCache *AC, const Instruction *CxtI,
264 return isKnownNonNegative(V, DL, Depth, AC, CxtI, DT, UseInstrInfo) &&
265 isKnownNonZero(V, DL, Depth, AC, CxtI, DT, UseInstrInfo);
269 AssumptionCache *AC, const Instruction *CxtI,
272 computeKnownBits(V, DL, Depth, AC, CxtI, DT, nullptr, UseInstrInfo);
280 const Instruction *CxtI, const DominatorTree *DT,
283 Query(DL, AC, safeCxtI(V1, safeCxtI(V2, CxtI)), DT,
292 AssumptionCache *AC, const Instruction *CxtI,
295 V, Mask, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo));
303 const Instruction *CxtI,
306 V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo));
528 const Instruction *CxtI,
539 if (DT->dominates(Inv, CxtI))
541 } else if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor()) {
548 if (Inv->getParent() != CxtI->getParent())
559 if (&*I == CxtI)
566 if (Inv == CxtI)
571 // the control flow, not even CxtI itself.
572 for (BasicBlock::const_iterator I(CxtI), IE(Inv); I != IE; ++I)
576 return !isEphemeralValueOf(Inv, CxtI);
582 if (!Q.AC || !Q.CxtI)
622 assert(I->getFunction() == Q.CxtI->getFunction() &&
639 if (CmpExcludesZero(Cmp) && isValidAssumeForContext(I, Q.CxtI, Q.DT))
650 if (!Q.AC || !Q.CxtI)
662 assert(I->getParent()->getParent() == Q.CxtI->getParent()->getParent() &&
676 if (Arg == V && isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
682 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
707 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
715 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
728 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
741 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
754 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
767 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
783 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
799 isValidAssumeForContext(I, Q.CxtI, Q.DT) && C < BitWidth) {
811 isValidAssumeForContext(I, Q.CxtI, Q.DT) && C < BitWidth) {
823 isValidAssumeForContext(I, Q.CxtI, Q.DT) && C < BitWidth) {
833 isValidAssumeForContext(I, Q.CxtI, Q.DT) && C < BitWidth) {
845 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
858 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
871 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
884 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
897 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
908 isValidAssumeForContext(I, Q.CxtI, Q.DT)) {
941 auto *CxtI = const_cast<Instruction *>(Q.CxtI);
943 CxtI)
1456 RecQ.CxtI = RInst;
1461 RecQ.CxtI = LInst;
1528 RecQ.CxtI = P->getIncomingBlock(u)->getTerminator();
2180 if (isKnownNonNullFromDominatingCondition(V, Q.CxtI, Q.DT))
4163 AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT,
4166 V, DL, Depth, AC, CxtI, DT, ORE, UseInstrInfo);
4176 AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT,
4178 KnownBits LHSKnown = computeKnownBits(LHS, DL, /*Depth=*/0, AC, CxtI, DT,
4180 KnownBits RHSKnown = computeKnownBits(RHS, DL, /*Depth=*/0, AC, CxtI, DT,
4190 const Instruction *CxtI,
4202 unsigned SignBits = ComputeNumSignBits(LHS, DL, 0, AC, CxtI, DT) +
4203 ComputeNumSignBits(RHS, DL, 0, AC, CxtI, DT);
4220 KnownBits LHSKnown = computeKnownBits(LHS, DL, /*Depth=*/0, AC, CxtI, DT,
4222 KnownBits RHSKnown = computeKnownBits(RHS, DL, /*Depth=*/0, AC, CxtI, DT,
4232 AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT,
4235 LHS, /*ForSigned=*/false, DL, /*Depth=*/0, AC, CxtI, DT,
4238 RHS, /*ForSigned=*/false, DL, /*Depth=*/0, AC, CxtI, DT,
4248 const Instruction *CxtI,
4268 if (ComputeNumSignBits(LHS, DL, 0, AC, CxtI, DT) > 1 &&
4269 ComputeNumSignBits(RHS, DL, 0, AC, CxtI, DT) > 1)
4273 LHS, /*ForSigned=*/true, DL, /*Depth=*/0, AC, CxtI, DT);
4275 RHS, /*ForSigned=*/true, DL, /*Depth=*/0, AC, CxtI, DT);
4297 Add, AddKnown, /*Depth=*/0, Query(DL, AC, CxtI, DT, true));
4310 const Instruction *CxtI,
4313 LHS, /*ForSigned=*/false, DL, /*Depth=*/0, AC, CxtI, DT);
4315 RHS, /*ForSigned=*/false, DL, /*Depth=*/0, AC, CxtI, DT);
4323 const Instruction *CxtI,
4327 if (ComputeNumSignBits(LHS, DL, 0, AC, CxtI, DT) > 1 &&
4328 ComputeNumSignBits(RHS, DL, 0, AC, CxtI, DT) > 1)
4332 LHS, /*ForSigned=*/true, DL, /*Depth=*/0, AC, CxtI, DT);
4334 RHS, /*ForSigned=*/true, DL, /*Depth=*/0, AC, CxtI, DT);
4406 const Instruction *CxtI,
4409 Add, DL, AC, CxtI, DT);
4416 const Instruction *CxtI,
4418 return ::computeOverflowForSignedAdd(LHS, RHS, nullptr, DL, AC, CxtI, DT);
5351 /*CxtI*/ nullptr, /*DT*/ nullptr);