Lines Matching refs:Depth
196 KnownBits &Known, unsigned Depth, const Query &Q);
198 static void computeKnownBits(const Value *V, KnownBits &Known, unsigned Depth, in computeKnownBits() argument
210 computeKnownBits(V, DemandedElts, Known, Depth, Q); in computeKnownBits()
214 const DataLayout &DL, unsigned Depth, in computeKnownBits() argument
218 ::computeKnownBits(V, Known, Depth, in computeKnownBits()
224 unsigned Depth, AssumptionCache *AC, in computeKnownBits() argument
227 ::computeKnownBits(V, DemandedElts, Known, Depth, in computeKnownBits()
232 unsigned Depth, const Query &Q);
234 static KnownBits computeKnownBits(const Value *V, unsigned Depth,
238 unsigned Depth, AssumptionCache *AC, in computeKnownBits() argument
244 V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo, ORE)); in computeKnownBits()
248 const DataLayout &DL, unsigned Depth, in computeKnownBits() argument
254 V, DemandedElts, Depth, in computeKnownBits()
294 static bool isKnownToBeAPowerOfTwo(const Value *V, bool OrZero, unsigned Depth,
298 bool OrZero, unsigned Depth, in isKnownToBeAPowerOfTwo() argument
302 V, OrZero, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo)); in isKnownToBeAPowerOfTwo()
306 unsigned Depth, const Query &Q);
308 static bool isKnownNonZero(const Value *V, unsigned Depth, const Query &Q);
310 bool llvm::isKnownNonZero(const Value *V, const DataLayout &DL, unsigned Depth, in isKnownNonZero() argument
313 return ::isKnownNonZero(V, Depth, in isKnownNonZero()
318 unsigned Depth, AssumptionCache *AC, in isKnownNonNegative() argument
322 computeKnownBits(V, DL, Depth, AC, CxtI, DT, nullptr, UseInstrInfo); in isKnownNonNegative()
326 bool llvm::isKnownPositive(const Value *V, const DataLayout &DL, unsigned Depth, in isKnownPositive() argument
334 return isKnownNonNegative(V, DL, Depth, AC, CxtI, DT, UseInstrInfo) && in isKnownPositive()
335 isKnownNonZero(V, DL, Depth, AC, CxtI, DT, UseInstrInfo); in isKnownPositive()
338 bool llvm::isKnownNegative(const Value *V, const DataLayout &DL, unsigned Depth, in isKnownNegative() argument
342 computeKnownBits(V, DL, Depth, AC, CxtI, DT, nullptr, UseInstrInfo); in isKnownNegative()
346 static bool isKnownNonEqual(const Value *V1, const Value *V2, unsigned Depth,
358 static bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth,
362 const DataLayout &DL, unsigned Depth, in MaskedValueIsZero() argument
366 V, Mask, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo)); in MaskedValueIsZero()
370 unsigned Depth, const Query &Q);
372 static unsigned ComputeNumSignBits(const Value *V, unsigned Depth, in ComputeNumSignBits() argument
382 return ComputeNumSignBits(V, DemandedElts, Depth, Q); in ComputeNumSignBits()
386 unsigned Depth, AssumptionCache *AC, in ComputeNumSignBits() argument
390 V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT, UseInstrInfo)); in ComputeNumSignBits()
396 unsigned Depth, const Query &Q) { in computeKnownBitsAddSub() argument
397 computeKnownBits(Op1, DemandedElts, KnownOut, Depth + 1, Q); in computeKnownBitsAddSub()
404 computeKnownBits(Op0, DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsAddSub()
410 KnownBits &Known2, unsigned Depth, in computeKnownBitsMul() argument
412 computeKnownBits(Op1, DemandedElts, Known, Depth + 1, Q); in computeKnownBitsMul()
413 computeKnownBits(Op0, DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsMul()
632 unsigned Depth, const Query &Q) { in computeKnownBitsFromAssume() argument
680 if (Depth == MaxAnalysisRecursionDepth) in computeKnownBitsFromAssume()
710 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
718 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
720 computeKnownBits(B, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
731 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
733 computeKnownBits(B, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
744 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
746 computeKnownBits(B, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
757 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
759 computeKnownBits(B, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
770 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
772 computeKnownBits(B, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
786 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
788 computeKnownBits(B, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
802 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
815 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
827 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
837 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
849 computeKnownBits(A, Depth + 1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
862 computeKnownBits(A, Depth + 1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
875 computeKnownBits(A, Depth + 1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
888 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
901 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
912 computeKnownBits(A, Depth+1, QueryNoAC).anyextOrTrunc(BitWidth); in computeKnownBitsFromAssume()
924 if (isKnownToBeAPowerOfTwo(A, false, Depth + 1, QueryNoAC)) in computeKnownBitsFromAssume()
963 KnownBits &Known2, unsigned Depth, const Query &Q, in computeKnownBitsFromShiftOperator() argument
966 computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromShiftOperator()
967 computeKnownBits(I->getOperand(1), DemandedElts, Known, Depth + 1, Q); in computeKnownBitsFromShiftOperator()
1011 isKnownNonZero(I->getOperand(1), DemandedElts, Depth + 1, Q); in computeKnownBitsFromShiftOperator()
1031 isKnownNonZero(I->getOperand(1), DemandedElts, Depth + 1, Q); in computeKnownBitsFromShiftOperator()
1048 KnownBits &Known, unsigned Depth, in computeKnownBitsFromOperator() argument
1062 computeKnownBits(I->getOperand(1), DemandedElts, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1063 computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1076 computeKnownBits(Y, DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1083 computeKnownBits(I->getOperand(1), DemandedElts, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1084 computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1089 computeKnownBits(I->getOperand(1), DemandedElts, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1090 computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1097 Known, Known2, Depth, Q); in computeKnownBitsFromOperator()
1101 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1102 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1110 computeKnownBits(RHS, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1111 computeKnownBits(LHS, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1131 computeKnownBits(I->getOperand(2), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1132 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1173 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1183 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1222 Depth + 1, Q); in computeKnownBitsFromOperator()
1234 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1254 computeKnownBitsFromShiftOperator(I, DemandedElts, Known, Known2, Depth, Q, in computeKnownBitsFromOperator()
1266 computeKnownBitsFromShiftOperator(I, DemandedElts, Known, Known2, Depth, Q, in computeKnownBitsFromOperator()
1278 computeKnownBitsFromShiftOperator(I, DemandedElts, Known, Known2, Depth, Q, in computeKnownBitsFromOperator()
1285 DemandedElts, Known, Known2, Depth, Q); in computeKnownBitsFromOperator()
1291 DemandedElts, Known, Known2, Depth, Q); in computeKnownBitsFromOperator()
1295 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1296 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1301 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1302 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1311 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1354 computeKnownBits(Index, IndexBits, Depth + 1, Q); in computeKnownBitsFromOperator()
1420 computeKnownBits(R, DemandedElts, Known2, Depth + 1, RecQ); in computeKnownBitsFromOperator()
1460 computeKnownBits(R, Known2, Depth + 1, RecQ); in computeKnownBitsFromOperator()
1465 computeKnownBits(L, Known3, Depth + 1, RecQ); in computeKnownBitsFromOperator()
1513 if (Depth < MaxAnalysisRecursionDepth - 1 && !Known.Zero && !Known.One) { in computeKnownBitsFromOperator()
1554 computeKnownBits(RV, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1562 computeKnownBits(I->getOperand(0), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1568 computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1573 computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1578 computeKnownBits(I->getOperand(0), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1589 computeKnownBits(I->getOperand(0), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1600 computeKnownBits(I->getOperand(0), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1622 computeKnownBits(I->getOperand(0), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1623 computeKnownBits(I->getOperand(1), Known3, Depth + 1, Q); in computeKnownBitsFromOperator()
1634 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1635 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1663 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1664 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1668 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1669 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1673 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1674 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1678 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1679 computeKnownBits(I->getOperand(1), Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1713 computeKnownBits(LHS, DemandedLHS, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1720 computeKnownBits(RHS, DemandedRHS, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1740 computeKnownBits(Elt, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1749 computeKnownBits(Vec, DemandedVecElts, Known2, Depth + 1, Q); in computeKnownBitsFromOperator()
1769 computeKnownBits(Vec, DemandedVecElts, Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1783 Known, Known2, Depth, Q); in computeKnownBitsFromOperator()
1789 Known, Known2, Depth, Q); in computeKnownBitsFromOperator()
1794 DemandedElts, Known, Known2, Depth, Q); in computeKnownBitsFromOperator()
1802 Depth + 1)) in computeKnownBitsFromOperator()
1803 computeKnownBits(I->getOperand(0), Known, Depth + 1, Q); in computeKnownBitsFromOperator()
1811 unsigned Depth, const Query &Q) { in computeKnownBits() argument
1813 computeKnownBits(V, DemandedElts, Known, Depth, Q); in computeKnownBits()
1819 KnownBits computeKnownBits(const Value *V, unsigned Depth, const Query &Q) { in computeKnownBits() argument
1821 computeKnownBits(V, Known, Depth, Q); in computeKnownBits()
1841 KnownBits &Known, unsigned Depth, const Query &Q) { in computeKnownBits() argument
1850 assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth"); in computeKnownBits()
1937 if (Depth == MaxAnalysisRecursionDepth) in computeKnownBits()
1944 computeKnownBits(GA->getAliasee(), Known, Depth + 1, Q); in computeKnownBits()
1949 computeKnownBitsFromOperator(I, DemandedElts, Known, Depth, Q); in computeKnownBits()
1961 computeKnownBitsFromAssume(V, Known, Depth, Q); in computeKnownBits()
1970 bool isKnownToBeAPowerOfTwo(const Value *V, bool OrZero, unsigned Depth, in isKnownToBeAPowerOfTwo() argument
1972 assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth"); in isKnownToBeAPowerOfTwo()
1991 if (Depth++ == MaxAnalysisRecursionDepth) in isKnownToBeAPowerOfTwo()
1999 return isKnownToBeAPowerOfTwo(X, /*OrZero*/ true, Depth, Q); in isKnownToBeAPowerOfTwo()
2002 return isKnownToBeAPowerOfTwo(ZI->getOperand(0), OrZero, Depth, Q); in isKnownToBeAPowerOfTwo()
2005 return isKnownToBeAPowerOfTwo(SI->getTrueValue(), OrZero, Depth, Q) && in isKnownToBeAPowerOfTwo()
2006 isKnownToBeAPowerOfTwo(SI->getFalseValue(), OrZero, Depth, Q); in isKnownToBeAPowerOfTwo()
2010 return isKnownToBeAPowerOfTwo(X, OrZero, Depth, Q) && in isKnownToBeAPowerOfTwo()
2011 isKnownToBeAPowerOfTwo(Y, OrZero, Depth, Q); in isKnownToBeAPowerOfTwo()
2016 if (isKnownToBeAPowerOfTwo(X, /*OrZero*/ true, Depth, Q) || in isKnownToBeAPowerOfTwo()
2017 isKnownToBeAPowerOfTwo(Y, /*OrZero*/ true, Depth, Q)) in isKnownToBeAPowerOfTwo()
2033 if (isKnownToBeAPowerOfTwo(Y, OrZero, Depth, Q)) in isKnownToBeAPowerOfTwo()
2037 if (isKnownToBeAPowerOfTwo(X, OrZero, Depth, Q)) in isKnownToBeAPowerOfTwo()
2042 computeKnownBits(X, LHSBits, Depth, Q); in isKnownToBeAPowerOfTwo()
2045 computeKnownBits(Y, RHSBits, Depth, Q); in isKnownToBeAPowerOfTwo()
2063 Depth, Q); in isKnownToBeAPowerOfTwo()
2075 static bool isGEPKnownNonNull(const GEPOperator *GEP, unsigned Depth, in isGEPKnownNonNull() argument
2090 if (isKnownNonZero(GEP->getPointerOperand(), Depth, Q)) in isGEPKnownNonNull()
2126 if (Depth++ >= MaxAnalysisRecursionDepth) in isGEPKnownNonNull()
2129 if (isKnownNonZero(GTI.getOperand(), Depth, Q)) in isGEPKnownNonNull()
2280 bool isKnownNonZero(const Value *V, const APInt &DemandedElts, unsigned Depth, in isKnownNonZero() argument
2301 return isKnownNonZero(CE->getOperand(0), Depth, Q); in isKnownNonZero()
2346 if (Depth++ >= MaxAnalysisRecursionDepth) in isKnownNonZero()
2374 return isKnownNonZero(RP, Depth, Q); in isKnownNonZero()
2391 return isGEPKnownNonNull(GEP, Depth, Q); in isKnownNonZero()
2394 return isKnownNonZero(BCO->getOperand(0), Depth, Q); in isKnownNonZero()
2399 return isKnownNonZero(I2P->getOperand(0), Depth, Q); in isKnownNonZero()
2407 return isKnownNonZero(P2I->getOperand(0), Depth, Q); in isKnownNonZero()
2414 return isKnownNonZero(X, DemandedElts, Depth, Q) || in isKnownNonZero()
2415 isKnownNonZero(Y, DemandedElts, Depth, Q); in isKnownNonZero()
2419 return isKnownNonZero(cast<Instruction>(V)->getOperand(0), Depth, Q); in isKnownNonZero()
2427 return isKnownNonZero(X, Depth, Q); in isKnownNonZero()
2430 computeKnownBits(X, DemandedElts, Known, Depth, Q); in isKnownNonZero()
2440 return isKnownNonZero(X, Depth, Q); in isKnownNonZero()
2442 KnownBits Known = computeKnownBits(X, DemandedElts, Depth, Q); in isKnownNonZero()
2456 return isKnownNonZero(X, DemandedElts, Depth, Q); in isKnownNonZero()
2461 return isKnownNonZero(X, DemandedElts, Depth, Q); in isKnownNonZero()
2465 KnownBits XKnown = computeKnownBits(X, DemandedElts, Depth, Q); in isKnownNonZero()
2466 KnownBits YKnown = computeKnownBits(Y, DemandedElts, Depth, Q); in isKnownNonZero()
2471 if (isKnownNonZero(X, DemandedElts, Depth, Q) || in isKnownNonZero()
2472 isKnownNonZero(Y, DemandedElts, Depth, Q)) in isKnownNonZero()
2491 isKnownToBeAPowerOfTwo(Y, /*OrZero*/ false, Depth, Q)) in isKnownNonZero()
2494 isKnownToBeAPowerOfTwo(X, /*OrZero*/ false, Depth, Q)) in isKnownNonZero()
2503 isKnownNonZero(X, DemandedElts, Depth, Q) && in isKnownNonZero()
2504 isKnownNonZero(Y, DemandedElts, Depth, Q)) in isKnownNonZero()
2509 if (isKnownNonZero(SI->getTrueValue(), DemandedElts, Depth, Q) && in isKnownNonZero()
2510 isKnownNonZero(SI->getFalseValue(), DemandedElts, Depth, Q)) in isKnownNonZero()
2520 unsigned NewDepth = std::max(Depth, MaxAnalysisRecursionDepth - 1); in isKnownNonZero()
2538 return isKnownNonZero(Vec, DemandedVecElts, Depth, Q); in isKnownNonZero()
2544 if (isKnownNonZero(Op, Depth, Q) && in isKnownNonZero()
2545 isGuaranteedNotToBePoison(Op, Q.AC, Q.CxtI, Q.DT, Depth)) in isKnownNonZero()
2550 computeKnownBits(V, DemandedElts, Known, Depth, Q); in isKnownNonZero()
2554 bool isKnownNonZero(const Value* V, unsigned Depth, const Query& Q) { in isKnownNonZero() argument
2563 return isKnownNonZero(V, DemandedElts, Depth, Q); in isKnownNonZero()
2674 static bool isAddOfNonZero(const Value *V1, const Value *V2, unsigned Depth, in isAddOfNonZero() argument
2686 return isKnownNonZero(Op, Depth + 1, Q); in isAddOfNonZero()
2691 static bool isNonEqualMul(const Value *V1, const Value *V2, unsigned Depth, in isNonEqualMul() argument
2698 isKnownNonZero(V1, Depth + 1, Q); in isNonEqualMul()
2705 static bool isNonEqualShl(const Value *V1, const Value *V2, unsigned Depth, in isNonEqualShl() argument
2711 !C->isNullValue() && isKnownNonZero(V1, Depth + 1, Q); in isNonEqualShl()
2717 unsigned Depth, const Query &Q) { in isNonEqualPHIs() argument
2739 if (!isKnownNonEqual(IV1, IV2, Depth + 1, RecQ)) in isNonEqualPHIs()
2747 static bool isKnownNonEqual(const Value *V1, const Value *V2, unsigned Depth, in isKnownNonEqual() argument
2755 if (Depth >= MaxAnalysisRecursionDepth) in isKnownNonEqual()
2765 return isKnownNonEqual(Values->first, Values->second, Depth + 1, Q); in isKnownNonEqual()
2771 if (isNonEqualPHIs(PN1, PN2, Depth, Q)) in isKnownNonEqual()
2776 if (isAddOfNonZero(V1, V2, Depth, Q) || isAddOfNonZero(V2, V1, Depth, Q)) in isKnownNonEqual()
2779 if (isNonEqualMul(V1, V2, Depth, Q) || isNonEqualMul(V2, V1, Depth, Q)) in isKnownNonEqual()
2782 if (isNonEqualShl(V1, V2, Depth, Q) || isNonEqualShl(V2, V1, Depth, Q)) in isKnownNonEqual()
2788 KnownBits Known1 = computeKnownBits(V1, Depth, Q); in isKnownNonEqual()
2789 KnownBits Known2 = computeKnownBits(V2, Depth, Q); in isKnownNonEqual()
2807 bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth, in MaskedValueIsZero() argument
2810 computeKnownBits(V, Known, Depth, Q); in MaskedValueIsZero()
2874 unsigned Depth, const Query &Q);
2877 unsigned Depth, const Query &Q) { in ComputeNumSignBits() argument
2878 unsigned Result = ComputeNumSignBitsImpl(V, DemandedElts, Depth, Q); in ComputeNumSignBits()
2892 unsigned Depth, const Query &Q) { in ComputeNumSignBitsImpl() argument
2901 assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth"); in ComputeNumSignBitsImpl()
2928 if (Depth == MaxAnalysisRecursionDepth) in ComputeNumSignBitsImpl()
2936 return ComputeNumSignBits(U->getOperand(0), Depth + 1, Q) + Tmp; in ComputeNumSignBitsImpl()
2948 unsigned NumBits = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
2957 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
2988 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3004 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3016 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3018 Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth + 1, Q); in ComputeNumSignBitsImpl()
3034 Tmp = ComputeNumSignBits(U->getOperand(1), Depth + 1, Q); in ComputeNumSignBitsImpl()
3036 Tmp2 = ComputeNumSignBits(U->getOperand(2), Depth + 1, Q); in ComputeNumSignBitsImpl()
3043 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3050 computeKnownBits(U->getOperand(0), Known, Depth + 1, Q); in ComputeNumSignBitsImpl()
3063 Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth + 1, Q); in ComputeNumSignBitsImpl()
3068 Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth + 1, Q); in ComputeNumSignBitsImpl()
3075 computeKnownBits(U->getOperand(1), Known, Depth + 1, Q); in ComputeNumSignBitsImpl()
3092 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3099 unsigned SignBitsOp0 = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3101 unsigned SignBitsOp1 = ComputeNumSignBits(U->getOperand(1), Depth + 1, Q); in ComputeNumSignBitsImpl()
3124 Tmp, ComputeNumSignBits(PN->getIncomingValue(i), Depth + 1, RecQ)); in ComputeNumSignBitsImpl()
3139 return ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3157 Tmp = ComputeNumSignBits(LHS, DemandedLHS, Depth + 1, Q); in ComputeNumSignBitsImpl()
3165 Tmp2 = ComputeNumSignBits(RHS, DemandedRHS, Depth + 1, Q); in ComputeNumSignBitsImpl()
3180 Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
3201 computeKnownBits(V, DemandedElts, Known, Depth, Q); in ComputeNumSignBitsImpl()
3213 bool LookThroughSExt, unsigned Depth) { in ComputeMultiple() argument
3215 assert(Depth <= MaxAnalysisRecursionDepth && "Limit Search Depth"); in ComputeMultiple()
3243 if (Depth == MaxAnalysisRecursionDepth) return false; in ComputeMultiple()
3256 LookThroughSExt, Depth+1); in ComputeMultiple()
3274 if (ComputeMultiple(Op0, Base, Mul0, LookThroughSExt, Depth+1)) { in ComputeMultiple()
3298 if (ComputeMultiple(Op1, Base, Mul1, LookThroughSExt, Depth+1)) { in ComputeMultiple()
3441 unsigned Depth) { in CannotBeNegativeZero() argument
3445 if (Depth == MaxAnalysisRecursionDepth) in CannotBeNegativeZero()
3468 return CannotBeNegativeZero(Call->getArgOperand(0), TLI, Depth + 1); in CannotBeNegativeZero()
3484 unsigned Depth) { in cannotBeOrderedLessThanZeroImpl() argument
3513 if (Depth == MaxAnalysisRecursionDepth) in cannotBeOrderedLessThanZeroImpl()
3538 Depth + 1) && in cannotBeOrderedLessThanZeroImpl()
3540 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3543 Depth + 1) && in cannotBeOrderedLessThanZeroImpl()
3545 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3550 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3556 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3578 cannotBeOrderedLessThanZeroImpl(V, TLI, false, Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3588 Depth + 1) || in cannotBeOrderedLessThanZeroImpl()
3590 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3594 Depth + 1) && in cannotBeOrderedLessThanZeroImpl()
3596 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3629 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3637 Depth + 1); in cannotBeOrderedLessThanZeroImpl()
3654 unsigned Depth) { in isKnownNeverInfinity() argument
3666 if (Depth == MaxAnalysisRecursionDepth) in isKnownNeverInfinity()
3672 return isKnownNeverInfinity(Inst->getOperand(1), TLI, Depth + 1) && in isKnownNeverInfinity()
3673 isKnownNeverInfinity(Inst->getOperand(2), TLI, Depth + 1); in isKnownNeverInfinity()
3718 unsigned Depth) { in isKnownNeverNaN() argument
3730 if (Depth == MaxAnalysisRecursionDepth) in isKnownNeverNaN()
3738 return isKnownNeverNaN(Inst->getOperand(0), TLI, Depth + 1) && in isKnownNeverNaN()
3739 isKnownNeverNaN(Inst->getOperand(1), TLI, Depth + 1) && in isKnownNeverNaN()
3740 (isKnownNeverInfinity(Inst->getOperand(0), TLI, Depth + 1) || in isKnownNeverNaN()
3741 isKnownNeverInfinity(Inst->getOperand(1), TLI, Depth + 1)); in isKnownNeverNaN()
3746 return isKnownNeverNaN(Inst->getOperand(0), TLI, Depth + 1) && in isKnownNeverNaN()
3747 isKnownNeverInfinity(Inst->getOperand(0), TLI, Depth + 1) && in isKnownNeverNaN()
3748 isKnownNeverNaN(Inst->getOperand(1), TLI, Depth + 1) && in isKnownNeverNaN()
3749 isKnownNeverInfinity(Inst->getOperand(1), TLI, Depth + 1); in isKnownNeverNaN()
3757 return isKnownNeverNaN(Inst->getOperand(1), TLI, Depth + 1) && in isKnownNeverNaN()
3758 isKnownNeverNaN(Inst->getOperand(2), TLI, Depth + 1); in isKnownNeverNaN()
3765 return isKnownNeverNaN(Inst->getOperand(0), TLI, Depth + 1); in isKnownNeverNaN()
3785 return isKnownNeverNaN(II->getArgOperand(0), TLI, Depth + 1); in isKnownNeverNaN()
3787 return isKnownNeverNaN(II->getArgOperand(0), TLI, Depth + 1) && in isKnownNeverNaN()
3792 return isKnownNeverNaN(II->getArgOperand(0), TLI, Depth + 1) || in isKnownNeverNaN()
3793 isKnownNeverNaN(II->getArgOperand(1), TLI, Depth + 1); in isKnownNeverNaN()
4689 const Value *V, bool ForSigned, const DataLayout &DL, unsigned Depth, in computeConstantRangeIncludingKnownBits() argument
4693 V, DL, Depth, AC, CxtI, DT, ORE, UseInstrInfo); in computeConstantRangeIncludingKnownBits()
5047 const Value *V, unsigned Depth) { in directlyImpliesPoison() argument
5052 if (Depth >= MaxDepth) in directlyImpliesPoison()
5058 return directlyImpliesPoison(ValAssumedPoison, Op, Depth + 1); in directlyImpliesPoison()
5064 Depth + 1); in directlyImpliesPoison()
5078 unsigned Depth) { in impliesPoison() argument
5086 if (Depth >= MaxDepth) in impliesPoison()
5092 return impliesPoison(Op, V, Depth + 1); in impliesPoison()
5109 unsigned Depth, bool PoisonOnly) { in isGuaranteedNotToBeUndefOrPoison() argument
5110 if (Depth >= MaxAnalysisRecursionDepth) in isGuaranteedNotToBeUndefOrPoison()
5149 return isGuaranteedNotToBeUndefOrPoison(V, AC, CtxI, DT, Depth + 1, in isGuaranteedNotToBeUndefOrPoison()
5170 DT, Depth + 1, PoisonOnly)) { in isGuaranteedNotToBeUndefOrPoison()
5238 unsigned Depth) { in isGuaranteedNotToBeUndefOrPoison() argument
5239 return ::isGuaranteedNotToBeUndefOrPoison(V, AC, CtxI, DT, Depth, false); in isGuaranteedNotToBeUndefOrPoison()
5244 const DominatorTree *DT, unsigned Depth) { in isGuaranteedNotToBePoison() argument
5245 return ::isGuaranteedNotToBeUndefOrPoison(V, AC, CtxI, DT, Depth, true); in isGuaranteedNotToBePoison()
5662 unsigned Depth) { in matchMinMaxOfMinMax() argument
5667 SelectPatternResult L = matchSelectPattern(TVal, A, B, nullptr, Depth + 1); in matchMinMaxOfMinMax()
5672 SelectPatternResult R = matchSelectPattern(FVal, C, D, nullptr, Depth + 1); in matchMinMaxOfMinMax()
5772 unsigned Depth) { in matchMinMax() argument
5781 SPR = matchMinMaxOfMinMax(Pred, CmpLHS, CmpRHS, TrueVal, FalseVal, Depth); in matchMinMax()
5879 unsigned Depth) { in matchSelectPattern() argument
6044 return matchMinMax(Pred, CmpLHS, CmpRHS, TrueVal, FalseVal, LHS, RHS, Depth); in matchSelectPattern()
6166 unsigned Depth) { in matchSelectPattern() argument
6167 if (Depth >= MaxAnalysisRecursionDepth) in matchSelectPattern()
6180 CastOp, Depth); in matchSelectPattern()
6185 Instruction::CastOps *CastOp, unsigned Depth) { in matchDecomposedSelectPattern() argument
6206 LHS, RHS, Depth); in matchDecomposedSelectPattern()
6215 LHS, RHS, Depth); in matchDecomposedSelectPattern()
6219 LHS, RHS, Depth); in matchDecomposedSelectPattern()
6374 unsigned Depth) { in isTruePredicate() argument
6411 computeKnownBits(X, Known, DL, Depth + 1, /*AC*/ nullptr, in isTruePredicate()
6435 const DataLayout &DL, unsigned Depth) { in isImpliedCondOperands() argument
6442 if (isTruePredicate(CmpInst::ICMP_SLE, BLHS, ALHS, DL, Depth) && in isImpliedCondOperands()
6443 isTruePredicate(CmpInst::ICMP_SLE, ARHS, BRHS, DL, Depth)) in isImpliedCondOperands()
6449 if (isTruePredicate(CmpInst::ICMP_ULE, BLHS, ALHS, DL, Depth) && in isImpliedCondOperands()
6450 isTruePredicate(CmpInst::ICMP_ULE, ARHS, BRHS, DL, Depth)) in isImpliedCondOperands()
6511 unsigned Depth) { in isImpliedCondICmps() argument
6543 return isImpliedCondOperands(APred, ALHS, ARHS, BLHS, BRHS, DL, Depth); in isImpliedCondICmps()
6553 const DataLayout &DL, bool LHSIsTrue, unsigned Depth) { in isImpliedCondAndOr() argument
6560 assert(Depth <= MaxAnalysisRecursionDepth && "Hit recursion limit"); in isImpliedCondAndOr()
6570 ALHS, RHSPred, RHSOp0, RHSOp1, DL, LHSIsTrue, Depth + 1)) in isImpliedCondAndOr()
6573 ARHS, RHSPred, RHSOp0, RHSOp1, DL, LHSIsTrue, Depth + 1)) in isImpliedCondAndOr()
6583 const DataLayout &DL, bool LHSIsTrue, unsigned Depth) { in isImpliedCondition() argument
6585 if (Depth == MaxAnalysisRecursionDepth) in isImpliedCondition()
6606 Depth); in isImpliedCondition()
6616 Depth); in isImpliedCondition()
6623 unsigned Depth) { in isImpliedCondition() argument
6632 LHSIsTrue, Depth); in isImpliedCondition()
7002 unsigned Depth) { in computeConstantRange() argument
7005 if (Depth == MaxAnalysisRecursionDepth) in computeConstantRange()
7048 AC, I, Depth + 1); in computeConstantRange()