Lines Matching refs:Bits
99 if (std::optional<APInt> Bits = extractConstantBits(CVSplat)) { in extractConstantBits() local
100 assert((NumBits % Bits->getBitWidth()) == 0 && "Illegal splat"); in extractConstantBits()
101 return APInt::getSplat(NumBits, *Bits); in extractConstantBits()
105 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() local
113 Bits.insertBits(*SubBits, I * SubBits->getBitWidth()); in extractConstantBits()
115 return Bits; in extractConstantBits()
125 APInt Bits = APInt::getZero(NumBits); in extractConstantBits() local
129 Bits.insertBits(CDS->getElementAsAPInt(I), I * EltBits); in extractConstantBits()
131 Bits.insertBits(CDS->getElementAsAPFloat(I).bitcastToAPInt(), in extractConstantBits()
134 return Bits; in extractConstantBits()
143 if (std::optional<APInt> Bits = extractConstantBits(C)) in extractConstantBits() local
144 return Bits->zextOrTrunc(NumBits); in extractConstantBits()
156 if (std::optional<APInt> Bits = extractConstantBits(C)) in getSplatableConstant() local
157 if (Bits->isSplat(SplatBitWidth)) in getSplatableConstant()
158 return Bits->trunc(SplatBitWidth); in getSplatableConstant()
188 if (std::optional<APInt> Bits = extractConstantBits(Sequence[I])) { in getSplatableConstant() local
189 SplatBits.insertBits(*Bits, I * Bits->getBitWidth()); in getSplatableConstant()
204 const APInt &Bits, unsigned NumSclBits) { in rebuildConstant() argument
205 unsigned BitWidth = Bits.getBitWidth(); in rebuildConstant()
210 RawBits.push_back(Bits.extractBits(8, I).getZExtValue()); in rebuildConstant()
217 RawBits.push_back(Bits.extractBits(16, I).getZExtValue()); in rebuildConstant()
226 RawBits.push_back(Bits.extractBits(32, I).getZExtValue()); in rebuildConstant()
236 RawBits.push_back(Bits.extractBits(64, I).getZExtValue()); in rebuildConstant()
275 if (std::optional<APInt> Bits = extractConstantBits(C, NumBits)) { in rebuildZeroUpperCst() local
276 if (Bits->countLeadingZeros() >= (NumBits - ScalarBitWidth)) { in rebuildZeroUpperCst()
280 return rebuildConstant(Ctx, SclTy, *Bits, NumSclBits); in rebuildZeroUpperCst()
283 APInt RawBits = Bits->zextOrTrunc(ScalarBitWidth); in rebuildZeroUpperCst()
300 if (std::optional<APInt> Bits = extractConstantBits(C, NumBits)) { in rebuildExtCst() local
301 assert((Bits->getBitWidth() / DstEltBitWidth) == NumElts && in rebuildExtCst()
302 (Bits->getBitWidth() % DstEltBitWidth) == 0 && in rebuildExtCst()
308 APInt Elt = Bits->extractBits(DstEltBitWidth, I * DstEltBitWidth); in rebuildExtCst()