Searched defs:APIntOps (Results 1 - 2 of 2) sorted by relevance

/external/llvm/lib/Support/
H A DAPInt.cpp672 return APIntOps::lshr(*this, BitWidth - numBits);
677 return APIntOps::lshr(APIntOps::shl(*this, BitWidth - numBits),
823 APInt llvm::APIntOps::GreatestCommonDivisor(const APInt& API1,
828 B = APIntOps::urem(A, B);
834 APInt llvm::APIntOps::RoundDoubleToAPInt(double Double, unsigned width) {
597 assert(bitPosition < BitWidth && �); if ((*this)[bitPosition]) clearBit(bitPosition); else setBit(bitPosition); } unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) { assert(!str.empty() && �); assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 || radix == 36) && �); size_t slen = str.size(); StringRef::iterator p = str.begin(); unsigned isNegative = *p == �; if (*p == � || *p == �) { p++; slen--; assert(slen && �); } if (radix == 2) return slen + isNegative; if (radix == 8) return slen * 3 + isNegative; if (radix == 16) return slen * 4 + isNegative; unsigned sufficient = radix == 10? (slen == 1 ? 4 : slen * 64/18) : (slen == 1 ? 7 : slen * 16/3); APInt tmp(sufficient, StringRef(p, slen), radix); unsigned log = tmp.logBase2(); if (log == (unsigned)-1) { return isNegative + 1; } else { return isNegative + log + 1; } } hash_code llvm::hash_value(const APInt &Arg) { if (Arg.isSingleWord()) return hash_combine(Arg.VAL); return hash_combine_range(Arg.pVal, Arg.pVal + Arg.getNumWords()); } bool APInt::isSplat(unsigned SplatSizeInBits) const { assert(getBitWidth() % SplatSizeInBits == 0 && �); return *this == rotl(SplatSizeInBits); } APInt APInt::getHiBits(unsigned numBits) const { return APIntOps::lshr(*this, BitWidth - numBits); } APInt APInt::getLoBits(unsigned numBits) const { return APIntOps::lshr(APIntOps::shl(*this, BitWidth - numBits), BitWidth - numBits); } unsigned APInt::countLeadingZerosSlowCase() const { unsigned Count = 0; for (int i = getNumWords()-1; i >= 0; --i) argument
/external/swiftshader/third_party/llvm-subzero/lib/Support/
H A DAPInt.cpp650 return APIntOps::lshr(*this, BitWidth - numBits);
655 return APIntOps::lshr(APIntOps::shl(*this, BitWidth - numBits),
801 APInt llvm::APIntOps::GreatestCommonDivisor(const APInt& API1,
806 B = APIntOps::urem(A, B);
812 APInt llvm::APIntOps::RoundDoubleToAPInt(double Double, unsigned width) {
575 assert(bitPosition < BitWidth && �); if ((*this)[bitPosition]) clearBit(bitPosition); else setBit(bitPosition); } unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) { assert(!str.empty() && �); assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 || radix == 36) && �); size_t slen = str.size(); StringRef::iterator p = str.begin(); unsigned isNegative = *p == �; if (*p == � || *p == �) { p++; slen--; assert(slen && �); } if (radix == 2) return slen + isNegative; if (radix == 8) return slen * 3 + isNegative; if (radix == 16) return slen * 4 + isNegative; unsigned sufficient = radix == 10? (slen == 1 ? 4 : slen * 64/18) : (slen == 1 ? 7 : slen * 16/3); APInt tmp(sufficient, StringRef(p, slen), radix); unsigned log = tmp.logBase2(); if (log == (unsigned)-1) { return isNegative + 1; } else { return isNegative + log + 1; } } hash_code llvm::hash_value(const APInt &Arg) { if (Arg.isSingleWord()) return hash_combine(Arg.VAL); return hash_combine_range(Arg.pVal, Arg.pVal + Arg.getNumWords()); } bool APInt::isSplat(unsigned SplatSizeInBits) const { assert(getBitWidth() % SplatSizeInBits == 0 && �); return *this == rotl(SplatSizeInBits); } APInt APInt::getHiBits(unsigned numBits) const { return APIntOps::lshr(*this, BitWidth - numBits); } APInt APInt::getLoBits(unsigned numBits) const { return APIntOps::lshr(APIntOps::shl(*this, BitWidth - numBits), BitWidth - numBits); } unsigned APInt::countLeadingZerosSlowCase() const { unsigned Count = 0; for (int i = getNumWords()-1; i >= 0; --i) argument

Completed in 337 milliseconds