Lines Matching full:bitwidth
39 /// getBitWidth - Returns the bitwidth of the given scalar or pointer type (if
40 /// unknown returns 0). For vector types, returns the element type's bitwidth.
42 if (unsigned BitWidth = Ty->getScalarSizeInBits())
43 return BitWidth;
58 unsigned BitWidth = KnownZero.getBitWidth();
60 // NLZ can't be BitWidth with no sign bit
61 APInt MaskV = APInt::getHighBitsSet(BitWidth, NLZ+1);
70 KnownZero = APInt::getHighBitsSet(BitWidth, NLZ2);
76 unsigned BitWidth = KnownZero.getBitWidth();
82 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0);
93 APInt Mask = APInt::getLowBitsSet(BitWidth, LHSKnownZeroOut);
99 KnownZero |= APInt::getLowBitsSet(BitWidth,
104 APInt Mask = APInt::getLowBitsSet(BitWidth, RHSKnownZeroOut);
115 KnownZero |= APInt::getSignBit(BitWidth);
118 KnownOne |= APInt::getSignBit(BitWidth);
122 KnownZero |= APInt::getSignBit(BitWidth);
125 KnownOne |= APInt::getSignBit(BitWidth);
135 unsigned BitWidth = KnownZero.getBitWidth();
173 BitWidth) - BitWidth;
175 TrailZ = std::min(TrailZ, BitWidth);
176 LeadZ = std::min(LeadZ, BitWidth);
177 KnownZero = APInt::getLowBitsSet(BitWidth, TrailZ) |
178 APInt::getHighBitsSet(BitWidth, LeadZ);
186 KnownZero.setBit(BitWidth - 1);
188 KnownOne.setBit(BitWidth - 1);
193 unsigned BitWidth = KnownZero.getBitWidth();
198 unsigned MinLeadingZeros = BitWidth;
209 KnownZero = APInt::getHighBitsSet(BitWidth, MinLeadingZeros);
231 unsigned BitWidth = KnownZero.getBitWidth();
237 TD->getTypeSizeInBits(V->getType()->getScalarType()) == BitWidth) &&
239 V->getType()->getScalarSizeInBits() == BitWidth) &&
240 KnownZero.getBitWidth() == BitWidth &&
241 KnownOne.getBitWidth() == BitWidth &&
242 "V, KnownOne and KnownZero should have same BitWidth");
254 KnownZero = APInt::getAllOnesValue(BitWidth);
291 KnownZero = APInt::getLowBitsSet(BitWidth,
324 KnownZero = APInt::getLowBitsSet(BitWidth, countTrailingZeros(Align));
393 if (RHSUnknownLeadingOnes != BitWidth)
394 LeadZ = std::min(BitWidth,
395 LeadZ + BitWidth - RHSUnknownLeadingOnes - 1);
397 KnownZero = APInt::getHighBitsSet(BitWidth, LeadZ);
439 KnownZero = KnownZero.zextOrTrunc(BitWidth);
440 KnownOne = KnownOne.zextOrTrunc(BitWidth);
442 if (BitWidth > SrcBitWidth)
443 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth);
464 KnownZero = KnownZero.zext(BitWidth);
465 KnownOne = KnownOne.zext(BitWidth);
470 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth);
472 KnownOne |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth);
478 uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
482 KnownZero |= APInt::getLowBitsSet(BitWidth, ShiftAmt); // low bits known 0
490 uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
497 KnownZero |= APInt::getHighBitsSet(BitWidth, ShiftAmt);
505 uint64_t ShiftAmt = SA->getLimitedValue(BitWidth-1);
512 APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt));
513 if (KnownZero[BitWidth-ShiftAmt-1]) // New bits are known zero.
515 else if (KnownOne[BitWidth-ShiftAmt-1]) // New bits are known one.
547 if (KnownZero2[BitWidth-1] || ((KnownZero2 & LowBits) == LowBits))
552 if (KnownOne2[BitWidth-1] && ((KnownOne2 & LowBits) != 0))
562 APInt LHSKnownZero(BitWidth, 0), LHSKnownOne(BitWidth, 0);
567 KnownZero.setBit(BitWidth - 1);
592 KnownZero = APInt::getHighBitsSet(BitWidth, Leaders);
603 KnownZero = APInt::getLowBitsSet(BitWidth, countTrailingZeros(Align));
609 APInt LocalKnownZero(BitWidth, 0), LocalKnownOne(BitWidth, 0);
654 KnownZero = APInt::getLowBitsSet(BitWidth, TrailZ);
695 KnownZero = APInt::getLowBitsSet(BitWidth,
714 KnownZero = APInt::getAllOnesValue(BitWidth);
715 KnownOne = APInt::getAllOnesValue(BitWidth);
720 KnownZero2 = APInt(BitWidth, 0);
721 KnownOne2 = APInt(BitWidth, 0);
748 unsigned LowBits = Log2_32(BitWidth)+1;
752 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
756 unsigned LowBits = Log2_32(BitWidth)+1;
757 KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
803 unsigned BitWidth = getBitWidth(V->getType(), TD);
804 if (!BitWidth) {
809 APInt ZeroBits(BitWidth, 0);
810 APInt OneBits(BitWidth, 0);
812 KnownOne = OneBits[BitWidth - 1];
813 KnownZero = ZeroBits[BitWidth - 1];
881 unsigned BitWidth = V->getType()->getScalarSizeInBits();
882 APInt LHSZeroBits(BitWidth, 0), LHSOneBits(BitWidth, 0);
885 APInt RHSZeroBits(BitWidth, 0), RHSOneBits(BitWidth, 0);
1003 unsigned BitWidth = getBitWidth(V->getType()->getScalarType(), TD);
1016 if (BitWidth && match(V, m_Shl(m_Value(X), m_Value(Y)))) {
1022 APInt KnownZero(BitWidth, 0);
1023 APInt KnownOne(BitWidth, 0);
1060 if (BitWidth && XKnownNegative && YKnownNegative) {
1061 APInt KnownZero(BitWidth, 0);
1062 APInt KnownOne(BitWidth, 0);
1063 APInt Mask = APInt::getSignedMaxValue(BitWidth);
1098 if (!BitWidth) return false;
1099 APInt KnownZero(BitWidth, 0);
1100 APInt KnownOne(BitWidth, 0);
1718 unsigned BitWidth = DL ? DL->getPointerTypeSizeInBits(Ptr->getType()) : 64;
1719 APInt ByteOffset(BitWidth, 0);
1726 APInt GEPOffset(BitWidth, 0);
1996 unsigned BitWidth = getBitWidth(Op->getType(), TD);
1997 if (BitWidth == 0)
1999 APInt KnownZero(BitWidth, 0);
2000 APInt KnownOne(BitWidth, 0);