• Home
  • Raw
  • Download

Lines Matching refs:APInt

122 static void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
125 void llvm::computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, in computeKnownBits()
141 APInt LHSKnownZero(IT->getBitWidth(), 0), LHSKnownOne(IT->getBitWidth(), 0); in haveNoCommonBitsSet()
142 APInt RHSKnownZero(IT->getBitWidth(), 0), RHSKnownOne(IT->getBitWidth(), 0); in haveNoCommonBitsSet()
216 static bool MaskedValueIsZero(Value *V, const APInt &Mask, unsigned Depth,
219 bool llvm::MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, in MaskedValueIsZero()
236 APInt &KnownZero, APInt &KnownOne, in computeKnownBitsAddSub()
237 APInt &KnownZero2, APInt &KnownOne2, in computeKnownBitsAddSub()
248 APInt MaskV = APInt::getHighBitsSet(BitWidth, NLZ+1); in computeKnownBitsAddSub()
257 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2); in computeKnownBitsAddSub()
267 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in computeKnownBitsAddSub()
272 APInt CarryIn(BitWidth, 0); in computeKnownBitsAddSub()
279 APInt PossibleSumZero = ~LHSKnownZero + ~KnownZero2 + CarryIn; in computeKnownBitsAddSub()
280 APInt PossibleSumOne = LHSKnownOne + KnownOne2 + CarryIn; in computeKnownBitsAddSub()
283 APInt CarryKnownZero = ~(PossibleSumZero ^ LHSKnownZero ^ KnownZero2); in computeKnownBitsAddSub()
284 APInt CarryKnownOne = PossibleSumOne ^ LHSKnownOne ^ KnownOne2; in computeKnownBitsAddSub()
287 APInt LHSKnown = LHSKnownZero | LHSKnownOne; in computeKnownBitsAddSub()
288 APInt RHSKnown = KnownZero2 | KnownOne2; in computeKnownBitsAddSub()
289 APInt CarryKnown = CarryKnownZero | CarryKnownOne; in computeKnownBitsAddSub()
290 APInt Known = LHSKnown & RHSKnown & CarryKnown; in computeKnownBitsAddSub()
305 KnownZero |= APInt::getSignBit(BitWidth); in computeKnownBitsAddSub()
309 KnownOne |= APInt::getSignBit(BitWidth); in computeKnownBitsAddSub()
315 APInt &KnownZero, APInt &KnownOne, in computeKnownBitsMul()
316 APInt &KnownZero2, APInt &KnownOne2, in computeKnownBitsMul()
360 KnownZero = APInt::getLowBitsSet(BitWidth, TrailZ) | in computeKnownBitsMul()
361 APInt::getHighBitsSet(BitWidth, LeadZ); in computeKnownBitsMul()
375 APInt &KnownZero, in computeKnownBitsFromRangeMetadata()
376 APInt &KnownOne) { in computeKnownBitsFromRangeMetadata()
395 APInt Mask = APInt::getHighBitsSet(BitWidth, CommonPrefixBits); in computeKnownBitsFromRangeMetadata()
519 static void computeKnownBitsFromAssume(Value *V, APInt &KnownZero, in computeKnownBitsFromAssume()
520 APInt &KnownOne, unsigned Depth, in computeKnownBitsFromAssume()
568 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
577 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
579 APInt MaskKnownZero(BitWidth, 0), MaskKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
591 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
593 APInt MaskKnownZero(BitWidth, 0), MaskKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
605 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
607 APInt BKnownZero(BitWidth, 0), BKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
619 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
621 APInt BKnownZero(BitWidth, 0), BKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
633 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
635 APInt BKnownZero(BitWidth, 0), BKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
650 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
652 APInt BKnownZero(BitWidth, 0), BKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
667 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
678 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
691 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
704 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
714 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
719 KnownZero |= APInt::getSignBit(BitWidth); in computeKnownBitsFromAssume()
725 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
730 KnownZero |= APInt::getSignBit(BitWidth); in computeKnownBitsFromAssume()
736 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
741 KnownOne |= APInt::getSignBit(BitWidth); in computeKnownBitsFromAssume()
747 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
752 KnownOne |= APInt::getSignBit(BitWidth); in computeKnownBitsFromAssume()
758 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
763 APInt::getHighBitsSet(BitWidth, RHSKnownZero.countLeadingOnes()); in computeKnownBitsFromAssume()
768 APInt RHSKnownZero(BitWidth, 0), RHSKnownOne(BitWidth, 0); in computeKnownBitsFromAssume()
775 APInt::getHighBitsSet(BitWidth, RHSKnownZero.countLeadingOnes()+1); in computeKnownBitsFromAssume()
778 APInt::getHighBitsSet(BitWidth, RHSKnownZero.countLeadingOnes()); in computeKnownBitsFromAssume()
793 APInt &KnownZero, APInt &KnownOne, in computeKnownBitsFromShiftOperator()
794 APInt &KnownZero2, APInt &KnownOne2, in computeKnownBitsFromShiftOperator()
835 KnownZero = KnownOne = APInt::getAllOnesValue(BitWidth); in computeKnownBitsFromShiftOperator()
869 static void computeKnownBitsFromOperator(Operator *I, APInt &KnownZero, in computeKnownBitsFromOperator()
870 APInt &KnownOne, unsigned Depth, in computeKnownBitsFromOperator()
874 APInt KnownZero2(KnownZero), KnownOne2(KnownOne); in computeKnownBitsFromOperator()
901 APInt KnownZero3(BitWidth, 0), KnownOne3(BitWidth, 0); in computeKnownBitsFromOperator()
904 KnownZero |= APInt::getLowBitsSet(BitWidth, 1); in computeKnownBitsFromOperator()
923 APInt KnownZeroOut = (KnownZero & KnownZero2) | (KnownOne & KnownOne2); in computeKnownBitsFromOperator()
950 KnownZero = APInt::getHighBitsSet(BitWidth, LeadZ); in computeKnownBitsFromOperator()
989 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); in computeKnownBitsFromOperator()
1016 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); in computeKnownBitsFromOperator()
1018 KnownOne |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); in computeKnownBitsFromOperator()
1023 auto KZF = [BitWidth](const APInt &KnownZero, unsigned ShiftAmt) { in computeKnownBitsFromOperator()
1025 APInt::getLowBitsSet(BitWidth, ShiftAmt); // Low bits known 0. in computeKnownBitsFromOperator()
1028 auto KOF = [BitWidth](const APInt &KnownOne, unsigned ShiftAmt) { in computeKnownBitsFromOperator()
1039 auto KZF = [BitWidth](const APInt &KnownZero, unsigned ShiftAmt) { in computeKnownBitsFromOperator()
1042 APInt::getHighBitsSet(BitWidth, ShiftAmt); in computeKnownBitsFromOperator()
1045 auto KOF = [BitWidth](const APInt &KnownOne, unsigned ShiftAmt) { in computeKnownBitsFromOperator()
1056 auto KZF = [BitWidth](const APInt &KnownZero, unsigned ShiftAmt) { in computeKnownBitsFromOperator()
1060 auto KOF = [BitWidth](const APInt &KnownOne, unsigned ShiftAmt) { in computeKnownBitsFromOperator()
1085 APInt RA = Rem->getValue().abs(); in computeKnownBitsFromOperator()
1087 APInt LowBits = RA - 1; in computeKnownBitsFromOperator()
1112 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0); in computeKnownBitsFromOperator()
1123 const APInt &RA = Rem->getValue(); in computeKnownBitsFromOperator()
1125 APInt LowBits = (RA - 1); in computeKnownBitsFromOperator()
1141 KnownZero = APInt::getHighBitsSet(BitWidth, Leaders); in computeKnownBitsFromOperator()
1152 KnownZero = APInt::getLowBitsSet(BitWidth, countTrailingZeros(Align)); in computeKnownBitsFromOperator()
1158 APInt LocalKnownZero(BitWidth, 0), LocalKnownOne(BitWidth, 0); in computeKnownBitsFromOperator()
1191 LocalKnownZero = LocalKnownOne = APInt(GEPOpiBits, 0); in computeKnownBitsFromOperator()
1199 KnownZero = APInt::getLowBitsSet(BitWidth, TrailZ); in computeKnownBitsFromOperator()
1237 APInt KnownZero3(KnownZero), KnownOne3(KnownOne); in computeKnownBitsFromOperator()
1240 KnownZero = APInt::getLowBitsSet(BitWidth, in computeKnownBitsFromOperator()
1259 KnownZero = APInt::getAllOnesValue(BitWidth); in computeKnownBitsFromOperator()
1260 KnownOne = APInt::getAllOnesValue(BitWidth); in computeKnownBitsFromOperator()
1265 KnownZero2 = APInt(BitWidth, 0); in computeKnownBitsFromOperator()
1266 KnownOne2 = APInt(BitWidth, 0); in computeKnownBitsFromOperator()
1306 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - LowBits); in computeKnownBitsFromOperator()
1315 APInt(BitWidth, BitsPossiblySet).countLeadingZeros(); in computeKnownBitsFromOperator()
1317 KnownZero |= APInt::getHighBitsSet(BitWidth, LeadingZeros); in computeKnownBitsFromOperator()
1324 KnownZero |= APInt::getHighBitsSet(64, 32); in computeKnownBitsFromOperator()
1375 void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, in computeKnownBits()
1400 KnownZero = APInt::getAllOnesValue(BitWidth); in computeKnownBits()
1409 APInt Elt(KnownZero.getBitWidth(), 0); in computeKnownBits()
1422 APInt Elt(KnownZero.getBitWidth(), 0); in computeKnownBits()
1461 KnownZero |= APInt::getLowBitsSet(BitWidth, countTrailingZeros(Align)); in computeKnownBits()
1483 APInt ZeroBits(BitWidth, 0); in ComputeSignBit()
1484 APInt OneBits(BitWidth, 0); in ComputeSignBit()
1500 const APInt *ConstIntOrConstSplatInt; in isKnownToBeAPowerOfTwo()
1559 APInt LHSZeroBits(BitWidth, 0), LHSOneBits(BitWidth, 0); in isKnownToBeAPowerOfTwo()
1562 APInt RHSZeroBits(BitWidth, 0), RHSOneBits(BitWidth, 0); in isKnownToBeAPowerOfTwo()
1652 static bool rangeMetadataExcludesValue(MDNode* Ranges, const APInt& Value) { in rangeMetadataExcludesValue()
1700 const APInt ZeroValue(Ty->getBitWidth(), 0); in isKnownNonZero()
1739 APInt KnownZero(BitWidth, 0); in isKnownNonZero()
1740 APInt KnownOne(BitWidth, 0); in isKnownNonZero()
1762 APInt KnownZero(BitWidth, 0); in isKnownNonZero()
1763 APInt KnownOne(BitWidth, 0); in isKnownNonZero()
1795 APInt KnownZero(BitWidth, 0); in isKnownNonZero()
1796 APInt KnownOne(BitWidth, 0); in isKnownNonZero()
1797 APInt Mask = APInt::getSignedMaxValue(BitWidth); in isKnownNonZero()
1861 APInt KnownZero(BitWidth, 0); in isKnownNonZero()
1862 APInt KnownOne(BitWidth, 0); in isKnownNonZero()
1896 APInt KnownZero1(BitWidth, 0); in isKnownNonEqual()
1897 APInt KnownOne1(BitWidth, 0); in isKnownNonEqual()
1899 APInt KnownZero2(BitWidth, 0); in isKnownNonEqual()
1900 APInt KnownOne2(BitWidth, 0); in isKnownNonEqual()
1919 bool MaskedValueIsZero(Value *V, const APInt &Mask, unsigned Depth, in MaskedValueIsZero()
1921 APInt KnownZero(Mask.getBitWidth(), 0), KnownOne(Mask.getBitWidth(), 0); in MaskedValueIsZero()
1944 APInt EltVal = Elt->getValue(); in computeNumSignBitsVectorConstant()
1978 const APInt *Denominator; in ComputeNumSignBits()
1996 const APInt *Denominator; in ComputeNumSignBits()
2033 const APInt *ShAmt; in ComputeNumSignBits()
2041 const APInt *ShAmt; in ComputeNumSignBits()
2081 APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); in ComputeNumSignBits()
2086 if ((KnownZero | APInt(TyBits, 1)).isAllOnesValue()) in ComputeNumSignBits()
2106 APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); in ComputeNumSignBits()
2110 if ((KnownZero | APInt(TyBits, 1)).isAllOnesValue()) in ComputeNumSignBits()
2160 APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); in ComputeNumSignBits()
2234 APInt Op1Int = Op1CI->getValue(); in ComputeMultiple()
2236 APInt API(Op1Int.getBitWidth(), 0); in ComputeMultiple()
2760 APInt ByteOffset(BitWidth, 0); in GetPointerBaseWithConstantOffset()
2771 APInt GEPOffset(BitWidth, 0); in GetPointerBaseWithConstantOffset()
3082 const APInt *V; in isSafeToSpeculativelyExecute()
3090 const APInt *Numerator, *Denominator; in isSafeToSpeculativelyExecute()
3287 APInt LHSKnownZero(BitWidth, 0); in computeOverflowForUnsignedMul()
3288 APInt LHSKnownOne(BitWidth, 0); in computeOverflowForUnsignedMul()
3289 APInt RHSKnownZero(BitWidth, 0); in computeOverflowForUnsignedMul()
3290 APInt RHSKnownOne(BitWidth, 0); in computeOverflowForUnsignedMul()
3305 APInt LHSMax = ~LHSKnownZero; in computeOverflowForUnsignedMul()
3306 APInt RHSMax = ~RHSKnownZero; in computeOverflowForUnsignedMul()
3971 const APInt *C; in isTruePredicate()
3980 const APInt *C; in isTruePredicate()
3988 const APInt *&CA, const APInt *&CB) { in isTruePredicate()
3997 APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); in isTruePredicate()
4008 const APInt *CLHS, *CRHS; in isTruePredicate()