reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Derived Classes

include/llvm/ADT/APSInt.h
   21 class LLVM_NODISCARD APSInt : public APInt {

Declarations

include/llvm/ADT/APInt.h
   35 class APInt;
include/llvm/ADT/StringRef.h
   32   class APInt;
include/llvm/Analysis/BasicAliasAnalysis.h
   34 class APInt;
include/llvm/Analysis/ConstantFolding.h
   23 class APInt;
include/llvm/Analysis/ScalarEvolutionExpressions.h
   32 class APInt;
include/llvm/Analysis/ValueTracking.h
   31 class APInt;
include/llvm/CodeGen/GlobalISel/InstructionSelector.h
   32 class APInt;
include/llvm/CodeGen/SelectionDAGNodes.h
   57 class APInt;
include/llvm/IR/Constant.h
   22 class APInt;
include/llvm/IR/DerivedTypes.h
   33 class APInt;
include/llvm/IR/IRBuilder.h
   52 class APInt;
include/llvm/IR/Instructions.h
   49 class APInt;
include/llvm/IR/MDBuilder.h
   26 class APInt;
include/llvm/IR/Value.h
   29 class APInt;
include/llvm/IR/Verifier.h
   29 class APInt;
include/llvm/Transforms/Scalar/Reassociate.h
   35 class APInt;
include/llvm/Transforms/Utils/FunctionComparator.h
   31 class APInt;
lib/CodeGen/AsmPrinter/DwarfExpression.h
   29 class APInt;
lib/Target/AArch64/AArch64TargetTransformInfo.h
   31 class APInt;
lib/Target/AMDGPU/SIInstrInfo.h
   38 class APInt;
lib/Target/ARM/ARMTargetTransformInfo.h
   32 class APInt;
lib/Transforms/InstCombine/InstCombineInternal.h
   53 class APInt;
tools/clang/include/clang/Serialization/ASTWriter.h
   53 class APInt;
tools/lldb/include/lldb/Core/ClangForward.h
  127 class APInt;

References

gen/lib/Target/AArch64/AArch64GenDAGISel.inc
114979     const APInt & Imm = cast<ConstantSDNode>(Node)->getAPIntValue();
114986     const APInt & Imm = cast<ConstantSDNode>(Node)->getAPIntValue();
gen/lib/Target/AArch64/AArch64GenGlobalISel.inc
   22   bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
  844 bool AArch64InstructionSelector::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
gen/lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc
   22   bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
  368 bool AMDGPUInstructionSelector::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
gen/lib/Target/ARM/ARMGenDAGISel.inc
54212          CurDAG->MaskedValueIsZero(SDValue(N,0), APInt::getHighBitsSet(32, 16));
54220     APInt apIntN = N->getAPIntValue();
54722     const APInt & Imm = cast<ConstantSDNode>(Node)->getAPIntValue();
55098   APInt apIntN = N->getAPIntValue();
gen/lib/Target/ARM/ARMGenGlobalISel.inc
   22   bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
  724 bool ARMInstructionSelector::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
gen/lib/Target/Hexagon/HexagonGenDAGISel.inc
73130   APInt I = N->getValueAPF().bitcastToAPInt();
gen/lib/Target/Mips/MipsGenDAGISel.inc
30280   APInt Imm;
30307   APInt Imm;
30320   APInt Imm;
gen/lib/Target/Mips/MipsGenGlobalISel.inc
   22   bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
  606 bool MipsInstructionSelector::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
gen/lib/Target/NVPTX/NVPTXGenDAGISel.inc
72204   const APInt &v = N->getAPIntValue();
72214   const APInt &v = N->getAPIntValue();
72223   const APInt &v = N->getAPIntValue();
72232   const APInt &v = N->getAPIntValue();
72241   const APInt &v = N->getAPIntValue();
72250   const APInt &v = N->getAPIntValue();
72373   const APInt &v = N->getAPIntValue();
72374   APInt temp(32, 1);
72381   const APInt &v = N->getAPIntValue();
72382   APInt temp(16, 1);
gen/lib/Target/RISCV/RISCVGenGlobalISel.inc
   22   bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
  252 bool RISCVInstructionSelector::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
gen/lib/Target/SystemZ/SystemZGenDAGISel.inc
30120                                    APInt::getLowBitsSet(BitWidth, 8));
30130                                    APInt::getLowBitsSet(BitWidth, 8));
gen/lib/Target/X86/X86GenGlobalISel.inc
   22   bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
  745 bool X86InstructionSelector::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
gen/lib/Target/X86/X86GenSubtargetInfo.inc
21500   bool isZeroIdiom(const MachineInstr *MI, APInt &Mask) const override;
21501   bool isDependencyBreaking(const MachineInstr *MI, APInt &Mask) const override;
22917 bool X86GenSubtargetInfo::isZeroIdiom(const MachineInstr *MI, APInt &Mask) const {
23005 bool X86GenSubtargetInfo::isDependencyBreaking(const MachineInstr *MI, APInt &Mask) const {
23087   bool isZeroIdiom(const MCInst &MI, APInt &Mask, unsigned ProcessorID) const override;
23088   bool isDependencyBreaking(const MCInst &MI, APInt &Mask, unsigned ProcessorID) const override;
23096 bool X86MCInstrAnalysis::isZeroIdiom(const MCInst &MI, APInt &Mask, unsigned ProcessorID) const {
23183 bool X86MCInstrAnalysis::isDependencyBreaking(const MCInst &MI, APInt &Mask, unsigned ProcessorID) const {
include/llvm/ADT/APFloat.h
  142   typedef APInt::WordType integerPart;
  143   static const unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD;
  249   IEEEFloat(const fltSemantics &, const APInt &);
  297   opStatus convertFromAPInt(const APInt &, bool, roundingMode);
  303   APInt bitcastToAPInt() const;
  458                const APInt *fill = nullptr);
  537   APInt convertHalfAPFloatToAPInt() const;
  538   APInt convertFloatAPFloatToAPInt() const;
  539   APInt convertDoubleAPFloatToAPInt() const;
  540   APInt convertQuadrupleAPFloatToAPInt() const;
  541   APInt convertF80LongDoubleAPFloatToAPInt() const;
  542   APInt convertPPCDoubleDoubleAPFloatToAPInt() const;
  543   void initFromAPInt(const fltSemantics *Sem, const APInt &api);
  544   void initFromHalfAPInt(const APInt &api);
  545   void initFromFloatAPInt(const APInt &api);
  546   void initFromDoubleAPInt(const APInt &api);
  547   void initFromQuadrupleAPInt(const APInt &api);
  548   void initFromF80LongDoubleAPInt(const APInt &api);
  549   void initFromPPCDoubleDoubleAPInt(const APInt &api);
  604   DoubleAPFloat(const fltSemantics &S, const APInt &I);
  646   void makeNaN(bool SNaN, bool Neg, const APInt *fill);
  650   APInt bitcastToAPInt() const;
  657   opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM);
  707     Storage(const fltSemantics &Semantics, ArgTypes &&... Args) {
  813   void makeNaN(bool SNaN, bool Neg, const APInt *fill) {
  857   APFloat(const fltSemantics &Semantics, const APInt &I) : U(Semantics, I) {}
  893       APInt intPayload(64, payload);
  902                          const APInt *payload = nullptr) {
  910                          const APInt *payload = nullptr) {
 1092   opStatus convertFromAPInt(const APInt &Input, bool IsSigned,
 1109   APInt bitcastToAPInt() const {
include/llvm/ADT/APInt.h
   37 inline APInt operator-(APInt);
   37 inline APInt operator-(APInt);
  147   APInt &clearUnusedBits() {
  202   void initSlowCase(const APInt &that);
  214   void AssignSlowCase(const APInt &RHS);
  217   bool EqualSlowCase(const APInt &RHS) const LLVM_READONLY;
  235   bool intersectsSlowCase(const APInt &RHS) const LLVM_READONLY;
  238   bool isSubsetOfSlowCase(const APInt &RHS) const LLVM_READONLY;
  247   void AndAssignSlowCase(const APInt& RHS);
  250   void OrAssignSlowCase(const APInt& RHS);
  253   void XorAssignSlowCase(const APInt& RHS);
  257   int compare(const APInt &RHS) const LLVM_READONLY;
  261   int compareSigned(const APInt &RHS) const LLVM_READONLY;
  321   APInt(const APInt &that) : BitWidth(that.BitWidth) {
  329   APInt(APInt &&that) : BitWidth(that.BitWidth) {
  529   static APInt getMaxValue(unsigned numBits) {
  534   static APInt getSignedMaxValue(unsigned numBits) {
  535     APInt API = getAllOnesValue(numBits);
  541   static APInt getMinValue(unsigned numBits) { return APInt(numBits, 0); }
  544   static APInt getSignedMinValue(unsigned numBits) {
  545     APInt API(numBits, 0);
  554   static APInt getSignMask(unsigned BitWidth) {
  561   static APInt getAllOnesValue(unsigned numBits) {
  568   static APInt getNullValue(unsigned numBits) { return APInt(numBits, 0); }
  576   APInt getHiBits(unsigned numBits) const;
  584   APInt getLoBits(unsigned numBits) const;
  587   static APInt getOneBitSet(unsigned numBits, unsigned BitNo) {
  588     APInt Res(numBits, 0);
  606   static APInt getBitsSet(unsigned numBits, unsigned loBit, unsigned hiBit) {
  607     APInt Res(numBits, 0);
  623   static APInt getBitsSetFrom(unsigned numBits, unsigned loBit) {
  624     APInt Res(numBits, 0);
  635   static APInt getHighBitsSet(unsigned numBits, unsigned hiBitsSet) {
  636     APInt Res(numBits, 0);
  647   static APInt getLowBitsSet(unsigned numBits, unsigned loBitsSet) {
  648     APInt Res(numBits, 0);
  654   static APInt getSplat(unsigned NewLen, const APInt &V);
  654   static APInt getSplat(unsigned NewLen, const APInt &V);
  658   static bool isSameValue(const APInt &I1, const APInt &I2) {
  658   static bool isSameValue(const APInt &I1, const APInt &I2) {
  669   friend hash_code hash_value(const APInt &Arg);
  689   const APInt operator++(int) {
  690     APInt API(*this);
  698   APInt &operator++();
  705   const APInt operator--(int) {
  706     APInt API(*this);
  714   APInt &operator--();
  734   APInt &operator=(const APInt &RHS) {
  734   APInt &operator=(const APInt &RHS) {
  747   APInt &operator=(APInt &&that) {
  747   APInt &operator=(APInt &&that) {
  774   APInt &operator=(uint64_t RHS) {
  791   APInt &operator&=(const APInt &RHS) {
  791   APInt &operator&=(const APInt &RHS) {
  805   APInt &operator&=(uint64_t RHS) {
  821   APInt &operator|=(const APInt &RHS) {
  821   APInt &operator|=(const APInt &RHS) {
  835   APInt &operator|=(uint64_t RHS) {
  851   APInt &operator^=(const APInt &RHS) {
  851   APInt &operator^=(const APInt &RHS) {
  865   APInt &operator^=(uint64_t RHS) {
  880   APInt &operator*=(const APInt &RHS);
  880   APInt &operator*=(const APInt &RHS);
  881   APInt &operator*=(uint64_t RHS);
  888   APInt &operator+=(const APInt &RHS);
  888   APInt &operator+=(const APInt &RHS);
  889   APInt &operator+=(uint64_t RHS);
  896   APInt &operator-=(const APInt &RHS);
  896   APInt &operator-=(const APInt &RHS);
  897   APInt &operator-=(uint64_t RHS);
  904   APInt &operator<<=(unsigned ShiftAmt) {
  922   APInt &operator<<=(const APInt &ShiftAmt);
  922   APInt &operator<<=(const APInt &ShiftAmt);
  931   APInt operator*(const APInt &RHS) const;
  931   APInt operator*(const APInt &RHS) const;
  936   APInt operator<<(unsigned Bits) const { return shl(Bits); }
  941   APInt operator<<(const APInt &Bits) const { return shl(Bits); }
  941   APInt operator<<(const APInt &Bits) const { return shl(Bits); }
  946   APInt ashr(unsigned ShiftAmt) const {
  947     APInt R(*this);
  970   APInt lshr(unsigned shiftAmt) const {
  971     APInt R(*this);
  992   APInt shl(unsigned shiftAmt) const {
  993     APInt R(*this);
  999   APInt rotl(unsigned rotateAmt) const;
 1002   APInt rotr(unsigned rotateAmt) const;
 1007   APInt ashr(const APInt &ShiftAmt) const {
 1007   APInt ashr(const APInt &ShiftAmt) const {
 1008     APInt R(*this);
 1014   void ashrInPlace(const APInt &shiftAmt);
 1019   APInt lshr(const APInt &ShiftAmt) const {
 1019   APInt lshr(const APInt &ShiftAmt) const {
 1020     APInt R(*this);
 1026   void lshrInPlace(const APInt &ShiftAmt);
 1031   APInt shl(const APInt &ShiftAmt) const {
 1031   APInt shl(const APInt &ShiftAmt) const {
 1032     APInt R(*this);
 1038   APInt rotl(const APInt &rotateAmt) const;
 1038   APInt rotl(const APInt &rotateAmt) const;
 1041   APInt rotr(const APInt &rotateAmt) const;
 1041   APInt rotr(const APInt &rotateAmt) const;
 1050   APInt udiv(const APInt &RHS) const;
 1050   APInt udiv(const APInt &RHS) const;
 1051   APInt udiv(uint64_t RHS) const;
 1058   APInt sdiv(const APInt &RHS) const;
 1058   APInt sdiv(const APInt &RHS) const;
 1059   APInt sdiv(int64_t RHS) const;
 1070   APInt urem(const APInt &RHS) const;
 1070   APInt urem(const APInt &RHS) const;
 1076   APInt srem(const APInt &RHS) const;
 1076   APInt srem(const APInt &RHS) const;
 1086   static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
 1086   static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
 1086   static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
 1087                       APInt &Remainder);
 1088   static void udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient,
 1088   static void udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient,
 1091   static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
 1091   static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
 1091   static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
 1092                       APInt &Remainder);
 1093   static void sdivrem(const APInt &LHS, int64_t RHS, APInt &Quotient,
 1093   static void sdivrem(const APInt &LHS, int64_t RHS, APInt &Quotient,
 1097   APInt sadd_ov(const APInt &RHS, bool &Overflow) const;
 1097   APInt sadd_ov(const APInt &RHS, bool &Overflow) const;
 1098   APInt uadd_ov(const APInt &RHS, bool &Overflow) const;
 1098   APInt uadd_ov(const APInt &RHS, bool &Overflow) const;
 1099   APInt ssub_ov(const APInt &RHS, bool &Overflow) const;
 1099   APInt ssub_ov(const APInt &RHS, bool &Overflow) const;
 1100   APInt usub_ov(const APInt &RHS, bool &Overflow) const;
 1100   APInt usub_ov(const APInt &RHS, bool &Overflow) const;
 1101   APInt sdiv_ov(const APInt &RHS, bool &Overflow) const;
 1101   APInt sdiv_ov(const APInt &RHS, bool &Overflow) const;
 1102   APInt smul_ov(const APInt &RHS, bool &Overflow) const;
 1102   APInt smul_ov(const APInt &RHS, bool &Overflow) const;
 1103   APInt umul_ov(const APInt &RHS, bool &Overflow) const;
 1103   APInt umul_ov(const APInt &RHS, bool &Overflow) const;
 1104   APInt sshl_ov(const APInt &Amt, bool &Overflow) const;
 1104   APInt sshl_ov(const APInt &Amt, bool &Overflow) const;
 1105   APInt ushl_ov(const APInt &Amt, bool &Overflow) const;
 1105   APInt ushl_ov(const APInt &Amt, bool &Overflow) const;
 1108   APInt sadd_sat(const APInt &RHS) const;
 1108   APInt sadd_sat(const APInt &RHS) const;
 1109   APInt uadd_sat(const APInt &RHS) const;
 1109   APInt uadd_sat(const APInt &RHS) const;
 1110   APInt ssub_sat(const APInt &RHS) const;
 1110   APInt ssub_sat(const APInt &RHS) const;
 1111   APInt usub_sat(const APInt &RHS) const;
 1111   APInt usub_sat(const APInt &RHS) const;
 1112   APInt smul_sat(const APInt &RHS) const;
 1112   APInt smul_sat(const APInt &RHS) const;
 1113   APInt umul_sat(const APInt &RHS) const;
 1113   APInt umul_sat(const APInt &RHS) const;
 1114   APInt sshl_sat(const APInt &RHS) const;
 1114   APInt sshl_sat(const APInt &RHS) const;
 1115   APInt ushl_sat(const APInt &RHS) const;
 1115   APInt ushl_sat(const APInt &RHS) const;
 1133   bool operator==(const APInt &RHS) const {
 1156   bool eq(const APInt &RHS) const { return (*this) == RHS; }
 1164   bool operator!=(const APInt &RHS) const { return !((*this) == RHS); }
 1180   bool ne(const APInt &RHS) const { return !((*this) == RHS); }
 1188   bool ult(const APInt &RHS) const { return compare(RHS) < 0; }
 1207   bool slt(const APInt &RHS) const { return compareSigned(RHS) < 0; }
 1226   bool ule(const APInt &RHS) const { return compare(RHS) <= 0; }
 1242   bool sle(const APInt &RHS) const { return compareSigned(RHS) <= 0; }
 1258   bool ugt(const APInt &RHS) const { return !ule(RHS); }
 1277   bool sgt(const APInt &RHS) const { return !sle(RHS); }
 1296   bool uge(const APInt &RHS) const { return !ult(RHS); }
 1312   bool sge(const APInt &RHS) const { return !slt(RHS); }
 1324   bool intersects(const APInt &RHS) const {
 1332   bool isSubsetOf(const APInt &RHS) const {
 1347   APInt trunc(unsigned width) const;
 1355   APInt sext(unsigned width) const;
 1362   APInt zext(unsigned width) const;
 1368   APInt sextOrTrunc(unsigned width) const;
 1374   APInt zextOrTrunc(unsigned width) const;
 1380   APInt sextOrSelf(unsigned width) const;
 1386   APInt zextOrSelf(unsigned width) const;
 1477     APInt Keep = getHighBitsSet(BitWidth, BitWidth - loBits);
 1509   void insertBits(const APInt &SubBits, unsigned bitPosition);
 1513   APInt extractBits(unsigned numBits, unsigned bitPosition) const;
 1706   APInt byteSwap() const;
 1710   APInt reverseBits() const;
 1743   static APInt doubleToBits(double V) {
 1751   static APInt floatToBits(float V) {
 1764     APInt temp(*this);
 1807   APInt sqrt() const;
 1812   APInt abs() const {
 1819   APInt multiplicativeInverse(const APInt &modulo) const;
 1819   APInt multiplicativeInverse(const APInt &modulo) const;
 1968   APInt m;    ///< magic number
 1974   APInt m;    ///< magic number
 1979 inline bool operator==(uint64_t V1, const APInt &V2) { return V2 == V1; }
 1981 inline bool operator!=(uint64_t V1, const APInt &V2) { return V2 != V1; }
 1986 inline APInt operator~(APInt v) {
 1986 inline APInt operator~(APInt v) {
 1991 inline APInt operator&(APInt a, const APInt &b) {
 1991 inline APInt operator&(APInt a, const APInt &b) {
 1991 inline APInt operator&(APInt a, const APInt &b) {
 1996 inline APInt operator&(const APInt &a, APInt &&b) {
 1996 inline APInt operator&(const APInt &a, APInt &&b) {
 1996 inline APInt operator&(const APInt &a, APInt &&b) {
 2001 inline APInt operator&(APInt a, uint64_t RHS) {
 2001 inline APInt operator&(APInt a, uint64_t RHS) {
 2006 inline APInt operator&(uint64_t LHS, APInt b) {
 2006 inline APInt operator&(uint64_t LHS, APInt b) {
 2011 inline APInt operator|(APInt a, const APInt &b) {
 2011 inline APInt operator|(APInt a, const APInt &b) {
 2011 inline APInt operator|(APInt a, const APInt &b) {
 2016 inline APInt operator|(const APInt &a, APInt &&b) {
 2016 inline APInt operator|(const APInt &a, APInt &&b) {
 2016 inline APInt operator|(const APInt &a, APInt &&b) {
 2021 inline APInt operator|(APInt a, uint64_t RHS) {
 2021 inline APInt operator|(APInt a, uint64_t RHS) {
 2026 inline APInt operator|(uint64_t LHS, APInt b) {
 2026 inline APInt operator|(uint64_t LHS, APInt b) {
 2031 inline APInt operator^(APInt a, const APInt &b) {
 2031 inline APInt operator^(APInt a, const APInt &b) {
 2031 inline APInt operator^(APInt a, const APInt &b) {
 2036 inline APInt operator^(const APInt &a, APInt &&b) {
 2036 inline APInt operator^(const APInt &a, APInt &&b) {
 2036 inline APInt operator^(const APInt &a, APInt &&b) {
 2041 inline APInt operator^(APInt a, uint64_t RHS) {
 2041 inline APInt operator^(APInt a, uint64_t RHS) {
 2046 inline APInt operator^(uint64_t LHS, APInt b) {
 2046 inline APInt operator^(uint64_t LHS, APInt b) {
 2051 inline raw_ostream &operator<<(raw_ostream &OS, const APInt &I) {
 2056 inline APInt operator-(APInt v) {
 2056 inline APInt operator-(APInt v) {
 2061 inline APInt operator+(APInt a, const APInt &b) {
 2061 inline APInt operator+(APInt a, const APInt &b) {
 2061 inline APInt operator+(APInt a, const APInt &b) {
 2066 inline APInt operator+(const APInt &a, APInt &&b) {
 2066 inline APInt operator+(const APInt &a, APInt &&b) {
 2066 inline APInt operator+(const APInt &a, APInt &&b) {
 2071 inline APInt operator+(APInt a, uint64_t RHS) {
 2071 inline APInt operator+(APInt a, uint64_t RHS) {
 2076 inline APInt operator+(uint64_t LHS, APInt b) {
 2076 inline APInt operator+(uint64_t LHS, APInt b) {
 2081 inline APInt operator-(APInt a, const APInt &b) {
 2081 inline APInt operator-(APInt a, const APInt &b) {
 2081 inline APInt operator-(APInt a, const APInt &b) {
 2086 inline APInt operator-(const APInt &a, APInt &&b) {
 2086 inline APInt operator-(const APInt &a, APInt &&b) {
 2086 inline APInt operator-(const APInt &a, APInt &&b) {
 2092 inline APInt operator-(APInt a, uint64_t RHS) {
 2092 inline APInt operator-(APInt a, uint64_t RHS) {
 2097 inline APInt operator-(uint64_t LHS, APInt b) {
 2097 inline APInt operator-(uint64_t LHS, APInt b) {
 2103 inline APInt operator*(APInt a, uint64_t RHS) {
 2103 inline APInt operator*(APInt a, uint64_t RHS) {
 2108 inline APInt operator*(uint64_t LHS, APInt b) {
 2108 inline APInt operator*(uint64_t LHS, APInt b) {
 2117 inline const APInt &smin(const APInt &A, const APInt &B) {
 2117 inline const APInt &smin(const APInt &A, const APInt &B) {
 2117 inline const APInt &smin(const APInt &A, const APInt &B) {
 2122 inline const APInt &smax(const APInt &A, const APInt &B) {
 2122 inline const APInt &smax(const APInt &A, const APInt &B) {
 2122 inline const APInt &smax(const APInt &A, const APInt &B) {
 2127 inline const APInt &umin(const APInt &A, const APInt &B) {
 2127 inline const APInt &umin(const APInt &A, const APInt &B) {
 2127 inline const APInt &umin(const APInt &A, const APInt &B) {
 2132 inline const APInt &umax(const APInt &A, const APInt &B) {
 2132 inline const APInt &umax(const APInt &A, const APInt &B) {
 2132 inline const APInt &umax(const APInt &A, const APInt &B) {
 2142 APInt GreatestCommonDivisor(APInt A, APInt B);
 2142 APInt GreatestCommonDivisor(APInt A, APInt B);
 2142 APInt GreatestCommonDivisor(APInt A, APInt B);
 2147 inline double RoundAPIntToDouble(const APInt &APIVal) {
 2154 inline double RoundSignedAPIntToDouble(const APInt &APIVal) {
 2159 inline float RoundAPIntToFloat(const APInt &APIVal) {
 2166 inline float RoundSignedAPIntToFloat(const APInt &APIVal) {
 2173 APInt RoundDoubleToAPInt(double Double, unsigned width);
 2178 inline APInt RoundFloatToAPInt(float Float, unsigned width) {
 2183 APInt RoundingUDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2183 APInt RoundingUDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2183 APInt RoundingUDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2183 APInt RoundingUDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2186 APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2186 APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2186 APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2186 APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 2221 Optional<APInt> SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2221 Optional<APInt> SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2221 Optional<APInt> SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2221 Optional<APInt> SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2226 Optional<unsigned> GetMostSignificantDifferentBit(const APInt &A,
 2227                                                   const APInt &B);
 2233 hash_code hash_value(const APInt &Arg);
 2237 void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, unsigned StoreBytes);
 2241 void LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes);
include/llvm/ADT/APSInt.h
   21 class LLVM_NODISCARD APSInt : public APInt {
   33   explicit APSInt(APInt I, bool isUnsigned = true)
   63   APSInt &operator=(APInt RHS) {
  288     return APSInt(Unsigned ? APInt::getMaxValue(numBits)
  289                            : APInt::getSignedMaxValue(numBits), Unsigned);
  295     return APSInt(Unsigned ? APInt::getMinValue(numBits)
  296                            : APInt::getSignedMinValue(numBits), Unsigned);
include/llvm/ADT/ArrayRef.h
   43     using iterator = const T *;
   44     using const_iterator = const T *;
   50     const T *Data = nullptr;
   66     /*implicit*/ ArrayRef(const T &OneElt)
   70     /*implicit*/ ArrayRef(const T *data, size_t length)
   74     ArrayRef(const T *begin, const T *end)
   74     ArrayRef(const T *begin, const T *end)
   81     /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
   87     /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
   92     /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
   97     /*implicit*/ constexpr ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {}
  100     /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
  145     const T *data() const { return Data; }
  151     const T &front() const {
  157     const T &back() const {
  163     template <typename Allocator> ArrayRef<T> copy(Allocator &A) {
  178     ArrayRef<T> slice(size_t N, size_t M) const {
  184     ArrayRef<T> slice(size_t N) const { return slice(N, size() - N); }
  187     ArrayRef<T> drop_front(size_t N = 1) const {
  193     ArrayRef<T> drop_back(size_t N = 1) const {
  200     template <class PredicateT> ArrayRef<T> drop_while(PredicateT Pred) const {
  206     template <class PredicateT> ArrayRef<T> drop_until(PredicateT Pred) const {
  211     ArrayRef<T> take_front(size_t N = 1) const {
  218     ArrayRef<T> take_back(size_t N = 1) const {
  226     template <class PredicateT> ArrayRef<T> take_while(PredicateT Pred) const {
  232     template <class PredicateT> ArrayRef<T> take_until(PredicateT Pred) const {
  239     const T &operator[](size_t Index) const {
  249     typename std::enable_if<std::is_same<U, T>::value, ArrayRef<T>>::type &
  257     typename std::enable_if<std::is_same<U, T>::value, ArrayRef<T>>::type &
  263     std::vector<T> vec() const {
  270     operator std::vector<T>() const {
include/llvm/ADT/DenseMap.h
   40 struct DenseMapPair : public std::pair<KeyT, ValueT> {
   40 struct DenseMapPair : public std::pair<KeyT, ValueT> {
   43   KeyT &getFirst() { return std::pair<KeyT, ValueT>::first; }
   44   const KeyT &getFirst() const { return std::pair<KeyT, ValueT>::first; }
   45   ValueT &getSecond() { return std::pair<KeyT, ValueT>::second; }
   46   const ValueT &getSecond() const { return std::pair<KeyT, ValueT>::second; }
   65   using key_type = KeyT;
   66   using mapped_type = ValueT;
   69   using iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>;
   69   using iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>;
   71       DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT, true>;
   71       DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT, true>;
  121     const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey();
  122     if (is_trivially_copyable<KeyT>::value &&
  123         is_trivially_copyable<ValueT>::value) {
  145   size_type count(const_arg_type_t<KeyT> Val) const {
  150   iterator find(const_arg_type_t<KeyT> Val) {
  156   const_iterator find(const_arg_type_t<KeyT> Val) const {
  185   ValueT lookup(const_arg_type_t<KeyT> Val) const {
  185   ValueT lookup(const_arg_type_t<KeyT> Val) const {
  195   std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) {
  195   std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> &KV) {
  202   std::pair<iterator, bool> insert(std::pair<KeyT, ValueT> &&KV) {
  202   std::pair<iterator, bool> insert(std::pair<KeyT, ValueT> &&KV) {
  210   std::pair<iterator, bool> try_emplace(KeyT &&Key, Ts &&... Args) {
  219         InsertIntoBucket(TheBucket, std::move(Key), std::forward<Ts>(Args)...);
  229   std::pair<iterator, bool> try_emplace(const KeyT &Key, Ts &&... Args) {
  249   std::pair<iterator, bool> insert_as(std::pair<KeyT, ValueT> &&KV,
  249   std::pair<iterator, bool> insert_as(std::pair<KeyT, ValueT> &&KV,
  272   bool erase(const KeyT &Val) {
  291   value_type& FindAndConstruct(const KeyT &Key) {
  299   ValueT &operator[](const KeyT &Key) {
  299   ValueT &operator[](const KeyT &Key) {
  303   value_type& FindAndConstruct(KeyT &&Key) {
  311   ValueT &operator[](KeyT &&Key) {
  311   ValueT &operator[](KeyT &&Key) {
  334     const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey();
  349     const KeyT EmptyKey = getEmptyKey();
  351       ::new (&B->getFirst()) KeyT(EmptyKey);
  369     const KeyT EmptyKey = getEmptyKey();
  370     const KeyT TombstoneKey = getTombstoneKey();
  380         ::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond()));
  392       const DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT> &other) {
  392       const DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT> &other) {
  414   static unsigned getHashValue(const KeyT &Val) {
  419   static unsigned getHashValue(const LookupKeyT &Val) {
  423   static const KeyT getEmptyKey() {
  429   static const KeyT getTombstoneKey() {
  515   BucketT *InsertIntoBucket(BucketT *TheBucket, KeyArg &&Key,
  516                             ValueArgs &&... Values) {
  520     ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
  520     ::new (&TheBucket->getSecond()) ValueT(std::forward<ValueArgs>(Values)...);
  525   BucketT *InsertIntoBucketWithLookup(BucketT *TheBucket, KeyT &&Key,
  526                                       ValueT &&Value, LookupKeyT &Lookup) {
  535   BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup,
  535   BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup,
  566     const KeyT EmptyKey = getEmptyKey();
  578   bool LookupBucketFor(const LookupKeyT &Val,
  590     const KeyT EmptyKey = getEmptyKey();
  591     const KeyT TombstoneKey = getTombstoneKey();
  629   bool LookupBucketFor(const LookupKeyT &Val, BucketT *&FoundBucket) {
  684 class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>,
  684 class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>,
  685                                      KeyT, ValueT, KeyInfoT, BucketT> {
  685                                      KeyT, ValueT, KeyInfoT, BucketT> {
  690   using BaseT = DenseMapBase<DenseMap, KeyT, ValueT, KeyInfoT, BucketT>;
  690   using BaseT = DenseMapBase<DenseMap, KeyT, ValueT, KeyInfoT, BucketT>;
 1163   using ConstIterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, true>;
 1199       const DenseMapIterator<KeyT, ValueT, KeyInfoT, Bucket, IsConstSrc> &I)
include/llvm/ADT/FoldingSet.h
  221   static void Profile(const T &X, FoldingSetNodeID &ID) {
  224   static void Profile(T &X, FoldingSetNodeID &ID) {
  232   static inline bool Equals(T &X, const FoldingSetNodeID &ID, unsigned IDHash,
  240   static inline unsigned ComputeHash(T &X, FoldingSetNodeID &TempID);
  250   : public DefaultFoldingSetTrait<T> {};
  329   inline void Add(const T &x) { FoldingSetTrait<T>::Profile(x, *this); }
  329   inline void Add(const T &x) { FoldingSetTrait<T>::Profile(x, *this); }
include/llvm/ADT/Optional.h
   39     T value;
   60   explicit OptionalStorage(in_place_t, Args &&... args)
   61       : value(std::forward<Args>(args)...), hasVal(true) {}
   72   T &getValue() LLVM_LVALUE_FUNCTION noexcept {
   76   T const &getValue() const LLVM_LVALUE_FUNCTION noexcept {
   81   T &&getValue() && noexcept {
   87   template <class... Args> void emplace(Args &&... args) {
   89     ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...);
   89     ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...);
   97       ::new ((void *)std::addressof(value)) T(y);
  131         ::new ((void *)std::addressof(value)) T(std::move(other.value));
  216   optional_detail::OptionalStorage<T> Storage;
  219   using value_type = T;
  224   Optional(const T &y) : Storage(optional_detail::in_place_t{}, y) {}
  227   Optional(T &&y) : Storage(optional_detail::in_place_t{}, std::move(y)) {}
  230   Optional &operator=(T &&y) {
  241   static inline Optional create(const T *y) {
  245   Optional &operator=(const T &y) {
  253   const T *getPointer() const { return &Storage.getValue(); }
  254   T *getPointer() { return &Storage.getValue(); }
  255   const T &getValue() const LLVM_LVALUE_FUNCTION { return Storage.getValue(); }
  256   T &getValue() LLVM_LVALUE_FUNCTION { return Storage.getValue(); }
  260   const T *operator->() const { return getPointer(); }
  261   T *operator->() { return getPointer(); }
  262   const T &operator*() const LLVM_LVALUE_FUNCTION { return getValue(); }
  263   T &operator*() LLVM_LVALUE_FUNCTION { return getValue(); }
  266   constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
  271   T &&getValue() && { return std::move(Storage.getValue()); }
  272   T &&operator*() && { return std::move(Storage.getValue()); }
  275   T getValueOr(U &&value) && {
  282 bool operator==(const Optional<T> &X, const Optional<U> &Y) {
  282 bool operator==(const Optional<T> &X, const Optional<U> &Y) {
  316 bool operator==(const Optional<T> &X, NoneType) {
  321 bool operator==(NoneType, const Optional<T> &X) {
include/llvm/ADT/STLExtras.h
  108   Ret (*callback)(intptr_t callable, Params ...params) = nullptr;
  112   static Ret callback_fn(intptr_t callable, Params ...params) {
  129   Ret operator()(Params ...params) const {
include/llvm/ADT/SmallVector.h
   75   AlignedCharArrayUnion<T> FirstEl;
  114   using value_type = T;
  115   using iterator = T *;
  116   using const_iterator = const T *;
  121   using reference = T &;
  122   using const_reference = const T &;
  123   using pointer = T *;
  124   using const_pointer = const T *;
  179 class SmallVectorTemplateBase : public SmallVectorTemplateCommon<T> {
  183   static void destroy_range(T *S, T *E) {
  183   static void destroy_range(T *S, T *E) {
  211   void push_back(const T &Elt) {
  214     ::new ((void*) this->end()) T(Elt);
  218   void push_back(T &&Elt) {
  221     ::new ((void*) this->end()) T(::std::move(Elt));
  240   T *NewElts = static_cast<T*>(llvm::safe_malloc(NewCapacity*sizeof(T)));
  240   T *NewElts = static_cast<T*>(llvm::safe_malloc(NewCapacity*sizeof(T)));
  315 class SmallVectorImpl : public SmallVectorTemplateBase<T> {
  316   using SuperClass = SmallVectorTemplateBase<T>;
  357   void resize(size_type N, const T &NV) {
  374   LLVM_NODISCARD T pop_back_val() {
  375     T Result = ::std::move(this->back());
  397   void append(size_type NumInputs, const T &Elt) {
  405   void append(std::initializer_list<T> IL) {
  412   void assign(size_type NumElts, const T &Elt) {
  429   void assign(std::initializer_list<T> IL) {
  467   iterator insert(iterator I, T &&Elt) {
  497   iterator insert(iterator I, const T &Elt) {
  526   iterator insert(iterator I, size_type NumToInsert, const T &Elt) {
  637   void insert(iterator I, std::initializer_list<T> IL) {
  641   template <typename... ArgTypes> reference emplace_back(ArgTypes &&... Args) {
  644     ::new ((void *)this->end()) T(std::forward<ArgTypes>(Args)...);
  820   AlignedCharArrayUnion<T> InlineElts[N];
  837 class SmallVector : public SmallVectorImpl<T>, SmallVectorStorage<T, N> {
  837 class SmallVector : public SmallVectorImpl<T>, SmallVectorStorage<T, N> {
  846   explicit SmallVector(size_t Size, const T &Value = T())
  865   SmallVector(std::initializer_list<T> IL) : SmallVectorImpl<T>(N) {
  884   SmallVector(SmallVectorImpl<T> &&RHS) : SmallVectorImpl<T>(N) {
include/llvm/ADT/StringRef.h
  508     typename std::enable_if<!std::numeric_limits<T>::is_signed, bool>::type
  509     getAsInteger(unsigned Radix, T &Result) const {
  562     bool getAsInteger(unsigned Radix, APInt &Result) const;
include/llvm/Analysis/BasicAliasAnalysis.h
  121     APInt Scale;
  139     APInt StructOffset;
  142     APInt OtherOffset;
  167   GetLinearExpression(const Value *V, APInt &Scale, APInt &Offset,
  167   GetLinearExpression(const Value *V, APInt &Scale, APInt &Offset,
  190                           APInt BaseOffset, AssumptionCache *AC,
include/llvm/Analysis/CmpInstAnalysis.h
   65                             Value *&X, APInt &Mask,
include/llvm/Analysis/ConstantFolding.h
   38 bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV, APInt &Offset,
include/llvm/Analysis/DemandedBits.h
   54   APInt getDemandedBits(Instruction *I);
   68     const APInt &AOut, APInt &AB,
   68     const APInt &AOut, APInt &AB,
   79   DenseMap<Instruction *, APInt> AliveBits;
include/llvm/Analysis/Loads.h
   50                                         const APInt &Size, const DataLayout &DL,
   62 bool isSafeToLoadUnconditionally(Value *V, MaybeAlign Alignment, APInt &Size,
include/llvm/Analysis/MemoryBuiltins.h
  221 using SizeOffsetType = std::pair<APInt, APInt>;
  221 using SizeOffsetType = std::pair<APInt, APInt>;
  231   APInt Zero;
  234   APInt align(APInt Size, uint64_t Align);
  234   APInt align(APInt Size, uint64_t Align);
  277   bool CheckedZextOrTrunc(APInt &I);
include/llvm/Analysis/PtrUseVisitor.h
  134     APInt Offset;
  157   APInt Offset;
include/llvm/Analysis/ScalarEvolution.h
  511   const SCEV *getConstant(const APInt &Val);
  822   APInt getUnsignedRangeMin(const SCEV *S) {
  827   APInt getUnsignedRangeMax(const SCEV *S) {
  838   APInt getSignedRangeMin(const SCEV *S) {
  843   APInt getSignedRangeMax(const SCEV *S) {
 1726   Constant *getConstantEvolutionLoopExitValue(PHINode *PN, const APInt &BEs,
 1758   Optional<APInt> computeConstantDifference(const SCEV *LHS, const SCEV *RHS);
include/llvm/Analysis/ScalarEvolutionExpressions.h
   57     const APInt &getAPInt() const { return getValue()->getValue(); }
   68     APInt Size(16, 1);
include/llvm/Analysis/TargetTransformInfo.h
  740   int getIntImmCost(const APInt &Imm, Type *Ty) const;
  745   int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm,
  747   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
  757   int getIntImmCodeSizeCost(unsigned Opc, unsigned Idx, const APInt &Imm,
 1255   virtual int getIntImmCodeSizeCost(unsigned Opc, unsigned Idx, const APInt &Imm,
 1257   virtual int getIntImmCost(const APInt &Imm, Type *Ty) = 0;
 1258   virtual int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm,
 1260   virtual int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
 1606   int getIntImmCodeSizeCost(unsigned Opc, unsigned Idx, const APInt &Imm,
 1610   int getIntImmCost(const APInt &Imm, Type *Ty) override {
 1613   int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm,
 1617   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
include/llvm/Analysis/TargetTransformInfoImpl.h
  340   int getIntImmCodeSizeCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
  345   unsigned getIntImmCost(const APInt &Imm, Type *Ty) { return TTI::TCC_Basic; }
  347   unsigned getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
  352   unsigned getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
  678     APInt StrideVal = Step->getAPInt();
  742     APInt BaseOffset(PtrSizeBits, 0);
include/llvm/Analysis/ValueLattice.h
  164   Optional<APInt> asConstantInteger() const {
include/llvm/Analysis/ValueTracking.h
  157   bool MaskedValueIsZero(const Value *V, const APInt &Mask,
  247     APInt OffsetAPInt(DL.getIndexTypeSizeInBits(Ptr->getType()), 0);
include/llvm/Analysis/VectorUtils.h
  354 APInt possiblyDemandedEltsInMask(Value *Mask);
include/llvm/CodeGen/BasicTTIImpl.h
  348     APInt MaxCaseVal = SI.case_begin()->getCaseValue()->getValue();
  349     APInt MinCaseVal = MaxCaseVal;
  351       const APInt &CaseVal = CI.getCaseValue()->getValue();
include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
   40                                     const APInt &DemandedElts,
   47   APInt getKnownZeroes(Register R);
   48   APInt getKnownOnes(Register R);
   53   bool maskedValueIsZero(Register Val, const APInt &Mask) {
   64                                      const APInt &DemandedElts,
include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  464   virtual bool testImmPredicate_APInt(unsigned, const APInt &) const {
include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
  275       APInt Value;
include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
  110       APInt Mask = APInt::getAllOnesValue(SrcTy.getScalarSizeInBits());
  110       APInt Mask = APInt::getAllOnesValue(SrcTy.getScalarSizeInBits());
include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
  213   LegalizeResult narrowScalarShiftByConstant(MachineInstr &MI, const APInt &Amt,
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
  684   MachineInstrBuilder buildConstant(const DstOp &Res, const APInt &Val);
include/llvm/CodeGen/GlobalISel/Utils.h
  154 Optional<APInt> ConstantFoldBinOp(unsigned Opcode, const unsigned Op1,
  158 Optional<APInt> ConstantFoldExtOp(unsigned Opcode, const unsigned Op1,
include/llvm/CodeGen/SelectionDAG.h
  580   SDValue getConstant(const APInt &Val, const SDLoc &DL, EVT VT,
  585     return getConstant(APInt::getAllOnesValue(VT.getScalarSizeInBits()), DL,
  600   SDValue getTargetConstant(const APInt &Val, const SDLoc &DL, EVT VT,
 1470   SDValue GetDemandedBits(SDValue V, const APInt &DemandedBits);
 1479   SDValue GetDemandedBits(SDValue V, const APInt &DemandedBits,
 1480                           const APInt &DemandedElts);
 1489   bool MaskedValueIsZero(SDValue Op, const APInt &Mask,
 1495   bool MaskedValueIsZero(SDValue Op, const APInt &Mask,
 1496                          const APInt &DemandedElts, unsigned Depth = 0) const;
 1500   bool MaskedValueIsAllOnes(SDValue Op, const APInt &Mask,
 1515   KnownBits computeKnownBits(SDValue Op, const APInt &DemandedElts,
 1553   unsigned ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
 1596   bool isSplatValue(SDValue V, const APInt &DemandedElts, APInt &UndefElts);
 1596   bool isSplatValue(SDValue V, const APInt &DemandedElts, APInt &UndefElts);
include/llvm/CodeGen/SelectionDAGNodes.h
   88   bool isConstantSplatVector(const SDNode *N, APInt &SplatValue);
  186   inline const APInt &getConstantOperandAPInt(unsigned i) const;
  949   inline const APInt &getConstantOperandAPInt(unsigned Num) const;
 1178 inline const APInt &SDValue::getConstantOperandAPInt(unsigned i) const {
 1587   const APInt &getAPIntValue() const { return Value->getValue(); }
 1610 const APInt &SDNode::getConstantOperandAPInt(unsigned Num) const {
 1695 ConstantSDNode *isConstOrConstSplat(SDValue N, const APInt &DemandedElts,
 1704 ConstantFPSDNode *isConstOrConstSplatFP(SDValue N, const APInt &DemandedElts,
 1939   bool isConstantSplat(APInt &SplatValue, APInt &SplatUndef,
 1939   bool isConstantSplat(APInt &SplatValue, APInt &SplatUndef,
 1950   SDValue getSplatValue(const APInt &DemandedElts,
 1966   getConstantSplatNode(const APInt &DemandedElts,
 1984   getConstantFPSplatNode(const APInt &DemandedElts,
include/llvm/CodeGen/SwitchLoweringUtils.h
  175   APInt First;
  176   APInt Last;
  182   JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,
  182   JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,
  203   APInt First;
  204   APInt Range;
  217   BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT, bool E,
  217   BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT, bool E,
include/llvm/CodeGen/TargetLowering.h
 1022   bool rangeFitsInWord(const APInt &Low, const APInt &High,
 1022   bool rangeFitsInWord(const APInt &Low, const APInt &High,
 1058                              const APInt &Low, const APInt &High,
 1058                              const APInt &Low, const APInt &High,
 2556   virtual bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
 3089   bool ShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
 3095   virtual bool targetShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
 3103   bool ShrinkDemandedOp(SDValue Op, unsigned BitWidth, const APInt &Demanded,
 3119   bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
 3120                             const APInt &DemandedElts, KnownBits &Known,
 3126   bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
 3133   bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedMask,
 3139   SDValue SimplifyMultipleUseDemandedBits(SDValue Op, const APInt &DemandedBits,
 3140                                           const APInt &DemandedElts,
 3158   bool SimplifyDemandedVectorElts(SDValue Op, const APInt &DemandedEltMask,
 3159                                   APInt &KnownUndef, APInt &KnownZero,
 3159                                   APInt &KnownUndef, APInt &KnownZero,
 3165   bool SimplifyDemandedVectorElts(SDValue Op, const APInt &DemandedElts,
 3166                                   APInt &KnownUndef, APInt &KnownZero,
 3166                                   APInt &KnownUndef, APInt &KnownZero,
 3175                                              const APInt &DemandedElts,
 3184                                               const APInt &DemandedElts,
 3193                                              const APInt &DemandedElts,
 3202                                                    const APInt &DemandedElts,
 3212       SDValue Op, const APInt &DemandedElts, APInt &KnownUndef,
 3212       SDValue Op, const APInt &DemandedElts, APInt &KnownUndef,
 3213       APInt &KnownZero, TargetLoweringOpt &TLO, unsigned Depth = 0) const;
 3221                                                  const APInt &DemandedBits,
 3222                                                  const APInt &DemandedElts,
 3231       SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 3231       SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 3980   virtual SDValue BuildSDIVPow2(SDNode *N, const APInt &Divisor,
include/llvm/CodeGen/TargetSubtargetInfo.h
  154   virtual bool isZeroIdiom(const MachineInstr *MI, APInt &Mask) const {
  165   virtual bool isDependencyBreaking(const MachineInstr *MI, APInt &Mask) const {
include/llvm/ExecutionEngine/GenericValue.h
   35   APInt IntVal; // also used for long doubles.
include/llvm/IR/Constant.h
  137   const APInt &getUniqueInteger() const;
  175   static Constant *getIntegerValue(Type *Ty, const APInt &V);
include/llvm/IR/ConstantRange.h
   48   APInt Lower, Upper;
   65   ConstantRange(APInt Value);
   70   ConstantRange(APInt Lower, APInt Upper);
   70   ConstantRange(APInt Lower, APInt Upper);
   84   static ConstantRange getNonEmpty(APInt Lower, APInt Upper) {
   84   static ConstantRange getNonEmpty(APInt Lower, APInt Upper) {
  125                                            const APInt &Other);
  150                                              const APInt &Other,
  156   bool getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS) const;
  159   const APInt &getLower() const { return Lower; }
  162   const APInt &getUpper() const { return Upper; }
  201   bool contains(const APInt &Val) const;
  207   const APInt *getSingleElement() const {
  215   const APInt *getSingleMissingElement() const {
  237   APInt getUnsignedMax() const;
  240   APInt getUnsignedMin() const;
  243   APInt getSignedMax() const;
  246   APInt getSignedMin() const;
  257   ConstantRange subtract(const APInt &CI) const;
include/llvm/IR/Constants.h
   86   APInt Val;
   88   ConstantInt(IntegerType *Ty, const APInt& V);
  123   static ConstantInt *get(LLVMContext &Context, const APInt &V);
  132   static Constant *get(Type* Ty, const APInt& V);
  137   inline const APInt &getValue() const {
  294                            APInt *Payload = nullptr);
  296                            APInt *Payload = nullptr);
  611   APInt getElementAsAPInt(unsigned i) const;
include/llvm/IR/DerivedTypes.h
   88   APInt getMask() const;
include/llvm/IR/GlobalIndirectSymbol.h
   67   const GlobalObject *getBaseObject(const DataLayout &DL, APInt &Offset) const {
   72   GlobalObject *getBaseObject(const DataLayout &DL, APInt &Offset) {
include/llvm/IR/IRBuilder.h
  374   ConstantInt *getInt(const APInt &AI) {
 1231   Value *CreateShl(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1253   Value *CreateLShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1273   Value *CreateAShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
 1293   Value *CreateAnd(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1319   Value *CreateOr(Value *LHS, const APInt &RHS, const Twine &Name = "") {
 1340   Value *CreateXor(Value *LHS, const APInt &RHS, const Twine &Name = "") {
include/llvm/IR/Instructions.h
 1098   bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const;
include/llvm/IR/MDBuilder.h
   88   MDNode *createRange(const APInt &Lo, const APInt &Hi);
   88   MDNode *createRange(const APInt &Lo, const APInt &Hi);
include/llvm/IR/Operator.h
  551   bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const;
include/llvm/IR/PatternMatch.h
  153   const APInt *&Res;
  155   apint_match(const APInt *&R) : Res(R) {}
  194 inline apint_match m_APInt(const APInt *&Res) { return Res; }
  203       const APInt &CIV = CI->getValue();
  257   const APInt *&Res;
  259   api_pred_ty(const APInt *&R) : Res(R) {}
  323   bool isValue(const APInt &C) { return true; }
  332   bool isValue(const APInt &C) { return C.isAllOnesValue(); }
  341   bool isValue(const APInt &C) { return C.isMaxSignedValue(); }
  349 inline api_pred_ty<is_maxsignedvalue> m_MaxSignedValue(const APInt *&V) {
  354   bool isValue(const APInt &C) { return C.isNegative(); }
  361 inline api_pred_ty<is_negative> m_Negative(const APInt *&V) {
  366   bool isValue(const APInt &C) { return C.isNonNegative(); }
  373 inline api_pred_ty<is_nonnegative> m_NonNegative(const APInt *&V) {
  378   bool isValue(const APInt &C) { return C.isOneValue(); }
  387   bool isValue(const APInt &C) { return C.isNullValue(); }
  408   bool isValue(const APInt &C) { return C.isPowerOf2(); }
  415 inline api_pred_ty<is_power2> m_Power2(const APInt *&V) {
  420   bool isValue(const APInt &C) { return (-C).isPowerOf2(); }
  427 inline api_pred_ty<is_negated_power2> m_NegatedPower2(const APInt *&V) {
  432   bool isValue(const APInt &C) { return !C || C.isPowerOf2(); }
  439 inline api_pred_ty<is_power2_or_zero> m_Power2OrZero(const APInt *&V) {
  444   bool isValue(const APInt &C) { return C.isSignMask(); }
  453   bool isValue(const APInt &C) { return C.isMask(); }
  463   const APInt *Thr;
  464   bool isValue(const APInt &C) {
  494 m_SpecificInt_ICMP(ICmpInst::Predicate Predicate, const APInt &Threshold) {
  648   APInt Val;
  650   specific_intval(APInt V) : Val(std::move(V)) {}
  658     return CI && APInt::isSameValue(CI->getValue(), Val);
  664 inline specific_intval m_SpecificInt(APInt V) {
include/llvm/IR/Value.h
  591                                                  APInt &Offset,
  593   Value *stripAndAccumulateConstantOffsets(const DataLayout &DL, APInt &Offset,
  603                                                          APInt &Offset) const {
  608                                                    APInt &Offset) {
include/llvm/IR/Verifier.h
   63                                        APInt &Offset, bool IsNewFormat);
include/llvm/MC/MCAsmMacro.h
   72   APInt IntVal;
   76   AsmToken(TokenKind Kind, StringRef Str, APInt IntVal)
  120   APInt getAPIntVal() const {
include/llvm/MC/MCInstrAnalysis.h
   88                                     APInt &Writes) const;
  108   virtual bool isZeroIdiom(const MCInst &MI, APInt &Mask,
  133   virtual bool isDependencyBreaking(const MCInst &MI, APInt &Mask,
include/llvm/MCA/HardwareUnits/RegisterFile.h
  147   APInt ZeroRegisters;
include/llvm/Support/AlignOf.h
   30   T t;
   39 template <typename T> union SizerImpl<T> { char arr[sizeof(T)]; };
   50       llvm::detail::SizerImpl<T, Ts...>)];
include/llvm/Support/CheckedArithmetic.h
   31   llvm::APInt ALHS(/*BitSize=*/sizeof(T) * 8, LHS, Signed);
   32   llvm::APInt ARHS(/*BitSize=*/sizeof(T) * 8, RHS, Signed);
   34   llvm::APInt Out = (ALHS.*Op)(ARHS, Overflow);
   49   return checkedOp(LHS, RHS, &llvm::APInt::sadd_ov);
   58   return checkedOp(LHS, RHS, &llvm::APInt::ssub_ov);
   67   return checkedOp(LHS, RHS, &llvm::APInt::smul_ov);
   87   return checkedOp(LHS, RHS, &llvm::APInt::uadd_ov, /*Signed=*/false);
   96   return checkedOp(LHS, RHS, &llvm::APInt::umul_ov, /*Signed=*/false);
include/llvm/Support/KnownBits.h
   23   APInt Zero;
   24   APInt One;
   28   KnownBits(APInt Zero, APInt One)
   28   KnownBits(APInt Zero, APInt One)
   56   const APInt &getConstant() const {
  122     APInt NewZero = Zero.zext(BitWidth);
include/llvm/Support/type_traits.h
   31   using UnderlyingT = typename std::remove_reference<T>::type;
   65   using type = const T &;
   91     T t;
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  145       std::is_copy_constructible<detail::trivial_helper<T>>::value;
  147       !std::is_copy_constructible<T>::value;
  151       std::is_move_constructible<detail::trivial_helper<T>>::value;
  153       !std::is_move_constructible<T>::value;
  157       is_copy_assignable<detail::trivial_helper<T>>::value;
  159       !is_copy_assignable<T>::value;
  163       is_move_assignable<detail::trivial_helper<T>>::value;
  165       !is_move_assignable<T>::value;
  169       std::is_destructible<detail::trivial_helper<T>>::value;
include/llvm/Transforms/Scalar/Reassociate.h
  113                       APInt &ConstOpnd, Value *&Res);
  115                       reassociate::XorOpnd *Opnd2, APInt &ConstOpnd,
include/llvm/Transforms/Utils/FunctionComparator.h
  323   int cmpAPInts(const APInt &L, const APInt &R) const;
  323   int cmpAPInts(const APInt &L, const APInt &R) const;
lib/Analysis/BasicAliasAnalysis.cpp
  278     const Value *V, APInt &Scale, APInt &Offset, unsigned &ZExtBits,
  278     const Value *V, APInt &Scale, APInt &Offset, unsigned &ZExtBits,
  306       APInt RHS = RHSC->getValue().zextOrSelf(Offset.getBitWidth());
  435 static APInt adjustToPointerSize(APInt Offset, unsigned PointerSize) {
  435 static APInt adjustToPointerSize(APInt Offset, unsigned PointerSize) {
  567       APInt Scale(MaxPointerSize, DL.getTypeAllocSize(GTI.getIndexedType()));
  577       APInt IndexScale(Width, 0), IndexOffset(Width, 0);
  593       APInt WideScaledOffset = IndexOffset.sextOrTrunc(MaxPointerSize*2) *
 1288   APInt ObjectBaseOffset = DecompObject.StructOffset +
 1298   APInt GEPBaseOffset = DecompGEP.StructOffset;
 1324   APInt GEP1BaseOffset = DecompGEP1.StructOffset + DecompGEP1.OtherOffset;
 1325   APInt GEP2BaseOffset = DecompGEP2.StructOffset + DecompGEP2.OtherOffset;
 1468     APInt Modulo(MaxPointerSize, 0);
 1497         APInt Scale = DecompGEP1.VarIndices[i].Scale;
 1508     APInt ModOffset = GEP1BaseOffset & (Modulo - 1);
 1950     APInt Scale = Src[i].Scale;
 1979     LocationSize MaybeV1Size, LocationSize MaybeV2Size, APInt BaseOffset,
 2000   APInt V0Scale(Width, 0), V0Offset(Width, 0), V1Scale(Width, 0),
 2022   APInt MinDiff = V0Offset - V1Offset, Wrapped = -MinDiff;
 2024   APInt MinDiffBytes =
lib/Analysis/BlockFrequencyInfo.cpp
  236   APInt NewFreq(128, Freq);
  237   APInt OldFreq(128, BFI->getBlockFreq(ReferenceBB).getFrequency());
  238   APInt BBFreq(128, 0);
lib/Analysis/BlockFrequencyInfoImpl.cpp
  574   APInt BlockCount(128, EntryCount.getCount());
  575   APInt BlockFreq(128, Freq);
  576   APInt EntryFreq(128, getEntryFreq());
lib/Analysis/CFLGraph.h
  318       APInt APOffset(DL.getPointerSizeInBits(GEPOp.getPointerAddressSpace()),
lib/Analysis/CmpInstAnalysis.cpp
   68                                 Value *&X, APInt &Mask, bool LookThruTrunc) {
   71   const APInt *C;
   82     Mask = APInt::getSignMask(C->getBitWidth());
   89     Mask = APInt::getSignMask(C->getBitWidth());
   96     Mask = APInt::getSignMask(C->getBitWidth());
  103     Mask = APInt::getSignMask(C->getBitWidth());
lib/Analysis/ConstantFolding.cpp
   62 static Constant *foldConstVectorToAPInt(APInt &Result, Type *DestTy,
  122       APInt Result(DL.getTypeSizeInBits(DestTy), 0);
  289                                       APInt &Offset, const DataLayout &DL) {
  312   APInt TmpOffset(BitWidth, 0);
  552   APInt OffsetAI;
  586   APInt ResultVal = APInt(IntType->getBitWidth(), 0);
  661       APInt StrVal(NumBits, 0);
  662       APInt SingleChar(NumBits, 0);
  745     APInt Offs1, Offs2;
  867   APInt Offset =
  899   APInt BasePtr(BitWidth, 0);
  941       APInt ElemSize(BitWidth, DL.getTypeAllocSize(Ty));
  951         APInt NewIdx = Offset.sdiv_ov(ElemSize, Overflow);
 1324                              APInt::getLowBitsSet(InWidth, PtrWidth));
 1672 static bool getConstIntOrUndef(Value *Op, const APInt *&C) {
 2125     const APInt *C0, *C1;
 2154       APInt Res;
 2314           APInt Lhs = Op1->getValue();
 2315           APInt Rhs = Op2->getValue();
 2320           APInt Product = (Lhs.sextOrSelf(ExtendedWidth) *
 2323             APInt MaxValue =
 2324               APInt::getSignedMaxValue(Width).sextOrSelf(ExtendedWidth);
 2325             APInt MinValue =
 2326               APInt::getSignedMinValue(Width).sextOrSelf(ExtendedWidth);
 2339     const APInt *C0, *C1, *C2;
lib/Analysis/DemandedBits.cpp
   87     const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2,
   87     const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2,
  136           AB = APInt::getHighBitsSet(BitWidth,
  146           AB = APInt::getLowBitsSet(BitWidth,
  152         const APInt *SA;
  180     AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits());
  184       const APInt *ShiftAmtC;
  193           AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1);
  195           AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt);
  201       const APInt *ShiftAmtC;
  209           AB |= APInt::getLowBitsSet(BitWidth, ShiftAmt);
  215       const APInt *ShiftAmtC;
  222         if ((AOut & APInt::getHighBitsSet(BitWidth, ShiftAmt))
  229           AB |= APInt::getLowBitsSet(BitWidth, ShiftAmt);
  274     if ((AOut & APInt::getHighBitsSet(AOut.getBitWidth(),
  341           AliveBits[J] = APInt::getAllOnesValue(T->getScalarSizeInBits());
  358     APInt AOut;
  386         APInt AB = APInt::getAllOnesValue(BitWidth);
  386         APInt AB = APInt::getAllOnesValue(BitWidth);
  419 APInt DemandedBits::getDemandedBits(Instruction *I) {
  427   return APInt::getAllOnesValue(
lib/Analysis/DependenceAnalysis.cpp
  514       APInt Xtop = C1B2_C2B1->getAPInt();
  515       APInt Xbot = A1B2_A2B1->getAPInt();
  516       APInt Ytop = C1A2_C2A1->getAPInt();
  517       APInt Ybot = A2B1_A1B2->getAPInt();
  522       APInt Xq = Xtop; // these need to be initialized, even
  523       APInt Xr = Xtop; // though they're just going to be overwritten
  524       APInt::sdivrem(Xtop, Xbot, Xq, Xr);
  525       APInt Yq = Ytop;
  526       APInt Yr = Ytop;
  527       APInt::sdivrem(Ytop, Ybot, Yq, Yr);
  541         const APInt &UpperBound = CUB->getAPInt();
 1184     APInt ConstDelta = cast<SCEVConstant>(Delta)->getAPInt();
 1185     APInt ConstCoeff = cast<SCEVConstant>(Coeff)->getAPInt();
 1186     APInt Distance  = ConstDelta; // these need to be initialized
 1187     APInt Remainder = ConstDelta;
 1188     APInt::sdivrem(ConstDelta, ConstCoeff, Distance, Remainder);
 1372   APInt APDelta = ConstDelta->getAPInt();
 1373   APInt APCoeff = ConstCoeff->getAPInt();
 1374   APInt Distance = APDelta; // these need to be initialzed
 1375   APInt Remainder = APDelta;
 1376   APInt::sdivrem(APDelta, APCoeff, Distance, Remainder);
 1387   APInt Two = APInt(Distance.getBitWidth(), 2, true);
 1409 static bool findGCD(unsigned Bits, const APInt &AM, const APInt &BM,
 1409 static bool findGCD(unsigned Bits, const APInt &AM, const APInt &BM,
 1410                     const APInt &Delta, APInt &G, APInt &X, APInt &Y) {
 1410                     const APInt &Delta, APInt &G, APInt &X, APInt &Y) {
 1410                     const APInt &Delta, APInt &G, APInt &X, APInt &Y) {
 1410                     const APInt &Delta, APInt &G, APInt &X, APInt &Y) {
 1411   APInt A0(Bits, 1, true), A1(Bits, 0, true);
 1412   APInt B0(Bits, 0, true), B1(Bits, 1, true);
 1413   APInt G0 = AM.abs();
 1414   APInt G1 = BM.abs();
 1415   APInt Q = G0; // these need to be initialized
 1416   APInt R = G0;
 1417   APInt::sdivrem(G0, G1, Q, R);
 1419     APInt A2 = A0 - Q*A1; A0 = A1; A1 = A2;
 1420     APInt B2 = B0 - Q*B1; B0 = B1; B1 = B2;
 1422     APInt::sdivrem(G0, G1, Q, R);
 1439 static APInt floorOfQuotient(const APInt &A, const APInt &B) {
 1439 static APInt floorOfQuotient(const APInt &A, const APInt &B) {
 1439 static APInt floorOfQuotient(const APInt &A, const APInt &B) {
 1440   APInt Q = A; // these need to be initialized
 1441   APInt R = A;
 1442   APInt::sdivrem(A, B, Q, R);
 1452 static APInt ceilingOfQuotient(const APInt &A, const APInt &B) {
 1452 static APInt ceilingOfQuotient(const APInt &A, const APInt &B) {
 1452 static APInt ceilingOfQuotient(const APInt &A, const APInt &B) {
 1453   APInt Q = A; // these need to be initialized
 1454   APInt R = A;
 1455   APInt::sdivrem(A, B, Q, R);
 1467 APInt maxAPInt(APInt A, APInt B) {
 1467 APInt maxAPInt(APInt A, APInt B) {
 1467 APInt maxAPInt(APInt A, APInt B) {
 1473 APInt minAPInt(APInt A, APInt B) {
 1473 APInt minAPInt(APInt A, APInt B) {
 1473 APInt minAPInt(APInt A, APInt B) {
 1518   APInt G, X, Y;
 1519   APInt AM = ConstSrcCoeff->getAPInt();
 1520   APInt BM = ConstDstCoeff->getAPInt();
 1532   APInt UM(Bits, 1, true);
 1542   APInt TU(APInt::getSignedMaxValue(Bits));
 1542   APInt TU(APInt::getSignedMaxValue(Bits));
 1543   APInt TL(APInt::getSignedMinValue(Bits));
 1543   APInt TL(APInt::getSignedMinValue(Bits));
 1546   APInt TMUL = BM.sdiv(G);
 1592   APInt SaveTU(TU); // save these
 1593   APInt SaveTL(TL);
 1665   const APInt &ConstDividend = Dividend->getAPInt();
 1666   const APInt &ConstDivisor = Divisor->getAPInt();
 1917   APInt G, X, Y;
 1918   APInt AM = ConstSrcCoeff->getAPInt();
 1919   APInt BM = ConstDstCoeff->getAPInt();
 1930   APInt SrcUM(Bits, 1, true);
 1940   APInt DstUM(Bits, 1, true);
 1950   APInt TU(APInt::getSignedMaxValue(Bits));
 1950   APInt TU(APInt::getSignedMaxValue(Bits));
 1951   APInt TL(APInt::getSignedMinValue(Bits));
 1951   APInt TL(APInt::getSignedMinValue(Bits));
 1954   APInt TMUL = BM.sdiv(G);
 2334   APInt RunningGCD = APInt::getNullValue(BitWidth);
 2334   APInt RunningGCD = APInt::getNullValue(BitWidth);
 2349     APInt ConstCoeff = Constant->getAPInt();
 2368     APInt ConstCoeff = Constant->getAPInt();
 2374   APInt ExtraGCD = APInt::getNullValue(BitWidth);
 2374   APInt ExtraGCD = APInt::getNullValue(BitWidth);
 2392         APInt ConstOpValue = ConstOp->getAPInt();
 2402   APInt ConstDelta = cast<SCEVConstant>(Constant)->getAPInt();
 2408   APInt Remainder = ConstDelta.srem(RunningGCD);
 2449         APInt ConstCoeff = Constant->getAPInt();
 2466         APInt ConstCoeff = Constant->getAPInt();
 2479     APInt ConstCoeff = Constant->getAPInt();
 3132     APInt Beta = Bconst->getAPInt();
 3133     APInt Charlie = Cconst->getAPInt();
 3134     APInt CdivB = Charlie.sdiv(Beta);
 3147     APInt Alpha = Aconst->getAPInt();
 3148     APInt Charlie = Cconst->getAPInt();
 3149     APInt CdivA = Charlie.sdiv(Alpha);
 3161     APInt Alpha = Aconst->getAPInt();
 3162     APInt Charlie = Cconst->getAPInt();
 3163     APInt CdivA = Charlie.sdiv(Alpha);
lib/Analysis/IVDescriptors.cpp
   93   const APInt *M = nullptr;
  126     auto Mask = DB->getDemandedBits(Exit);
lib/Analysis/InlineCost.cpp
  181   DenseMap<Value *, std::pair<Value *, APInt>> ConstantOffsetPtrs;
  209   bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
  388 bool CallAnalyzer::accumulateGEPOffset(GEPOperator &GEP, APInt &Offset) {
  411     APInt TypeSize(IntPtrWidth, DL.getTypeAllocSize(GTI.getIndexedType()));
  475   APInt ZeroOffset = APInt::getNullValue(DL.getPointerSizeInBits(0));
  475   APInt ZeroOffset = APInt::getNullValue(DL.getPointerSizeInBits(0));
  480   std::pair<Value *, APInt> FirstBaseAndOffset = {nullptr, ZeroOffset};
  503     std::pair<Value *, APInt> BaseAndOffset = {nullptr, ZeroOffset};
  566   std::pair<Value *, APInt> BaseAndOffset =
  639   std::pair<Value *, APInt> BaseAndOffset =
  667     std::pair<Value *, APInt> BaseAndOffset =
  700     std::pair<Value *, APInt> BaseAndOffset = ConstantOffsetPtrs.lookup(Op);
  996   APInt LHSOffset, RHSOffset;
 1042   APInt LHSOffset, RHSOffset;
 1377     std::pair<Value *, APInt> TrueBaseAndOffset =
 1379     std::pair<Value *, APInt> FalseBaseAndOffset =
 1420   std::pair<Value *, APInt> BaseAndOffset =
 1656   APInt Offset = APInt::getNullValue(IntPtrWidth);
 1656   APInt Offset = APInt::getNullValue(IntPtrWidth);
lib/Analysis/InstructionSimplify.cpp
  660   APInt Offset = APInt::getNullValue(IntPtrTy->getIntegerBitWidth());
  660   APInt Offset = APInt::getNullValue(IntPtrTy->getIntegerBitWidth());
  972     const APInt *C;
 1321   const APInt *ShRAmt, *ShLAmt;
 1542   const APInt *C0, *C1;
 1614   const APInt *C0, *C1;
 1630   const APInt Delta = *C1 - *C0;
 1687   const APInt *C0, *C1;
 1703   const APInt Delta = *C1 - *C0;
 1939   const APInt *Mask;
 1940   const APInt *ShAmt;
 2039       const APInt EffBitsY = APInt::getLowBitsSet(Width, EffWidthY);
 2039       const APInt EffBitsY = APInt::getLowBitsSet(Width, EffWidthY);
 2040       const APInt EffBitsX = APInt::getLowBitsSet(Width, EffWidthX) << ShftCnt;
 2040       const APInt EffBitsX = APInt::getLowBitsSet(Width, EffWidthX) << ShftCnt;
 2163   const APInt *C1, *C2;
 2394         const APInt &LHSOffsetValue = LHSOffsetCI->getValue();
 2395         const APInt &RHSOffsetValue = RHSOffsetCI->getValue();
 2639   const APInt *C;
 2900     const APInt *CI2Val, *CIVal = &CI->getValue();
 3765                                     const APInt *Y, bool TrueWhenUnset) {
 3766   const APInt *C;
 3803   APInt Mask;
 3823     const APInt *Y;
 4069       APInt BasePtrOffset(IdxWidth, 0);
 4876   APInt PtrOffset;
 4920   APInt LoadedRHSOffset;
 5180     const APInt *ShAmtC;
 5183       APInt BitWidth = APInt(ShAmtC->getBitWidth(), ShAmtC->getBitWidth());
lib/Analysis/LazyValueInfo.cpp
  926       ConstantRange Zero(APInt::getNullValue(TrueCR.getBitWidth()));
 1260   const APInt *C;
 1349                                             const APInt &OpConstVal,
 1422             APInt ConditionVal(1, isTrueDest ? 1 : 0);
 1436               if (Optional<APInt> OpConst = OpLatticeVal.asConstantInteger()) {
 1472       APInt CaseValue = Case.getCaseValue()->getValue();
 1708     if (const APInt *SingleVal = CR.getSingleElement())
 1745     if (const APInt *SingleVal = CR.getSingleElement())
lib/Analysis/Loads.cpp
   39 static bool isAligned(const Value *Base, const APInt &Offset, Align Alignment,
   42     const APInt APBaseAlign(Offset.getBitWidth(), BA->value());
   43     const APInt APAlign(Offset.getBitWidth(), Alignment.value());
   53     const Value *V, Align Alignment, const APInt &Size, const DataLayout &DL,
   69   APInt KnownDerefBytes(Size.getBitWidth(),
   78       APInt Offset(DL.getTypeStoreSizeInBits(Ty), 0);
   86     APInt Offset(DL.getIndexTypeSizeInBits(GEP->getType()), 0);
  124                                               const APInt &Size,
  153   APInt AccessSize(DL.getIndexTypeSizeInBits(V->getType()),
  203   APInt EltSize(DL.getIndexTypeSizeInBits(Ptr->getType()),
  234   const APInt AccessSize = TC * EltSize;
  262 bool llvm::isSafeToLoadUnconditionally(Value *V, MaybeAlign MA, APInt &Size,
  345   APInt Size(DL.getIndexTypeSizeInBits(V->getType()), DL.getTypeStoreSize(Ty));
lib/Analysis/LoopAccessAnalysis.cpp
 1065   const APInt &APStepVal = C->getAPInt();
 1193   APInt OffsetA(IdxWidth, 0), OffsetB(IdxWidth, 0);
 1209   APInt Size(IdxWidth, DL.getTypeStoreSize(Ty));
 1215   const APInt &OffsetDelta = cast<SCEVConstant>(OffsetDeltaSCEV)->getAPInt();
 1510   const APInt &Val = C->getAPInt();
lib/Analysis/MemoryBuiltins.cpp
  481 static APInt getSizeWithOverflow(const SizeOffsetType &Data) {
  563 APInt ObjectSizeOffsetVisitor::align(APInt Size, uint64_t Alignment) {
  563 APInt ObjectSizeOffsetVisitor::align(APInt Size, uint64_t Alignment) {
  580   Zero = APInt::getNullValue(IntTyBits);
  620 bool ObjectSizeOffsetVisitor::CheckedZextOrTrunc(APInt &I) {
  635   APInt Size(IntTyBits, DL.getTypeAllocSize(I.getAllocatedType()));
  641     APInt NumElems = C->getValue();
  660   APInt Size(IntTyBits, DL.getTypeAllocSize(PT->getElementType()));
  671     APInt Size(IntTyBits, GetStringLength(CS.getArgument(0)));
  682       APInt MaxSize = Arg->getValue().zextOrSelf(IntTyBits);
  693   APInt Size = Arg->getValue();
  705   APInt NumElems = Arg->getValue();
  749   APInt Offset(IntTyBits, 0);
  766   APInt Size(IntTyBits, DL.getTypeAllocSize(GV.getValueType()));
  793     APInt TrueResult = getSizeWithOverflow(TrueSide);
  794     APInt FalseResult = getSizeWithOverflow(FalseSide);
lib/Analysis/PtrUseVisitor.cpp
   37   APInt TmpOffset(DL.getIndexTypeSizeInBits(GEPI.getType()), 0);
lib/Analysis/ScalarEvolution.cpp
  431 const SCEV *ScalarEvolution::getConstant(const APInt &Val) {
  687     const APInt &LA = LC->getAPInt();
  688     const APInt &RA = RC->getAPInt();
  953       APInt NumeratorVal = Numerator->getAPInt();
  954       APInt DenominatorVal = D->getAPInt();
  963       APInt QuotientVal(NumeratorVal.getBitWidth(), 0);
  964       APInt RemainderVal(NumeratorVal.getBitWidth(), 0);
  965       APInt::sdivrem(NumeratorVal, DenominatorVal, QuotientVal, RemainderVal);
 1183   APInt OddFactorial(W, 1);
 1186     APInt Mult(W, i);
 1197   APInt DivFactor = APInt::getOneBitSet(CalculationBits, T);
 1197   APInt DivFactor = APInt::getOneBitSet(CalculationBits, T);
 1202   APInt Mod = APInt::getSignedMinValue(W+1);
 1202   APInt Mod = APInt::getSignedMinValue(W+1);
 1203   APInt MultiplyFactor = OddFactorial.zext(W+1);
 1351     return SE->getConstant(APInt::getSignedMinValue(BitWidth) -
 1356     return SE->getConstant(APInt::getSignedMaxValue(BitWidth) -
 1371   return SE->getConstant(APInt::getMinValue(BitWidth) -
 1571   APInt StartAI = StartC->getAPInt();
 1605 static APInt extractConstantWithoutWrapping(ScalarEvolution &SE,
 1608   const APInt C = ConstantTerm->getAPInt();
 1626 static APInt extractConstantWithoutWrapping(ScalarEvolution &SE,
 1627                                             const APInt &ConstantStart,
 1790           const SCEV *N = getConstant(APInt::getMinValue(BitWidth) -
 1805           const SCEV *N = getConstant(APInt::getMaxValue(BitWidth) -
 1827         const APInt &C = SC->getAPInt();
 1828         const APInt &D = extractConstantWithoutWrapping(*this, C, Step);
 1882       const APInt &D = extractConstantWithoutWrapping(*this, SC, SA);
 2015       const APInt &D = extractConstantWithoutWrapping(*this, SC, SA);
 2159         const APInt &C = SC->getAPInt();
 2160         const APInt &D = extractConstantWithoutWrapping(*this, C, Step);
 2268 CollectAddOperandsWithScales(DenseMap<const SCEV *, APInt> &M,
 2270                              APInt &AccumulatedConstant,
 2272                              const APInt &Scale,
 2291       APInt NewScale =
 2317       std::pair<DenseMap<const SCEV *, APInt>::iterator, bool> Pair =
 2379     const APInt &C = cast<SCEVConstant>(Ops[0])->getAPInt();
 2573     DenseMap<const SCEV *, APInt> M;
 2575     APInt AccumulatedConstant(BitWidth, 0);
 2580         bool operator()(const APInt &LHS, const APInt &RHS) const {
 2580         bool operator()(const APInt &LHS, const APInt &RHS) const {
 2588       std::map<APInt, SmallVector<const SCEV *, 4>, APIntCompare> MulOpLists;
 3216           const APInt &StepInt = Step->getAPInt();
 3217           const APInt &DivInt = RHSC->getAPInt();
 3237             const APInt &StartInt = StartC->getAPInt();
 3238             const APInt &StartRem = StartInt.urem(StepInt);
 3268           APInt NewRHS =
 3319 static const APInt gcd(const SCEVConstant *C1, const SCEVConstant *C2) {
 3320   APInt A = C1->getAPInt().abs();
 3321   APInt B = C2->getAPInt().abs();
 3360       APInt Factor = gcd(LHSCst, RHSCst);
 4539                              APInt::getOneBitSet(BitWidth, SA->getZExtValue()));
 5563           ConstantRange(APInt::getMinValue(BitWidth),
 5564                         APInt::getMaxValue(BitWidth).lshr(TZ).shl(TZ) + 1);
 5567           APInt::getSignedMinValue(BitWidth),
 5568           APInt::getSignedMaxValue(BitWidth).ashr(TZ).shl(TZ) + 1);
 5668                         APInt::getSignedMinValue(BitWidth)), RangeType);
 5671           ConstantRange(APInt::getSignedMinValue(BitWidth),
 5723             ConstantRange(APInt::getSignedMinValue(BitWidth).ashr(NS - 1),
 5724                           APInt::getSignedMaxValue(BitWidth).ashr(NS - 1) + 1),
 5758 static ConstantRange getRangeForAffineARHelper(APInt Step,
 5760                                                const APInt &MaxBECount,
 5786   if (APInt::getMaxValue(StartRange.getBitWidth()).udiv(Step).ult(MaxBECount))
 5791   APInt Offset = Step * MaxBECount;
 5797   APInt StartLower = StartRange.getLower();
 5798   APInt StartUpper = StartRange.getUpper() - 1;
 5799   APInt MovedBoundary = Descending ? (StartLower - std::move(Offset))
 5808   APInt NewLower =
 5810   APInt NewUpper =
 5827   APInt MaxBECountValue = getUnsignedRangeMax(MaxBECount);
 5860     APInt TrueValue;
 5861     APInt FalseValue;
 5866       APInt Offset(BitWidth, 0);
 5891       const APInt *TrueVal, *FalseVal;
 6254         const APInt &A = CI->getValue();
 6267         APInt EffectiveMask =
 6268             APInt::getLowBitsSet(BitWidth, BitWidth - LZ - TZ).shl(TZ);
 6270           const SCEV *MulCount = getConstant(APInt::getOneBitSet(BitWidth, TZ));
 6278               APInt DivAmt = APInt::getOneBitSet(BitWidth, TZ - GCD);
 6278               APInt DivAmt = APInt::getOneBitSet(BitWidth, TZ - GCD);
 6307         const APInt &CIVal = CI->getValue();
 6354                 APInt Trunc = CI->getValue().trunc(Z0TySize);
 6386             getContext(), APInt::getOneBitSet(BitWidth, SA->getZExtValue()));
 6433             APInt Mul = APInt::getOneBitSet(BitWidth - AShrAmt,
 6433             APInt Mul = APInt::getOneBitSet(BitWidth - AShrAmt,
 7876                                                    const APInt &BEs,
 8393 static const SCEV *SolveLinEquationWithOverflow(const APInt &A, const SCEV *B,
 8419   APInt AD = A.lshr(Mult2).zext(BW + 1);  // AD = A / D
 8420   APInt Mod(BW + 1, 0);
 8422   APInt I = AD.multiplicativeInverse(Mod).trunc(BW);
 8428   const SCEV *D = SE.getConstant(APInt::getOneBitSet(BW, Mult2));
 8441 static Optional<std::tuple<APInt, APInt, APInt, APInt, unsigned>>
 8441 static Optional<std::tuple<APInt, APInt, APInt, APInt, unsigned>>
 8441 static Optional<std::tuple<APInt, APInt, APInt, APInt, unsigned>>
 8441 static Optional<std::tuple<APInt, APInt, APInt, APInt, unsigned>>
 8456   APInt L = LC->getAPInt();
 8457   APInt M = MC->getAPInt();
 8458   APInt N = NC->getAPInt();
 8481   APInt A = N;
 8482   APInt B = 2 * M - A;
 8483   APInt C = 2 * L;
 8484   APInt T = APInt(NewWidth, 2);
 8495 static Optional<APInt> MinOptional(Optional<APInt> X, Optional<APInt> Y) {
 8495 static Optional<APInt> MinOptional(Optional<APInt> X, Optional<APInt> Y) {
 8495 static Optional<APInt> MinOptional(Optional<APInt> X, Optional<APInt> Y) {
 8498     APInt XW = X->sextOrSelf(W);
 8499     APInt YW = Y->sextOrSelf(W);
 8518 static Optional<APInt> TruncIfPossible(Optional<APInt> X, unsigned BitWidth) {
 8518 static Optional<APInt> TruncIfPossible(Optional<APInt> X, unsigned BitWidth) {
 8541 static Optional<APInt>
 8543   APInt A, B, C, M;
 8551   Optional<APInt> X = APIntOps::SolveQuadraticEquationWrap(A, B, C, BitWidth+1);
 8573 static Optional<APInt>
 8585   APInt A, B, C, M;
 8606     Optional<APInt> SO = None;
 8614     Optional<APInt> UO = APIntOps::SolveQuadraticEquationWrap(A, B, -Bound,
 8638     Optional<APInt> Min = MinOptional(SO, UO);
 8641     Optional<APInt> Max = Min == SO ? UO : SO;
 8651   APInt Lower = Range.getLower().sextOrSelf(A.getBitWidth()) - 1;
 8652   APInt Upper = Range.getUpper().sextOrSelf(A.getBitWidth());
 8784     APInt MaxBECount = getUnsignedRangeMax(Distance);
 8941     const APInt &RA = RC->getAPInt();
 8952       APInt NewRHS;
 9371   APInt C;
 9799     APInt Min = ICmpInst::isSigned(Pred) ?
 9807       APInt SharperMin = Min + 1;
 9868 Optional<APInt> ScalarEvolution::computeConstantDifference(const SCEV *More,
 9899     const auto &M = cast<SCEVConstant>(More)->getAPInt();
 9900     const auto &L = cast<SCEVConstant>(Less)->getAPInt();
 9981   Optional<APInt> LDiff = computeConstantDifference(LHS, FoundLHS);
 9982   Optional<APInt> RDiff = computeConstantDifference(RHS, FoundRHS);
 9989   APInt FoundRHSLimit;
 9995     FoundRHSLimit = APInt::getSignedMinValue(getTypeSizeInBits(RHS->getType())) - *RDiff;
10455   Optional<APInt> Addend = computeConstantDifference(LHS, FoundLHS);
10459   const APInt &ConstFoundRHS = cast<SCEVConstant>(FoundRHS)->getAPInt();
10471   const APInt &ConstRHS = cast<SCEVConstant>(RHS)->getAPInt();
10490     APInt MaxRHS = getSignedRangeMax(RHS);
10491     APInt MaxValue = APInt::getSignedMaxValue(BitWidth);
10491     APInt MaxValue = APInt::getSignedMaxValue(BitWidth);
10492     APInt MaxStrideMinusOne = getSignedRangeMax(getMinusSCEV(Stride, One));
10498   APInt MaxRHS = getUnsignedRangeMax(RHS);
10499   APInt MaxValue = APInt::getMaxValue(BitWidth);
10499   APInt MaxValue = APInt::getMaxValue(BitWidth);
10500   APInt MaxStrideMinusOne = getUnsignedRangeMax(getMinusSCEV(Stride, One));
10514     APInt MinRHS = getSignedRangeMin(RHS);
10515     APInt MinValue = APInt::getSignedMinValue(BitWidth);
10515     APInt MinValue = APInt::getSignedMinValue(BitWidth);
10516     APInt MaxStrideMinusOne = getSignedRangeMax(getMinusSCEV(Stride, One));
10522   APInt MinRHS = getUnsignedRangeMin(RHS);
10523   APInt MinValue = APInt::getMinValue(BitWidth);
10523   APInt MinValue = APInt::getMinValue(BitWidth);
10524   APInt MaxStrideMinusOne = getUnsignedRangeMax(getMinusSCEV(Stride, One));
10549   APInt MinStart =
10552   APInt StrideForMaxBECount =
10560   APInt One(BitWidth, 1, IsSigned);
10563   APInt MaxValue = IsSigned ? APInt::getSignedMaxValue(BitWidth)
10563   APInt MaxValue = IsSigned ? APInt::getSignedMaxValue(BitWidth)
10564                             : APInt::getMaxValue(BitWidth);
10565   APInt Limit = MaxValue - (StrideForMaxBECount - 1);
10571   APInt MaxEnd = IsSigned ? APIntOps::smin(getSignedRangeMax(End), Limit)
10768   APInt MaxStart = IsSigned ? getSignedRangeMax(Start)
10771   APInt MinStride = IsSigned ? getSignedRangeMin(Stride)
10775   APInt Limit = IsSigned ? APInt::getSignedMinValue(BitWidth) + (MinStride - 1)
10775   APInt Limit = IsSigned ? APInt::getSignedMinValue(BitWidth) + (MinStride - 1)
10776                          : APInt::getMinValue(BitWidth) + (MinStride - 1);
10781   APInt MinEnd =
10837     APInt A = cast<SCEVConstant>(getOperand(1))->getAPInt();
10838     APInt End = A.sge(1) ? (Range.getUpper() - 1) : Range.getLower();
10841     APInt ExitVal = (End + A).udiv(A);
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
   45     APInt ASizeInt(BitWidth, LocA.Size.hasValue()
   48     APInt BSizeInt(BitWidth, LocB.Size.hasValue()
lib/Analysis/ScalarEvolutionExpander.cpp
  834       const APInt *RHS;
  860     const APInt &RHS = SC->getAPInt();
 2274       ConstantInt::get(Loc->getContext(), APInt::getNullValue(DstBits));
 2321     auto MaxVal = APInt::getMaxValue(DstBits).zext(SrcBits);
 2321     auto MaxVal = APInt::getMaxValue(DstBits).zext(SrcBits);
lib/Analysis/TargetTransformInfo.cpp
  444                                                const APInt &Imm,
  451 int TargetTransformInfo::getIntImmCost(const APInt &Imm, Type *Ty) const {
  458                                        const APInt &Imm, Type *Ty) const {
  465                                        const APInt &Imm, Type *Ty) const {
lib/Analysis/ValueTracking.cpp
  285 static bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth,
  288 bool llvm::MaskedValueIsZero(const Value *V, const APInt &Mask,
  403   APInt Bottom0 = Known.One;
  404   APInt Bottom1 = Known2.One;
  419   APInt BottomKnown = Bottom0.getLoBits(TrailBitsKnown0) *
  458     APInt Mask = APInt::getHighBitsSet(BitWidth, CommonPrefixBits);
  458     APInt Mask = APInt::getHighBitsSet(BitWidth, CommonPrefixBits);
  894     function_ref<APInt(const APInt &, unsigned)> KZF,
  894     function_ref<APInt(const APInt &, unsigned)> KZF,
  895     function_ref<APInt(const APInt &, unsigned)> KOF) {
  895     function_ref<APInt(const APInt &, unsigned)> KOF) {
 1029     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 1173       APInt KZResult = KnownZero << ShiftAmt;
 1183       APInt KOResult = KnownOne << ShiftAmt;
 1195       APInt KZResult = KnownZero.lshr(ShiftAmt);
 1235       APInt RA = Rem->getValue().abs();
 1237         APInt LowBits = RA - 1;
 1269       const APInt &RA = Rem->getValue();
 1271         APInt LowBits = (RA - 1);
 1518         const APInt *SA;
 1651   const APInt *C;
 1670       APInt Elt = CDS->getElementAsAPInt(i);
 1688       const APInt &Elt = ElementCI->getValue();
 1979 static bool rangeMetadataExcludesValue(const MDNode* Ranges, const APInt& Value) {
 2046         const APInt ZeroValue(Ty->getBitWidth(), 0);
 2181       APInt Mask = APInt::getSignedMaxValue(BitWidth);
 2181       APInt Mask = APInt::getSignedMaxValue(BitWidth);
 2295 bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth,
 2305                                 const APInt *&CLow, const APInt *&CHigh) {
 2305                                 const APInt *&CLow, const APInt *&CHigh) {
 2403       const APInt *Denominator;
 2421       const APInt *Denominator;
 2457       const APInt *ShAmt;
 2468       const APInt *ShAmt;
 2497       const APInt *CLow, *CHigh;
 2616       APInt DemandedLHS(NumElts, 0), DemandedRHS(NumElts, 0);
 2721       APInt Op1Int = Op1CI->getValue();
 2723       APInt API(Op1Int.getBitWidth(), 0);
 3912     const APInt *V;
 3920     const APInt *Numerator, *Denominator;
 4545   const APInt *C1;
 4547     const APInt *C2;
 4701   const APInt *C1;
 4706   const APInt *C2;
 5146     const APInt *C;
 5155     const APInt *C;
 5183     const APInt *CLHS, *CRHS;
 5418 static void setLimitsForBinOp(const BinaryOperator &BO, APInt &Lower,
 5419                               APInt &Upper, const InstrInfoQuery &IIQ) {
 5421   const APInt *C;
 5432           Lower = APInt::getSignedMinValue(Width);
 5433           Upper = APInt::getSignedMaxValue(Width) + *C + 1;
 5436           Lower = APInt::getSignedMinValue(Width) + *C;
 5437           Upper = APInt::getSignedMaxValue(Width) + 1;
 5458       Lower = APInt::getSignedMinValue(Width).ashr(*C);
 5459       Upper = APInt::getSignedMaxValue(Width).ashr(*C) + 1;
 5479       Upper = APInt::getAllOnesValue(Width).lshr(*C) + 1;
 5514       APInt IntMin = APInt::getSignedMinValue(Width);
 5514       APInt IntMin = APInt::getSignedMinValue(Width);
 5515       APInt IntMax = APInt::getSignedMaxValue(Width);
 5515       APInt IntMax = APInt::getSignedMaxValue(Width);
 5547       Upper = APInt::getMaxValue(Width).udiv(*C) + 1;
 5573 static void setLimitsForIntrinsic(const IntrinsicInst &II, APInt &Lower,
 5574                                   APInt &Upper) {
 5576   const APInt *C;
 5589         Lower = APInt::getSignedMinValue(Width);
 5590         Upper = APInt::getSignedMaxValue(Width) + *C + 1;
 5593         Lower = APInt::getSignedMinValue(Width) + *C;
 5594         Upper = APInt::getSignedMaxValue(Width) + 1;
 5604       Upper = APInt::getMaxValue(Width) - *C + 1;
 5610         Lower = APInt::getSignedMinValue(Width);
 5611         Upper = *C - APInt::getSignedMinValue(Width) + 1;
 5614         Lower = *C - APInt::getSignedMaxValue(Width);
 5615         Upper = APInt::getSignedMaxValue(Width) + 1;
 5620         Lower = APInt::getSignedMinValue(Width) - *C;
 5621         Upper = APInt::getSignedMaxValue(Width) + 1;
 5624         Lower = APInt::getSignedMinValue(Width);
 5625         Upper = APInt::getSignedMaxValue(Width) - *C + 1;
 5634 static void setLimitsForSelectPattern(const SelectInst &SI, APInt &Lower,
 5635                                       APInt &Upper, const InstrInfoQuery &IIQ) {
 5647     Lower = APInt::getNullValue(BitWidth);
 5650       Upper = APInt::getSignedMaxValue(BitWidth) + 1;
 5652       Upper = APInt::getSignedMinValue(BitWidth) + 1;
 5658     Lower = APInt::getSignedMinValue(BitWidth);
 5663   const APInt *C;
 5675       Lower = APInt::getSignedMinValue(BitWidth);
 5680       Upper = APInt::getSignedMaxValue(BitWidth) + 1;
 5690   const APInt *C;
 5696   APInt Lower = APInt(BitWidth, 0);
 5697   APInt Upper = APInt(BitWidth, 0);
lib/Analysis/VectorUtils.cpp
  221       const APInt &APStepVal = cast<SCEVConstant>(M->getOperand(0))->getAPInt();
  787 APInt llvm::possiblyDemandedEltsInMask(Value *Mask) {
  790   APInt DemandedElts = APInt::getAllOnesValue(VWidth);
  790   APInt DemandedElts = APInt::getAllOnesValue(VWidth);
lib/AsmParser/LLLexer.cpp
  955     APInt Tmp(bits, HexStr, 16);
lib/Bitcode/Reader/BitcodeReader.cpp
 2315 static APInt readWideAPInt(ArrayRef<uint64_t> Vals, unsigned TypeBits) {
 2393       APInt VInt =
 4385             APInt Low;
 4397               APInt High = readWideAPInt(
lib/Bitcode/Writer/BitcodeWriter.cpp
 2371         APInt api = CFP->getValueAPF().bitcastToAPInt();
 2376         APInt api = CFP->getValueAPF().bitcastToAPInt();
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
 2205     APInt OffsetAI(getDataLayout().getPointerTypeSizeInBits(CE->getType()), 0);
 2265     APInt LHSOffset;
 2269       APInt RHSOffset;
 2346     APInt Value = CI->getValue().zextOrSelf(Size);
 2475   APInt API = APF.bitcastToAPInt();
 2527   APInt Realigned(CI->getValue());
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
 2212     APInt RawBytes = Value.getConstantFP()->getValueAPF().bitcastToAPInt();
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  200 void DwarfExpression::addUnsignedConstant(const APInt &Value) {
lib/CodeGen/AsmPrinter/DwarfExpression.h
  288   void addUnsignedConstant(const APInt &Value);
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  516   const APInt FltVal = FPImm.bitcastToAPInt();
  560 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, const DIType *Ty) {
  564 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, bool Unsigned) {
lib/CodeGen/AsmPrinter/DwarfUnit.h
  201   void addConstantValue(DIE &Die, const APInt &Val, const DIType *Ty);
  202   void addConstantValue(DIE &Die, const APInt &Val, bool Unsigned);
lib/CodeGen/CodeGenPrepare.cpp
 1323     const APInt *CmpC, *AddC;
 1512     const APInt &Cimm = cast<ConstantInt>(User->getOperand(1))->getValue();
 1805       APInt Offset(DL->getIndexSizeInBits(
 3959       APInt CstVal = IsSExt ? Cst->getValue().sext(BitWidth)
 4143           const APInt &CVal = CI->getValue();
 5720   APInt DemandBits(BitWidth, 0);
 5721   APInt WidestAndBits(BitWidth, 0);
 5743       APInt AndBits = AndC->getValue();
 6259     APInt NarrowConst = Case.getCaseValue()->getValue();
 6260     APInt WideConst = (ExtType == Instruction::ZExt) ?
 6894     APInt NewIdx = UGEPIIdx->getValue() - GEPIIdx->getValue();
lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp
  160     if (Optional<APInt> Cst = ConstantFoldBinOp(Opc, SrcOps[0].getReg(),
lib/CodeGen/GlobalISel/CombinerHelper.cpp
  897     APInt Scalar = APInt(8, KnownVal);
  898     APInt SplatVal = APInt::getSplat(NumBits, Scalar);
  898     APInt SplatVal = APInt::getSplat(NumBits, Scalar);
  910     APInt Magic = APInt::getSplat(NumBits, APInt(8, 0x01));
  910     APInt Magic = APInt::getSplat(NumBits, APInt(8, 0x01));
lib/CodeGen/GlobalISel/GISelKnownBits.cpp
   52                                                    const APInt &DemandedElts,
   72   APInt DemandedElts =
   73       Ty.isVector() ? APInt::getAllOnesValue(Ty.getNumElements()) : APInt(1, 1);
   81   return maskedValueIsZero(R, APInt::getSignMask(BitWidth));
   84 APInt GISelKnownBits::getKnownZeroes(Register R) {
   88 APInt GISelKnownBits::getKnownOnes(Register R) { return getKnownBits(R).One; }
   91                                           const APInt &DemandedElts,
  176     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
lib/CodeGen/GlobalISel/IRTranslator.cpp
  596     const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue();
  597     const APInt& High = cast<ConstantInt>(CB.CmpRHS)->getValue();
 1902       APInt NewIdx = CI->getValue().sextOrTrunc(PreferredVecIdxWidth);
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  630     const APInt &Val = MI.getOperand(1).getCImm()->getValue();
 1435     APInt Mask = APInt::getAllOnesValue(OrigTy.getSizeInBits());
 1435     APInt Mask = APInt::getAllOnesValue(OrigTy.getSizeInBits());
 1468       auto TopBit =
 1469           APInt::getOneBitSet(WideTy.getSizeInBits(), CurTy.getSizeInBits());
 1678     const APInt &Val = SrcMO.getCImm()->getValue().sext(WideTy.getSizeInBits());
 3042 LegalizerHelper::narrowScalarShiftByConstant(MachineInstr &MI, const APInt &Amt,
 3922   APInt TwoPExpInt = APInt::getSignMask(DstTy.getSizeInBits());
 3922   APInt TwoPExpInt = APInt::getSignMask(DstTy.getSizeInBits());
 3925                     APInt::getNullValue(SrcTy.getSizeInBits()));
 3990     Src0Ty, APInt::getSignMask(Src0Size));
 3993     Src0Ty, APInt::getLowBitsSet(Src0Size, Src0Size - 1));
 4182     APInt AlignMask(IntPtrTy.getSizeInBits(), Align, true);
 4253     APInt MaskVal = ~APInt::getBitsSet(DstTy.getSizeInBits(), Offset,
 4253     APInt MaskVal = ~APInt::getBitsSet(DstTy.getSizeInBits(), Offset,
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
  340                                                     const APInt &Val) {
lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
  557   APInt ValueMask(OrigValueBitWidth, 0);
  562     APInt PartMapMask = APInt::getBitsSet(OrigValueBitWidth, PartMap.StartIdx,
  562     APInt PartMapMask = APInt::getBitsSet(OrigValueBitWidth, PartMap.StartIdx,
lib/CodeGen/GlobalISel/Utils.cpp
  236       APInt Val = CstVal.isImm() ? APInt(BitWidth, CstVal.getImm())
  270   Optional<APInt> MaybeVal = GetImmediateValue(*MI);
  273   APInt &Val = *MaybeVal;
  338 Optional<APInt> llvm::ConstantFoldBinOp(unsigned Opcode, const unsigned Op1,
  345     APInt C1(Ty.getSizeInBits(), *MaybeOp1Cst, true);
  346     APInt C2(Ty.getSizeInBits(), *MaybeOp2Cst, true);
  414 Optional<APInt> llvm::ConstantFoldExtOp(unsigned Opcode, const unsigned Op1,
  420     APInt C1(Ty.getSizeInBits(), *MaybeOp1Cst, true);
lib/CodeGen/InterleavedLoadCombinePass.cpp
  180   SmallVector<std::pair<BOps, APInt>, 4> B;
  183   APInt A;
  195   Polynomial(const APInt &A, unsigned ErrorMSBs = 0)
  225   Polynomial &add(const APInt &C) {
  252   Polynomial &mul(const APInt &C) {
  329   Polynomial &lshr(const APInt &C) {
  613   void pushBOperation(const BOps Op, const APInt &C) {
  985       APInt BaseOffset(PointerBits, 0);
lib/CodeGen/MIRParser/MIParser.cpp
  490   bool getHexUint(APInt &Result);
 1641     APInt A;
 2639     APInt A;
 2650 bool MIParser::getHexUint(APInt &Result) {
 2658   APInt A(V.size()*4, V, 16);
lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
  194       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  325       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  444       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  565       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  655       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
  761       Value *Mask = Builder.getInt(APInt::getOneBitSet(VectorWidth, Idx));
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  296       APInt DemandedBits = APInt::getAllOnesValue(BitWidth);
  296       APInt DemandedBits = APInt::getAllOnesValue(BitWidth);
  300     bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits) {
  303       APInt DemandedElts = APInt::getAllOnesValue(NumElts);
  303       APInt DemandedElts = APInt::getAllOnesValue(NumElts);
  312       APInt DemandedElts = APInt::getAllOnesValue(NumElts);
  312       APInt DemandedElts = APInt::getAllOnesValue(NumElts);
  316     bool SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
  317                               const APInt &DemandedElts);
  318     bool SimplifyDemandedVectorElts(SDValue Op, const APInt &DemandedElts,
  796 static void zeroExtendToMatch(APInt &LHS, APInt &RHS, unsigned Offset = 0) {
  796 static void zeroExtendToMatch(APInt &LHS, APInt &RHS, unsigned Offset = 0) {
  901   const APInt &C1APIntVal = C1->getAPIntValue();
  902   const APInt &C2APIntVal = C2->getAPIntValue();
  906   const APInt CombinedValueIntVal = C1APIntVal + C2APIntVal;
 1041 bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
 1042                                        const APInt &DemandedElts) {
 1065                                              const APInt &DemandedElts,
 1068   APInt KnownUndef, KnownZero;
 2067   APInt NewC = IsAdd ? C->getAPIntValue() + 1 : C->getAPIntValue() - 1;
 2910     if (DAG.MaskedValueIsZero(N1, ~APInt::getSignMask(BitWidth))) {
 3330   APInt ConstValue0, ConstValue1;
 3417     APInt MulC = ConstValue1.abs();
 4521         const APInt &C0Val = C0->getAPIntValue();
 4522         const APInt &C1Val = C1->getAPIntValue();
 4581         APInt ADDC = ADDI->getAPIntValue();
 4582         APInt SRLC = SRLI->getAPIntValue();
 4586           APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 4586           APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 4612         const APInt &AndMask = CAnd->getAPIntValue();
 5016   const APInt &ShiftAmt = Srl.getConstantOperandAPInt(1);
 5027       APInt::getOneBitSet(VTBitWidth, ShiftAmt.getZExtValue()), DL, VT);
 5051       return DAG.getConstant(APInt::getNullValue(N0.getScalarValueSizeInBits()),
 5055       return DAG.getConstant(APInt::getNullValue(N1.getScalarValueSizeInBits()),
 5080                                    APInt::getAllOnesValue(BitWidth)))
 5105     APInt Mask = ~N1C->getAPIntValue();
 5139     APInt Constant = APInt::getNullValue(1);
 5139     APInt Constant = APInt::getNullValue(1);
 5143       APInt SplatValue, SplatUndef;
 5170           Constant = APInt::getAllOnesValue(EltBitWidth);
 5294     APInt ExtBits = APInt::getHighBitsSet(ExtBitSize, ExtBitSize - MemBitSize);
 5294     APInt ExtBits = APInt::getHighBitsSet(ExtBitSize, ExtBitSize - MemBitSize);
 5423             N10, APInt::getHighBitsSet(OpSizeInBits, OpSizeInBits - 16)))
 5627         const APInt &LHSMask = N0O1C->getAPIntValue();
 5628         const APInt &RHSMask = N1O1C->getAPIntValue();
 5959   APInt NeededShiftAmt = VTWidth - OppShiftCst->getAPIntValue();
 5961   APInt ExtractFromAmt = ExtractFromCst->getAPIntValue();
 5962   APInt OppLHSAmt = OppLHSCst->getAPIntValue();
 5972     const APInt ExtractDiv = APInt::getOneBitSet(ExtractFromAmt.getBitWidth(),
 5972     const APInt ExtractDiv = APInt::getOneBitSet(ExtractFromAmt.getBitWidth(),
 5974     APInt ResultAmt;
 5975     APInt Rem;
 5976     APInt::udivrem(ExtractFromAmt, ExtractDiv, ResultAmt, Rem);
 6079   APInt Width;
 6984         APInt Ones = APInt::getAllOnesValue(BitWidth);
 6984         APInt Ones = APInt::getAllOnesValue(BitWidth);
 7077   const APInt &C1Val = C1Node->getAPIntValue();
 7105   const APInt *C0Val;
 7236     APInt ModuloMask(N1.getScalarValueSizeInBits(), Bitsize - 1);
 7329                             APInt::getAllOnesValue(OpSizeInBits)))
 7347       APInt c1 = LHS->getAPIntValue();
 7348       APInt c2 = RHS->getAPIntValue();
 7357       APInt c1 = LHS->getAPIntValue();
 7358       APInt c2 = RHS->getAPIntValue();
 7385       APInt c1 = LHS->getAPIntValue();
 7386       APInt c2 = RHS->getAPIntValue();
 7398       APInt c1 = LHS->getAPIntValue();
 7399       APInt c2 = RHS->getAPIntValue();
 7424       APInt c1 = LHS->getAPIntValue();
 7425       APInt c2 = RHS->getAPIntValue();
 7470         APInt Mask = APInt::getHighBitsSet(OpSizeInBits, OpSizeInBits - c1);
 7470         APInt Mask = APInt::getHighBitsSet(OpSizeInBits, OpSizeInBits - c1);
 7585       APInt c1 = LHS->getAPIntValue();
 7586       APInt c2 = RHS->getAPIntValue();
 7588       APInt Sum = c1 + c2;
 7749                                    APInt::getAllOnesValue(OpSizeInBits)))
 7756       APInt c1 = LHS->getAPIntValue();
 7757       APInt c2 = RHS->getAPIntValue();
 7766       APInt c1 = LHS->getAPIntValue();
 7767       APInt c2 = RHS->getAPIntValue();
 7831       APInt Mask = APInt::getLowBitsSet(OpSizeInBits, OpSizeInBits - ShiftAmt);
 7831       APInt Mask = APInt::getLowBitsSet(OpSizeInBits, OpSizeInBits - ShiftAmt);
 7857     APInt UnknownBits = ~Known.Zero;
 7989     APInt ModuloBits(N2.getScalarValueSizeInBits(), BitWidth - 1);
 8268       const APInt &C1Val = C1->getAPIntValue();
 8269       const APInt &C2Val = C2->getAPIntValue();
 8640     const APInt &C1 = cast<ConstantSDNode>(N1Elt)->getAPIntValue();
 8641     const APInt &C2 = cast<ConstantSDNode>(N2Elt)->getAPIntValue();
 8660   APInt Pow2C;
 8959     APInt C = cast<ConstantSDNode>(Op)->getAPIntValue().zextOrTrunc(EVTBits);
 9210   APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
 9513         APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
 9718     APInt TruncatedBits =
 9721       APInt::getBitsSet(Op.getScalarValueSizeInBits(),
 9782     APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
 9837         APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
 9998     APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();
10209     const APInt &Mask = AndC->getAPIntValue();
10215       APInt ShiftedMask = Mask.lshr(ShAmt);
10260         const APInt &ShiftMask =
10430   if (DAG.MaskedValueIsZero(N0, APInt::getOneBitSet(VTBits, EVTBits - 1)))
10693     APInt Mask =
10694         APInt::getLowBitsSet(N0.getValueSizeInBits(), VT.getSizeInBits());
10913   APInt SignMask;
10917     SignMask = ~APInt::getSignMask(SourceVT.getScalarSizeInBits());
10921     SignMask = APInt::getSignMask(SourceVT.getScalarSizeInBits());
10925     SignMask = APInt::getSignMask(SourceVT.getScalarSizeInBits());
11044           APInt::getSignMask(VT.getSizeInBits() / 2), SDLoc(N0), MVT::i64);
11064     APInt SignBit = APInt::getSignMask(VT.getSizeInBits());
11064     APInt SignBit = APInt::getSignMask(VT.getSizeInBits());
11112         APInt SignBit = APInt::getSignMask(VT.getSizeInBits() / 2);
11112         APInt SignBit = APInt::getSignMask(VT.getSizeInBits() / 2);
11133       APInt SignBit = APInt::getSignMask(VT.getSizeInBits());
11133       APInt SignBit = APInt::getSignMask(VT.getSizeInBits());
11265       APInt NewBits = APInt(DstBitSize, 0);
11301     APInt OpVal = cast<ConstantSDNode>(Op)->
11305       APInt ThisVal = OpVal.trunc(DstBitSize);
13177       APInt SignMask;
13181         SignMask = APInt::getSignMask(N0.getScalarValueSizeInBits());
13182         SignMask = APInt::getSplat(IntVT.getSizeInBits(), SignMask);
13185         SignMask = APInt::getSignMask(IntVT.getSizeInBits());
13275       APInt SignMask;
13279         SignMask = ~APInt::getSignMask(N0.getScalarValueSizeInBits());
13280         SignMask = APInt::getSplat(IntVT.getSizeInBits(), SignMask);
13283         SignMask = ~APInt::getSignMask(IntVT.getSizeInBits());
13358         const APInt &AndConst = cast<ConstantSDNode>(AndOp1)->getAPIntValue();
13692     const APInt &Offset0 = CN->getAPIntValue();
13693     APInt Offset1 = cast<ConstantSDNode>(Offset)->getAPIntValue();
13702     APInt CNV = Offset0;
13991           DAG.getConstant(APInt::getLowBitsSet(STType.getSizeInBits(),
14269   APInt getUsedBits() const {
14279     APInt UsedBits(Inst->getValueSizeInBits(0), 0);
14466 static bool areUsedBitsDense(const APInt &UsedBits) {
14472   APInt NarrowedUsedBits = UsedBits.lshr(UsedBits.countTrailingZeros());
14487   APInt UsedBits = First.getUsedBits();
14565                                 const APInt &UsedBits, bool ForCodeSize) {
14615   APInt UsedBits(LD->getValueSizeInBits(0), 0);
14653     APInt CurrentUsedBits = LS.getUsedBits();
14783   APInt Mask = ~APInt::getBitsSet(IVal.getValueSizeInBits(),
14783   APInt Mask = ~APInt::getBitsSet(IVal.getValueSizeInBits(),
14890     APInt Imm = cast<ConstantSDNode>(N1)->getAPIntValue();
14892       Imm ^= APInt::getAllOnesValue(BitWidth);
14915     APInt Mask = APInt::getBitsSet(BitWidth, ShAmt,
14915     APInt Mask = APInt::getBitsSet(BitWidth, ShAmt,
14918       APInt NewImm = (Imm & Mask).lshr(ShAmt).trunc(NewBW);
14920         NewImm ^= APInt::getAllOnesValue(NewBW);
15027   APInt Val;
15197     APInt StoreInt(SizeInBits, 0);
16194     APInt TruncDemandedBits =
16195         APInt::getLowBitsSet(Value.getScalarValueSizeInBits(),
16269               APInt Val = C1->getAPIntValue();
16270               APInt InsertVal = C->getAPIntValue().zextOrTrunc(STBitSize);
16941     APInt DemandedElts = APInt::getNullValue(NumElts);
16941     APInt DemandedElts = APInt::getNullValue(NumElts);
17412     const APInt &ExtractIdx = Op.getConstantOperandAPInt(1);
19481       APInt Bits;
20076       const APInt &AndMask = ConstAndRHS->getAPIntValue();
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  441     APInt Val = CI->getValue().zextOrTrunc(BitWidth);
  474       APInt Val = CI->getValue().zextOrTrunc(BitWidth);
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
   70   APInt SignMask;
  461         const APInt &IntVal = CFP->getValueAPF().bitcastToAPInt();
 1447     State.SignMask = APInt::getSignMask(NumBits);
 1483   State.SignMask = APInt::getOneBitSet(LoadTy.getSizeInBits(), 7);
 2550     APInt MaskHi4 = APInt::getSplat(Sz, APInt(8, 0xF0));
 2550     APInt MaskHi4 = APInt::getSplat(Sz, APInt(8, 0xF0));
 2551     APInt MaskHi2 = APInt::getSplat(Sz, APInt(8, 0xCC));
 2551     APInt MaskHi2 = APInt::getSplat(Sz, APInt(8, 0xCC));
 2552     APInt MaskHi1 = APInt::getSplat(Sz, APInt(8, 0xAA));
 2552     APInt MaskHi1 = APInt::getSplat(Sz, APInt(8, 0xAA));
 2553     APInt MaskLo4 = APInt::getSplat(Sz, APInt(8, 0x0F));
 2553     APInt MaskLo4 = APInt::getSplat(Sz, APInt(8, 0x0F));
 2554     APInt MaskLo2 = APInt::getSplat(Sz, APInt(8, 0x33));
 2554     APInt MaskLo2 = APInt::getSplat(Sz, APInt(8, 0x33));
 2555     APInt MaskLo1 = APInt::getSplat(Sz, APInt(8, 0x55));
 2555     APInt MaskLo1 = APInt::getSplat(Sz, APInt(8, 0x55));
 2592     APInt Shift(Sz, 1);
 3190                DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), dl,
 4149       auto TopBit = APInt::getOneBitSet(NVT.getSizeInBits(),
 4149       auto TopBit = APInt::getOneBitSet(NVT.getSizeInBits(),
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  147     APInt Val(128, words);
  170   APInt API = APInt::getAllOnesValue(Size);
  170   APInt API = APInt::getAllOnesValue(Size);
  486     APInt SignMask = APInt::getSignMask(NVT.getSizeInBits());
  486     APInt SignMask = APInt::getSignMask(NVT.getSizeInBits());
 1184   APInt C = cast<ConstantFPSDNode>(N)->getValueAPF().bitcastToAPInt();
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  458     auto TopBit = APInt::getOneBitSet(NVT.getScalarSizeInBits(),
  458     auto TopBit = APInt::getOneBitSet(NVT.getScalarSizeInBits(),
  707       APInt MaxVal = APInt::getAllOnesValue(OldBits).zext(NewBits);
  707       APInt MaxVal = APInt::getAllOnesValue(OldBits).zext(NewBits);
  715     APInt MinVal = APInt::getSignedMinValue(OldBits).sext(NewBits);
  715     APInt MinVal = APInt::getSignedMinValue(OldBits).sext(NewBits);
  716     APInt MaxVal = APInt::getSignedMaxValue(OldBits).sext(NewBits);
  716     APInt MaxVal = APInt::getSignedMaxValue(OldBits).sext(NewBits);
 1824 void DAGTypeLegalizer::ExpandShiftByConstant(SDNode *N, const APInt &Amt,
 1924   APInt HighBitMask = APInt::getHighBitsSet(ShBits, ShBits - Log2_32(NVTBits));
 1924   APInt HighBitMask = APInt::getHighBitsSet(ShBits, ShBits - Log2_32(NVTBits));
 2462   const APInt &Cst = Constant->getAPIntValue();
 2800     SDValue Mask = DAG.getConstant(APInt::getLowBitsSet(Bits, HalfBits), dl,
 2809     if (APInt::getMaxValue(ShiftAmtTy.getSizeInBits()).ult(HalfBits)) {
 2895         APInt MinVal = APInt::getSignedMinValue(VTSize);
 2895         APInt MinVal = APInt::getSignedMinValue(VTSize);
 2896         APInt MaxVal = APInt::getSignedMaxValue(VTSize);
 2896         APInt MaxVal = APInt::getSignedMaxValue(VTSize);
 2906         APInt MaxVal = APInt::getMaxValue(VTSize);
 2906         APInt MaxVal = APInt::getMaxValue(VTSize);
 3031         APInt::getHighBitsSet(NVTSize, OverflowBits - NVTSize), dl, NVT);
 3033         APInt::getLowBitsSet(NVTSize, VTSize - OverflowBits), dl, NVT);
 3064         APInt::getHighBitsSet(NVTSize, OverflowBits), dl, NVT);
 3066         APInt::getLowBitsSet(NVTSize, NVTSize - OverflowBits), dl, NVT);
 3073   APInt MaxHi = APInt::getSignedMaxValue(NVTSize);
 3073   APInt MaxHi = APInt::getSignedMaxValue(NVTSize);
 3074   APInt MaxLo = APInt::getAllOnesValue(NVTSize);
 3074   APInt MaxLo = APInt::getAllOnesValue(NVTSize);
 3078   APInt MinHi = APInt::getSignedMinValue(NVTSize);
 3078   APInt MinHi = APInt::getSignedMinValue(NVTSize);
 4003     APInt FF(32, 0);
lib/CodeGen/SelectionDAG/LegalizeTypes.h
  442   void ExpandShiftByConstant(SDNode *N, const APInt &Amt,
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  698         APInt::getLowBitsSet(WideBits, SrcEltBits), dl, WideVT);
  919           DAG.getConstant(APInt::getAllOnesValue(BitTy.getSizeInBits()), DL,
  933             APInt::getAllOnesValue(BitTy.getSizeInBits()), DL, MaskTy);
 1170     APInt::getAllOnesValue(VT.getScalarSizeInBits()), DL, VT);
 1435                            DAG.getConstant(APInt::getAllOnesValue
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
 4607         APInt::getSignedMinValue(ElemVT.getSizeInBits()), dl, ElemVT);
 4611         APInt::getSignedMaxValue(ElemVT.getSizeInBits()), dl, ElemVT);
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  135 bool ISD::isConstantSplatVector(const SDNode *N, APInt &SplatVal) {
  140   APInt SplatUndef;
 1137   APInt Imm = APInt::getLowBitsSet(BitWidth,
 1137   APInt Imm = APInt::getLowBitsSet(BitWidth,
 1159     getConstant(APInt::getAllOnesValue(EltVT.getSizeInBits()), DL, VT);
 1192 SDValue SelectionDAG::getConstant(const APInt &Val, const SDLoc &DL, EVT VT,
 1211    APInt NewVal = Elt->getValue().zextOrTrunc(EltVT.getSizeInBits());
 1223     const APInt &NewVal = Elt->getValue();
 2015     const APInt &C2 = N2C->getAPIntValue();
 2017       const APInt &C1 = N1C->getAPIntValue();
 2127 SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits) {
 2129   APInt DemandedElts = VT.isVector()
 2130                            ? APInt::getAllOnesValue(VT.getVectorNumElements())
 2140 SDValue SelectionDAG::GetDemandedBits(SDValue V, const APInt &DemandedBits,
 2141                                       const APInt &DemandedElts) {
 2148     const APInt &CVal = CV->getAPIntValue();
 2149     APInt NewVal = CVal & DemandedBits;
 2170       APInt SrcDemandedBits = DemandedBits << Amt;
 2181       const APInt &AndVal = RHSC->getAPIntValue();
 2197     APInt SrcDemandedBits = DemandedBits.trunc(SrcBitWidth);
 2210   return MaskedValueIsZero(Op, APInt::getSignMask(BitWidth), Depth);
 2216 bool SelectionDAG::MaskedValueIsZero(SDValue V, const APInt &Mask,
 2219   APInt DemandedElts = VT.isVector()
 2220                            ? APInt::getAllOnesValue(VT.getVectorNumElements())
 2228 bool SelectionDAG::MaskedValueIsZero(SDValue V, const APInt &Mask,
 2229                                      const APInt &DemandedElts,
 2235 bool SelectionDAG::MaskedValueIsAllOnes(SDValue V, const APInt &Mask,
 2242 bool SelectionDAG::isSplatValue(SDValue V, const APInt &DemandedElts,
 2243                                 APInt &UndefElts) {
 2252   UndefElts = APInt::getNullValue(NumElts);
 2297       APInt UndefSrcElts;
 2298       APInt DemandedSrc = DemandedElts.zextOrSelf(NumSrcElts).shl(Idx);
 2309     APInt UndefLHS, UndefRHS;
 2330   APInt UndefElts;
 2331   APInt DemandedElts = APInt::getAllOnesValue(NumElts);
 2331   APInt DemandedElts = APInt::getAllOnesValue(NumElts);
 2343     APInt UndefElts;
 2344     APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
 2344     APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
 2384 static const APInt *getValidShiftAmountConstant(SDValue V) {
 2388     const APInt &ShAmt = SA->getAPIntValue();
 2397 static const APInt *getValidMinimumShiftAmountConstant(SDValue V) {
 2402   const APInt *MinShAmt = nullptr;
 2408     const APInt &ShAmt = SA->getAPIntValue();
 2423   APInt DemandedElts = VT.isVector()
 2424                            ? APInt::getAllOnesValue(VT.getVectorNumElements())
 2432 KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
 2494     APInt DemandedLHS(NumElts, 0), DemandedRHS(NumElts, 0);
 2542       APInt DemandedSub = DemandedElts.lshr(i * NumSubVectorElts);
 2567       APInt DemandedSubElts = DemandedElts.extractBits(NumSubElts, Idx);
 2573       APInt SubMask = APInt::getBitsSet(NumElts, Idx, Idx + NumSubElts);
 2573       APInt SubMask = APInt::getBitsSet(NumElts, Idx, Idx + NumSubElts);
 2574       APInt DemandedSrcElts = DemandedElts & ~SubMask;
 2596     APInt DemandedSrc = APInt::getAllOnesValue(NumSrcElts);
 2596     APInt DemandedSrc = APInt::getAllOnesValue(NumSrcElts);
 2644       APInt SubDemandedElts(NumElts * SubScale, 0);
 2666       APInt SubDemandedElts(NumElts / SubScale, 0);
 2711     APInt KnownZeroOut = (Known.Zero & Known2.Zero) | (Known.One & Known2.One);
 2796     if (const APInt *ShAmt = getValidShiftAmountConstant(Op)) {
 2806     if (const APInt *ShAmt = getValidShiftAmountConstant(Op)) {
 2813     } else if (const APInt *ShMinAmt = getValidMinimumShiftAmountConstant(Op)) {
 2819     if (const APInt *ShAmt = getValidShiftAmountConstant(Op)) {
 2865     APInt NewBits = APInt::getHighBitsSet(BitWidth, BitWidth - EBits);
 2865     APInt NewBits = APInt::getHighBitsSet(BitWidth, BitWidth - EBits);
 2867     APInt InSignMask = APInt::getSignMask(EBits);
 2867     APInt InSignMask = APInt::getSignMask(EBits);
 2868     APInt InputDemandedBits = APInt::getLowBitsSet(BitWidth, EBits);
 2868     APInt InputDemandedBits = APInt::getLowBitsSet(BitWidth, EBits);
 2944                 const APInt &Value = CInt->getValue();
 2950                 APInt Value = CFP->getValueAPF().bitcastToAPInt();
 2962             const APInt &Value = CInt->getValue();
 2966             APInt Value = CFP->getValueAPF().bitcastToAPInt();
 2985     APInt InDemandedElts = DemandedElts.zextOrSelf(InVT.getVectorNumElements());
 2997     APInt InDemandedElts = DemandedElts.zextOrSelf(InVT.getVectorNumElements());
 3023     APInt InMask = APInt::getLowBitsSet(BitWidth, VT.getSizeInBits());
 3023     APInt InMask = APInt::getLowBitsSet(BitWidth, VT.getSizeInBits());
 3091       const APInt &RA = Rem->getAPIntValue().abs();
 3093         APInt LowBits = RA - 1;
 3115       const APInt &RA = Rem->getAPIntValue();
 3117         APInt LowBits = (RA - 1);
 3165       APInt DemandedElt = APInt::getOneBitSet(NumSrcElts, Idx);
 3165       APInt DemandedElt = APInt::getOneBitSet(NumSrcElts, Idx);
 3184       Known.Zero = Known.One = APInt::getAllOnesValue(BitWidth);
 3196       APInt VectorElts = DemandedElts & ~(APInt::getOneBitSet(NumElts, EltIdx));
 3196       APInt VectorElts = DemandedElts & ~(APInt::getOneBitSet(NumElts, EltIdx));
 3237       Known.Zero = APInt::getSignMask(BitWidth);
 3284       const APInt &ValueLow = CstLow->getAPIntValue();
 3285       const APInt &ValueHigh = CstHigh->getAPIntValue();
 3404   APInt DemandedElts = VT.isVector()
 3405                            ? APInt::getAllOnesValue(VT.getVectorNumElements())
 3410 unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
 3420     const APInt &Val = C->getAPIntValue();
 3463     APInt DemandedLHS(NumElts, 0), DemandedRHS(NumElts, 0);
 3513       APInt SrcDemandedElts(NumElts / Scale, 0);
 3551     APInt DemandedSrcElts = DemandedElts.zextOrSelf(SrcVT.getVectorNumElements());
 3561       APInt ShiftVal = C->getAPIntValue();
 3781       APInt VectorElts = DemandedElts;
 3812     APInt DemandedSrcElts = APInt::getAllOnesValue(NumSrcElts);
 3812     APInt DemandedSrcElts = APInt::getAllOnesValue(NumSrcElts);
 3816           APInt::getOneBitSet(NumSrcElts, ConstEltNo->getZExtValue());
 3826     APInt DemandedSrc = APInt::getAllOnesValue(NumSrcElts);
 3826     APInt DemandedSrc = APInt::getAllOnesValue(NumSrcElts);
 3842       APInt DemandedSub = DemandedElts.lshr(i * NumSubVectorElts);
 3862       APInt DemandedSubElts = DemandedElts.extractBits(NumSubElts, Idx);
 3867       APInt SubMask = APInt::getBitsSet(NumElts, Idx, Idx + NumSubElts);
 3867       APInt SubMask = APInt::getBitsSet(NumElts, Idx, Idx + NumSubElts);
 3868       APInt DemandedSrcElts = DemandedElts & ~SubMask;
 3913                   const APInt &Value = CInt->getValue();
 3918                   APInt Value = CFP->getValueAPF().bitcastToAPInt();
 3949   APInt Mask;
 4287     const APInt &Val = C->getAPIntValue();
 4304                   APInt::getNullValue(VT.getSizeInBits()));
 4694 static std::pair<APInt, bool> FoldValue(unsigned Opcode, const APInt &C1,
 4694 static std::pair<APInt, bool> FoldValue(unsigned Opcode, const APInt &C1,
 4695                                         const APInt &C2) {
 4742   std::pair<APInt, bool> Folded = FoldValue(Opcode, C1->getAPIntValue(),
 5208       const APInt &Val = N1C->getAPIntValue();
 5221         APInt Val = C->getAPIntValue();
 5315       APInt ShiftedVal = N1C->getAPIntValue().lshr(Shift);
 5634     APInt Val = APInt::getSplat(NumBits, C->getAPIntValue());
 5634     APInt Val = APInt::getSplat(NumBits, C->getAPIntValue());
 5653     APInt Magic = APInt::getSplat(NumBits, APInt(8, 0x01));
 5653     APInt Magic = APInt::getSplat(NumBits, APInt(8, 0x01));
 5694   APInt Val(NumVTBits, 0);
 8741 ConstantSDNode *llvm::isConstOrConstSplat(SDValue N, const APInt &DemandedElts,
 8780                                               const APInt &DemandedElts,
 9360 bool BuildVectorSDNode::isConstantSplat(APInt &SplatValue, APInt &SplatUndef,
 9360 bool BuildVectorSDNode::isConstantSplat(APInt &SplatValue, APInt &SplatUndef,
 9406     APInt HighValue = SplatValue.lshr(HalfSize).trunc(HalfSize);
 9407     APInt LowValue = SplatValue.trunc(HalfSize);
 9408     APInt HighUndef = SplatUndef.lshr(HalfSize).trunc(HalfSize);
 9409     APInt LowUndef = SplatUndef.trunc(HalfSize);
 9426 SDValue BuildVectorSDNode::getSplatValue(const APInt &DemandedElts,
 9462   APInt DemandedElts = APInt::getAllOnesValue(getNumOperands());
 9462   APInt DemandedElts = APInt::getAllOnesValue(getNumOperands());
 9467 BuildVectorSDNode::getConstantSplatNode(const APInt &DemandedElts,
 9479 BuildVectorSDNode::getConstantFPSplatNode(const APInt &DemandedElts,
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 2356     const APInt& Low = cast<ConstantInt>(CB.CmpLHS)->getValue();
 2357     const APInt& High = cast<ConstantInt>(CB.CmpRHS)->getValue();
 3877       APInt ElementSize(IdxSize, DL->getTypeAllocSize(GTI.getIndexedType()));
 3888         APInt Offs = ElementSize * CI->getValue().sextOrTrunc(IdxSize);
 8587   APInt Lo = CR.getUnsignedMin();
 8591   APInt Hi = CR.getUnsignedMax();
10068       const APInt &SmallValue = Small.Low->getValue();
10069       const APInt &BigValue = Big.Low->getValue();
10072       APInt CommonBit = BigValue ^ SmallValue;
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
 1310       APInt Offset(DL.getTypeSizeInBits(Address->getType()), 0);
 1973   const APInt &ActualMask = RHS->getAPIntValue();
 1974   const APInt &DesiredMask = APInt(LHS.getValueSizeInBits(), DesiredMaskS);
 1986   APInt NeededMask = DesiredMask & ~ActualMask;
 2002   const APInt &ActualMask = RHS->getAPIntValue();
 2003   const APInt &DesiredMask = APInt(LHS.getValueSizeInBits(), DesiredMaskS);
 2015   APInt NeededMask = DesiredMask & ~ActualMask;
lib/CodeGen/SelectionDAG/TargetLowering.cpp
  468 bool TargetLowering::ShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
  489     const APInt &C = Op1C->getAPIntValue();
  511                                       const APInt &Demanded,
  554 bool TargetLowering::SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
  569 bool TargetLowering::SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
  575   APInt DemandedElts = VT.isVector()
  576                            ? APInt::getAllOnesValue(VT.getVectorNumElements())
  585     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
  585     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
  619       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
  619       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
  620       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
  620       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
  623         APInt Sub = DemandedBits.extractBits(NumSrcEltBits, Offset);
  642       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
  642       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
  643       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
  643       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
  754     SDValue Op, const APInt &OriginalDemandedBits,
  755     const APInt &OriginalDemandedElts, KnownBits &Known, TargetLoweringOpt &TLO,
  766   APInt DemandedBits = OriginalDemandedBits;
  767   APInt DemandedElts = OriginalDemandedElts;
  796     DemandedBits = APInt::getAllOnesValue(BitWidth);
  797     DemandedElts = APInt::getAllOnesValue(NumElts);
  817     APInt SrcDemandedBits = DemandedBits.zextOrSelf(SrcBitWidth);
  844     APInt DemandedVecElts(DemandedElts);
  856     APInt DemandedSclBits = DemandedBits.zextOrTrunc(NumSclBits);
  882     APInt BaseElts = DemandedElts;
  883     APInt SubElts = APInt::getAllOnesValue(NumSubElts);
  883     APInt SubElts = APInt::getAllOnesValue(NumSubElts);
  885       const APInt &Idx = Op.getConstantOperandAPInt(2);
  889         BaseElts.insertBits(APInt::getNullValue(NumSubElts), SubIdx);
  918     APInt SrcElts = APInt::getAllOnesValue(NumSrcElts);
  918     APInt SrcElts = APInt::getAllOnesValue(NumSrcElts);
  935       APInt DemandedSubElts =
  952     APInt DemandedLHS(NumElts, 0);
  953     APInt DemandedRHS(NumElts, 0);
 1291         if (!DemandedBits.intersects(APInt::getLowBitsSet(BitWidth, ShAmt))) {
 1384       APInt InDemandedMask = (DemandedBits << ShAmt);
 1399                   APInt::getHighBitsSet(BitWidth, ShAmt))) {
 1449       APInt InDemandedMask = (DemandedBits << ShAmt);
 1513       APInt Demanded0 = DemandedBits.lshr(IsFSHL ? Amt : (BitWidth - Amt));
 1514       APInt Demanded1 = DemandedBits << (IsFSHL ? (BitWidth - Amt) : Amt);
 1533     APInt DemandedSrcBits = DemandedBits.reverseBits();
 1570     APInt InputDemandedBits = DemandedBits.getLoBits(ExVTBits);
 1588     APInt Mask = APInt::getLowBitsSet(BitWidth, ExVTBits);
 1588     APInt Mask = APInt::getLowBitsSet(BitWidth, ExVTBits);
 1602     APInt MaskLo = DemandedBits.getLoBits(HalfBitWidth).trunc(HalfBitWidth);
 1603     APInt MaskHi = DemandedBits.getHiBits(HalfBitWidth).trunc(HalfBitWidth);
 1643     APInt InDemandedBits = DemandedBits.trunc(InBits);
 1644     APInt InDemandedElts = DemandedElts.zextOrSelf(InElts);
 1676     APInt InDemandedBits = DemandedBits.trunc(InBits);
 1677     APInt InDemandedElts = DemandedElts.zextOrSelf(InElts);
 1716     APInt InDemandedBits = DemandedBits.trunc(InBits);
 1717     APInt InDemandedElts = DemandedElts.zextOrSelf(InElts);
 1732     APInt TruncMask = DemandedBits.zext(OperandBitWidth);
 1766         APInt HighBits =
 1767             APInt::getHighBitsSet(OperandBitWidth, OperandBitWidth - BitWidth);
 1790     APInt InMask = APInt::getLowBitsSet(BitWidth, ZVT.getSizeInBits());
 1790     APInt InMask = APInt::getLowBitsSet(BitWidth, ZVT.getSizeInBits());
 1806     APInt DemandedSrcElts = APInt::getAllOnesValue(NumSrcElts);
 1806     APInt DemandedSrcElts = APInt::getAllOnesValue(NumSrcElts);
 1809         DemandedSrcElts = APInt::getOneBitSet(NumSrcElts, CIdx->getZExtValue());
 1813     APInt DemandedSrcBits = DemandedBits;
 1834         DemandedBits == APInt::getSignMask(Op.getValueSizeInBits()) &&
 1862       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
 1862       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
 1863       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
 1863       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
 1866         APInt Sub = DemandedBits.extractBits(NumSrcEltBits, Offset);
 1875       APInt KnownSrcUndef, KnownSrcZero;
 1888       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
 1888       APInt DemandedSrcBits = APInt::getNullValue(NumSrcEltBits);
 1889       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
 1889       APInt DemandedSrcElts = APInt::getNullValue(NumSrcElts);
 1898         APInt KnownSrcUndef, KnownSrcZero;
 1926     APInt LoMask = APInt::getLowBitsSet(BitWidth, BitWidth - DemandedBitsLZ);
 1926     APInt LoMask = APInt::getLowBitsSet(BitWidth, BitWidth - DemandedBitsLZ);
 1968     APInt HighMask = APInt::getHighBitsSet(BitWidth, DemandedBitsLZ);
 1968     APInt HighMask = APInt::getHighBitsSet(BitWidth, DemandedBitsLZ);
 2017                                                 const APInt &DemandedElts,
 2018                                                 APInt &KnownUndef,
 2019                                                 APInt &KnownZero,
 2037 static APInt getKnownUndefForVectorBinop(SDValue BO, SelectionDAG &DAG,
 2038                                          const APInt &UndefOp0,
 2039                                          const APInt &UndefOp1) {
 2066   APInt KnownUndef = APInt::getNullValue(NumElts);
 2066   APInt KnownUndef = APInt::getNullValue(NumElts);
 2084     SDValue Op, const APInt &OriginalDemandedElts, APInt &KnownUndef,
 2084     SDValue Op, const APInt &OriginalDemandedElts, APInt &KnownUndef,
 2085     APInt &KnownZero, TargetLoweringOpt &TLO, unsigned Depth,
 2088   APInt DemandedElts = OriginalDemandedElts;
 2094   KnownUndef = KnownZero = APInt::getNullValue(NumElts);
 2143     APInt SrcZero, SrcUndef;
 2144     APInt SrcDemandedElts = APInt::getNullValue(NumSrcElts);
 2144     APInt SrcDemandedElts = APInt::getNullValue(NumSrcElts);
 2163         APInt SrcDemandedBits = APInt::getNullValue(SrcEltSizeInBits);
 2163         APInt SrcDemandedBits = APInt::getNullValue(SrcEltSizeInBits);
 2249       APInt SubElts = DemandedElts.extractBits(NumSubElts, i * NumSubElts);
 2250       APInt SubUndef, SubZero;
 2266     const APInt &Idx = Op.getConstantOperandAPInt(2);
 2270     APInt SubElts = DemandedElts.extractBits(NumSubElts, SubIdx);
 2271     APInt SubUndef, SubZero;
 2275     APInt BaseElts = DemandedElts;
 2276     BaseElts.insertBits(APInt::getNullValue(NumSubElts), SubIdx);
 2300       APInt SrcElts = DemandedElts.zextOrSelf(NumSrcElts).shl(Idx);
 2301       APInt SrcUndef, SrcZero;
 2322       APInt DemandedVecElts(DemandedElts);
 2338     APInt VecUndef, VecZero;
 2352     APInt UnusedUndef, UnusedZero;
 2358     APInt DemandedLHS(DemandedElts);
 2359     APInt DemandedRHS(DemandedElts);
 2360     APInt UndefLHS, ZeroLHS;
 2361     APInt UndefRHS, ZeroRHS;
 2377     APInt DemandedLHS(NumElts, 0);
 2378     APInt DemandedRHS(NumElts, 0);
 2391     APInt UndefLHS, ZeroLHS;
 2392     APInt UndefRHS, ZeroRHS;
 2449     APInt SrcUndef, SrcZero;
 2452     APInt DemandedSrcElts = DemandedElts.zextOrSelf(NumSrcElts);
 2486     APInt UndefRHS, ZeroRHS;
 2490     APInt UndefLHS, ZeroLHS;
 2504     APInt UndefRHS, ZeroRHS;
 2508     APInt UndefLHS, ZeroLHS;
 2519     APInt SrcUndef, SrcZero;
 2557       APInt DemandedBits = APInt::getAllOnesValue(EltSizeInBits);
 2557       APInt DemandedBits = APInt::getAllOnesValue(EltSizeInBits);
 2579                                                    const APInt &DemandedElts,
 2593     const APInt &DemandedElts, const MachineRegisterInfo &MRI,
 2600                                                    const APInt &DemandedElts,
 2614                                                          const APInt &,
 2627     SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero,
 2627     SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero,
 2627     SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero,
 2639     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 2639     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 2652     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 2652     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 2705   APInt CVal;
 2869   APInt I1 = C1->getAPIntValue();
 2887   APInt I01 = C01->getAPIntValue();
 3081     const APInt &C1 = N1C->getAPIntValue();
 3089       const APInt &ShAmt = N0.getConstantOperandAPInt(1);
 3245       APInt bestMask;
 3254         const APInt &Mask = N0.getConstantOperandAPInt(1);
 3256           APInt newMask = APInt::getLowBitsSet(maskWidth, width);
 3256           APInt newMask = APInt::getLowBitsSet(maskWidth, width);
 3299       if (C1.intersects(APInt::getHighBitsSet(C1.getBitWidth(),
 3365         APInt Imm = APInt::getLowBitsSet(ExtDstTyBits, ExtSrcTyBits);
 3365         APInt Imm = APInt::getLowBitsSet(ExtDstTyBits, ExtSrcTyBits);
 3373                           DAG.getConstant(C1 & APInt::getLowBitsSet(
 3408                                   APInt::getHighBitsSet(BitWidth,
 3487     const APInt &C1 = N1C->getAPIntValue();
 3489     APInt MinVal, MaxVal;
 3492       MinVal = APInt::getSignedMinValue(OperandBitSize);
 3493       MaxVal = APInt::getSignedMaxValue(OperandBitSize);
 3495       MinVal = APInt::getMinValue(OperandBitSize);
 3496       MaxVal = APInt::getMaxValue(OperandBitSize);
 3507         APInt C = C1 - 1;
 3527         APInt C = C1 + 1;
 3590           C1 == APInt::getSignedMaxValue(OperandBitSize))
 3597           C1 == APInt::getSignedMinValue(OperandBitSize)) {
 3599             DAG.getConstant(APInt::getAllOnesValue(OperandBitSize), dl,
 3610     const APInt &C1 = N1C->getAPIntValue();
 3649           const APInt &AndRHSC = AndRHS->getAPIntValue();
 3671         APInt NewC = C1;
 4578     APInt Divisor = C->getAPIntValue();
 4585     APInt t;
 4586     APInt Factor = Divisor;
 4621 SDValue TargetLowering::BuildSDIVPow2(SDNode *N, const APInt &Divisor,
 4660     const APInt &Divisor = C->getAPIntValue();
 4661     APInt::ms magics = Divisor.magic();
 4767     APInt Divisor = C->getAPIntValue();
 4768     APInt::mu magics = Divisor.magicu();
 4780     APInt Magic = magics.m;
 4796         DAG.getConstant(SelNPQ ? APInt::getOneBitSet(EltBits, EltBits - 1)
 4797                                : APInt::getNullValue(EltBits),
 4962     const APInt &D = C->getAPIntValue();
 4970     APInt D0 = D.lshr(K);
 4981     APInt P = D0.zext(W + 1)
 4982                   .multiplicativeInverse(APInt::getSignedMinValue(W + 1))
 4988     APInt Q = APInt::getAllOnesValue(W).udiv(D);
 4988     APInt Q = APInt::getAllOnesValue(W).udiv(D);
 5140     APInt D = C->getAPIntValue();
 5153     APInt D0 = D.lshr(K);
 5168     APInt P = D0.zext(W + 1)
 5169                   .multiplicativeInverse(APInt::getSignedMinValue(W + 1))
 5175     APInt A = APInt::getSignedMaxValue(W).udiv(D0);
 5175     APInt A = APInt::getSignedMaxValue(W).udiv(D0);
 5185     APInt Q = (2 * A).udiv(APInt::getOneBitSet(W, K));
 5185     APInt Q = (2 * A).udiv(APInt::getOneBitSet(W, K));
 5305       APInt::getSignedMinValue(SVT.getScalarSizeInBits()), DL, VT);
 5307       APInt::getSignedMaxValue(SVT.getScalarSizeInBits()), DL, VT);
 5309       DAG.getConstant(APInt::getNullValue(SVT.getScalarSizeInBits()), DL, VT);
 5643   APInt HighMask = APInt::getHighBitsSet(OuterBitSize, InnerBitSize);
 5643   APInt HighMask = APInt::getHighBitsSet(OuterBitSize, InnerBitSize);
 5672   if (APInt::getMaxValue(ShiftAmountTy.getSizeInBits()).ult(ShiftAmount)) {
 5907   SDValue SignMask = DAG.getConstant(APInt::getSignMask(SrcEltBits), dl, IntVT);
 5972   APFloat APF(APFSem, APInt::getNullValue(SrcVT.getScalarSizeInBits()));
 5973   APInt SignMask = APInt::getSignMask(DstVT.getScalarSizeInBits());
 5973   APInt SignMask = APInt::getSignMask(DstVT.getScalarSizeInBits());
 6183       DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x55)), dl, VT);
 6185       DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x33)), dl, VT);
 6187       DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x0F)), dl, VT);
 6189       DAG.getConstant(APInt::getSplat(Len, APInt(8, 0x01)), dl, VT);
 6783     APInt Imm = APInt::getLowBitsSet(IdxVT.getSizeInBits(),
 6783     APInt Imm = APInt::getLowBitsSet(IdxVT.getSizeInBits(),
 6952     APInt MinVal = APInt::getSignedMinValue(BitWidth);
 6952     APInt MinVal = APInt::getSignedMinValue(BitWidth);
 6953     APInt MaxVal = APInt::getSignedMaxValue(BitWidth);
 6953     APInt MaxVal = APInt::getSignedMaxValue(BitWidth);
 6994       APInt MinVal = APInt::getSignedMinValue(VTSize);
 6994       APInt MinVal = APInt::getSignedMinValue(VTSize);
 6995       APInt MaxVal = APInt::getSignedMaxValue(VTSize);
 6995       APInt MaxVal = APInt::getSignedMaxValue(VTSize);
 7007       APInt MaxVal = APInt::getMaxValue(VTSize);
 7007       APInt MaxVal = APInt::getMaxValue(VTSize);
 7057     APInt MaxVal = APInt::getMaxValue(VTSize);
 7057     APInt MaxVal = APInt::getMaxValue(VTSize);
 7058     SDValue LowMask = DAG.getConstant(APInt::getLowBitsSet(VTSize, Scale),
 7070   SDValue SatMin = DAG.getConstant(APInt::getSignedMinValue(VTSize), dl, VT);
 7071   SDValue SatMax = DAG.getConstant(APInt::getSignedMaxValue(VTSize), dl, VT);
 7090   SDValue LowMask = DAG.getConstant(APInt::getLowBitsSet(VTSize, Scale - 1),
 7096       DAG.getConstant(APInt::getHighBitsSet(VTSize, VTSize - Scale + 1),
 7182     const APInt &C = RHSC->getAPIntValue();
lib/CodeGen/SwitchLoweringUtils.cpp
   23   const APInt &LowCase = Clusters[First].Low->getValue();
   24   const APInt &HighCase = Clusters[Last].High->getValue();
   70     const APInt &Hi = Clusters[i].High->getValue();
   71     const APInt &Lo = Clusters[i].Low->getValue();
  204     const APInt &Low = Clusters[I].Low->getValue();
  205     const APInt &High = Clusters[I].High->getValue();
  209       const APInt &PreviousHigh = Clusters[I - 1].High->getValue();
  376   APInt Low = Clusters[First].Low->getValue();
  377   APInt High = Clusters[Last].High->getValue();
  383   APInt LowBound;
  384   APInt CmpRange;
  403     LowBound = APInt::getNullValue(Low.getBitWidth());
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
 1599 static std::string APIntToHexString(const APInt &AI) {
 1613     return APIntToHexString(APInt::getNullValue(Ty->getPrimitiveSizeInBits()));
lib/ExecutionEngine/ExecutionEngine.cpp
  649       APInt Offset(DL.getPointerSizeInBits(), 0);
  766           GV.IntVal = APInt::floatToBits(GV.FloatVal);
  770           GV.IntVal = APInt::doubleToBits(GV.DoubleVal);
lib/ExecutionEngine/Interpreter/Execution.cpp
 1179                                llvm::APInt valueToShift) {
 1202       llvm::APInt valueToShift = Src1.AggregateVal[i].IntVal;
 1209     llvm::APInt valueToShift = Src1.IntVal;
 1229       llvm::APInt valueToShift = Src1.AggregateVal[i].IntVal;
 1236     llvm::APInt valueToShift = Src1.IntVal;
 1256       llvm::APInt valueToShift = Src1.AggregateVal[i].IntVal;
 1263     llvm::APInt valueToShift = Src1.IntVal;
 1592             APInt::floatToBits(SrcVec.AggregateVal[i].FloatVal);
 1597             APInt::doubleToBits(SrcVec.AggregateVal[i].DoubleVal);
 1617           APInt Tmp;
 1679         Dest.IntVal = APInt::floatToBits(Src.FloatVal);
 1681         Dest.IntVal = APInt::doubleToBits(Src.DoubleVal);
lib/FuzzMutate/OpDescriptor.cpp
   18     Cs.push_back(ConstantInt::get(IntTy, APInt::getMaxValue(W)));
   19     Cs.push_back(ConstantInt::get(IntTy, APInt::getMinValue(W)));
   20     Cs.push_back(ConstantInt::get(IntTy, APInt::getSignedMaxValue(W)));
   21     Cs.push_back(ConstantInt::get(IntTy, APInt::getSignedMinValue(W)));
   22     Cs.push_back(ConstantInt::get(IntTy, APInt::getOneBitSet(W, W / 2)));
lib/IR/AsmWriter.cpp
 1352     APInt API = APF.bitcastToAPInt();
lib/IR/ConstantFold.cpp
  224     APInt V = CI->getValue();
  271     APInt ShAmt = Amt->getValue();
  294     APInt ShAmt = Amt->getValue();
  684       const APInt &api = CI->getValue();
  686                   APInt::getNullValue(DestTy->getPrimitiveSizeInBits()));
 1013       const APInt *CV;
 1138           APInt PossiblySetBits(APInt::getLowBitsSet(DstWidth, SrcWidth));
 1138           APInt PossiblySetBits(APInt::getLowBitsSet(DstWidth, SrcWidth));
 1175             APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
 1175             APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
 1221       const APInt &C1V = CI1->getValue();
 1222       const APInt &C2V = CI2->getValue();
 1862     const APInt &V1 = cast<ConstantInt>(C1)->getValue();
 1863     const APInt &V2 = cast<ConstantInt>(C2)->getValue();
lib/IR/ConstantRange.cpp
   43     : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)),
   43     : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)),
   46 ConstantRange::ConstantRange(APInt V)
   49 ConstantRange::ConstantRange(APInt L, APInt U)
   49 ConstantRange::ConstantRange(APInt L, APInt U)
   71   APInt Lower = Known.One, Upper = ~Known.Zero;
   93     APInt UMax(CR.getUnsignedMax());
   96     return ConstantRange(APInt::getMinValue(W), std::move(UMax));
   99     APInt SMax(CR.getSignedMax());
  102     return ConstantRange(APInt::getSignedMinValue(W), std::move(SMax));
  105     return getNonEmpty(APInt::getMinValue(W), CR.getUnsignedMax() + 1);
  107     return getNonEmpty(APInt::getSignedMinValue(W), CR.getSignedMax() + 1);
  109     APInt UMin(CR.getUnsignedMin());
  112     return ConstantRange(std::move(UMin) + 1, APInt::getNullValue(W));
  115     APInt SMin(CR.getSignedMin());
  118     return ConstantRange(std::move(SMin) + 1, APInt::getSignedMinValue(W));
  121     return getNonEmpty(CR.getUnsignedMin(), APInt::getNullValue(W));
  123     return getNonEmpty(CR.getSignedMin(), APInt::getSignedMinValue(W));
  138                                                  const APInt &C) {
  150                                       APInt &RHS) const {
  184 static ConstantRange makeExactMulNUWRegion(const APInt &V) {
  190       APIntOps::RoundingUDiv(APInt::getMinValue(BitWidth), V,
  191                              APInt::Rounding::UP),
  192       APIntOps::RoundingUDiv(APInt::getMaxValue(BitWidth), V,
  193                              APInt::Rounding::DOWN) + 1);
  197 static ConstantRange makeExactMulNSWRegion(const APInt &V) {
  204   APInt MinValue = APInt::getSignedMinValue(BitWidth);
  204   APInt MinValue = APInt::getSignedMinValue(BitWidth);
  205   APInt MaxValue = APInt::getSignedMaxValue(BitWidth);
  205   APInt MaxValue = APInt::getSignedMaxValue(BitWidth);
  210   APInt Lower, Upper;
  212     Lower = APIntOps::RoundingSDiv(MaxValue, V, APInt::Rounding::UP);
  213     Upper = APIntOps::RoundingSDiv(MinValue, V, APInt::Rounding::DOWN);
  215     Lower = APIntOps::RoundingSDiv(MinValue, V, APInt::Rounding::UP);
  216     Upper = APIntOps::RoundingSDiv(MaxValue, V, APInt::Rounding::DOWN);
  245       return getNonEmpty(APInt::getNullValue(BitWidth),
  248     APInt SignedMinVal = APInt::getSignedMinValue(BitWidth);
  248     APInt SignedMinVal = APInt::getSignedMinValue(BitWidth);
  249     APInt SMin = Other.getSignedMin(), SMax = Other.getSignedMax();
  257       return getNonEmpty(Other.getUnsignedMax(), APInt::getMinValue(BitWidth));
  259     APInt SignedMinVal = APInt::getSignedMinValue(BitWidth);
  259     APInt SignedMinVal = APInt::getSignedMinValue(BitWidth);
  260     APInt SMin = Other.getSignedMin(), SMax = Other.getSignedMax();
  286     APInt ShAmtUMax = ShAmt.getUnsignedMax();
  288       return getNonEmpty(APInt::getNullValue(BitWidth),
  289                          APInt::getMaxValue(BitWidth).lshr(ShAmtUMax) + 1);
  290     return getNonEmpty(APInt::getSignedMinValue(BitWidth).ashr(ShAmtUMax),
  291                        APInt::getSignedMaxValue(BitWidth).ashr(ShAmtUMax) + 1);
  297                                                    const APInt &Other,
  344     return APInt::getMaxValue(getBitWidth()).ugt(MaxSize - 1);
  364 APInt ConstantRange::getUnsignedMax() const {
  366     return APInt::getMaxValue(getBitWidth());
  370 APInt ConstantRange::getUnsignedMin() const {
  372     return APInt::getMinValue(getBitWidth());
  376 APInt ConstantRange::getSignedMax() const {
  378     return APInt::getSignedMaxValue(getBitWidth());
  382 APInt ConstantRange::getSignedMin() const {
  384     return APInt::getSignedMinValue(getBitWidth());
  388 bool ConstantRange::contains(const APInt &V) const {
  415 ConstantRange ConstantRange::subtract(const APInt &Val) const {
  574     APInt L = CR.Lower.ult(Lower) ? CR.Lower : Lower;
  575     APInt U = (CR.Upper - 1).ugt(Upper - 1) ? CR.Upper : Upper;
  620   APInt L = CR.Lower.ult(Lower) ? CR.Lower : Lower;
  621   APInt U = CR.Upper.ugt(Upper) ? CR.Upper : Upper;
  648     APInt Min = APInt::getMinValue(BW).zextOrSelf(ResultBitWidth);
  648     APInt Min = APInt::getMinValue(BW).zextOrSelf(ResultBitWidth);
  649     APInt Max = APInt::getMaxValue(BW).zextOrSelf(ResultBitWidth);
  649     APInt Max = APInt::getMaxValue(BW).zextOrSelf(ResultBitWidth);
  655     APInt SMin = APInt::getSignedMinValue(BW).sextOrSelf(ResultBitWidth);
  655     APInt SMin = APInt::getSignedMinValue(BW).sextOrSelf(ResultBitWidth);
  656     APInt SMax = APInt::getSignedMaxValue(BW).sextOrSelf(ResultBitWidth);
  656     APInt SMax = APInt::getSignedMaxValue(BW).sextOrSelf(ResultBitWidth);
  676     APInt LowerExt(DstTySize, 0);
  680                          APInt::getOneBitSet(DstTySize, SrcTySize));
  697     return ConstantRange(APInt::getHighBitsSet(DstTySize,DstTySize-SrcTySize+1),
  698                          APInt::getLowBitsSet(DstTySize, SrcTySize-1) + 1);
  711   APInt LowerDiv(Lower), UpperDiv(Upper);
  724     Union = ConstantRange(APInt::getMaxValue(DstTySize),Upper.trunc(DstTySize));
  736     APInt Adjust = LowerDiv & APInt::getBitsSetFrom(getBitWidth(), DstTySize);
  736     APInt Adjust = LowerDiv & APInt::getBitsSetFrom(getBitWidth(), DstTySize);
  841   APInt NewLower = getLower() + Other.getLower();
  842   APInt NewUpper = getUpper() + Other.getUpper() - 1;
  868     APInt LMin = getUnsignedMin(), LMax = getUnsignedMax();
  869     APInt RMin = Other.getUnsignedMin(), RMax = Other.getUnsignedMax();
  871     APInt NewMin = LMin.uadd_ov(RMin, Overflow);
  874     APInt NewMax = LMax.uadd_sat(RMax);
  879     APInt LMin = getSignedMin(), LMax = getSignedMax();
  880     APInt RMin = Other.getSignedMin(), RMax = Other.getSignedMax();
  883       APInt Temp = LMin.sadd_ov(RMin, Overflow);
  889       APInt Temp = LMax.sadd_ov(RMax, Overflow);
  893     APInt NewMin = LMin.sadd_sat(RMin);
  894     APInt NewMax = LMax.sadd_sat(RMax);
  912   APInt NewLower = getLower() - Other.getUpper() + 1;
  913   APInt NewUpper = getUpper() - Other.getLower();
  942   APInt this_min = getUnsignedMin().zext(getBitWidth() * 2);
  943   APInt this_max = getUnsignedMax().zext(getBitWidth() * 2);
  944   APInt Other_min = Other.getUnsignedMin().zext(getBitWidth() * 2);
  945   APInt Other_max = Other.getUnsignedMax().zext(getBitWidth() * 2);
  985   APInt NewL = APIntOps::smax(getSignedMin(), Other.getSignedMin());
  986   APInt NewU = APIntOps::smax(getSignedMax(), Other.getSignedMax()) + 1;
  996   APInt NewL = APIntOps::umax(getUnsignedMin(), Other.getUnsignedMin());
  997   APInt NewU = APIntOps::umax(getUnsignedMax(), Other.getUnsignedMax()) + 1;
 1007   APInt NewL = APIntOps::smin(getSignedMin(), Other.getSignedMin());
 1008   APInt NewU = APIntOps::smin(getSignedMax(), Other.getSignedMax()) + 1;
 1018   APInt NewL = APIntOps::umin(getUnsignedMin(), Other.getUnsignedMin());
 1019   APInt NewU = APIntOps::umin(getUnsignedMax(), Other.getUnsignedMax()) + 1;
 1028   APInt Lower = getUnsignedMin().udiv(RHS.getUnsignedMax());
 1030   APInt RHS_umin = RHS.getUnsignedMin();
 1040   APInt Upper = getUnsignedMax().udiv(RHS_umin) + 1;
 1048   APInt Zero = APInt::getNullValue(getBitWidth());
 1048   APInt Zero = APInt::getNullValue(getBitWidth());
 1049   APInt SignedMin = APInt::getSignedMinValue(getBitWidth());
 1049   APInt SignedMin = APInt::getSignedMinValue(getBitWidth());
 1070     APInt Lo = (NegL.Upper - 1).sdiv(NegR.Lower);
 1075         APInt AdjNegRUpper;
 1090         APInt AdjNegLLower;
 1138   APInt Upper = APIntOps::umin(getUnsignedMax(), RHS.getUnsignedMax() - 1) + 1;
 1139   return getNonEmpty(APInt::getNullValue(getBitWidth()), std::move(Upper));
 1147   APInt MinAbsRHS = AbsRHS.getUnsignedMin();
 1148   APInt MaxAbsRHS = AbsRHS.getUnsignedMax();
 1157   APInt MinLHS = getSignedMin(), MaxLHS = getSignedMax();
 1165     APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1;
 1166     return ConstantRange(APInt::getNullValue(getBitWidth()), std::move(Upper));
 1174     APInt Lower = APIntOps::umax(MinLHS, -MaxAbsRHS + 1);
 1179   APInt Lower = APIntOps::umax(MinLHS, -MaxAbsRHS + 1);
 1180   APInt Upper = APIntOps::umin(MaxLHS, MaxAbsRHS - 1) + 1;
 1191   APInt umin = APIntOps::umin(Other.getUnsignedMax(), getUnsignedMax());
 1192   return getNonEmpty(APInt::getNullValue(getBitWidth()), std::move(umin) + 1);
 1202   APInt umax = APIntOps::umax(getUnsignedMin(), Other.getUnsignedMin());
 1203   return getNonEmpty(std::move(umax), APInt::getNullValue(getBitWidth()));
 1211   APInt max = getUnsignedMax();
 1212   APInt Other_umax = Other.getUnsignedMax();
 1224   APInt min = getUnsignedMin();
 1236   APInt max = getUnsignedMax().lshr(Other.getUnsignedMin()) + 1;
 1237   APInt min = getUnsignedMin().lshr(Other.getUnsignedMax());
 1252   APInt PosMax = getSignedMax().ashr(Other.getUnsignedMin()) + 1;
 1259   APInt PosMin = getSignedMin().ashr(Other.getUnsignedMax());
 1266   APInt NegMax = getSignedMax().ashr(Other.getUnsignedMax()) + 1;
 1273   APInt NegMin = getSignedMin().ashr(Other.getUnsignedMin());
 1275   APInt max, min;
 1296   APInt NewL = getUnsignedMin().uadd_sat(Other.getUnsignedMin());
 1297   APInt NewU = getUnsignedMax().uadd_sat(Other.getUnsignedMax()) + 1;
 1305   APInt NewL = getSignedMin().sadd_sat(Other.getSignedMin());
 1306   APInt NewU = getSignedMax().sadd_sat(Other.getSignedMax()) + 1;
 1314   APInt NewL = getUnsignedMin().usub_sat(Other.getUnsignedMax());
 1315   APInt NewU = getUnsignedMax().usub_sat(Other.getUnsignedMin()) + 1;
 1323   APInt NewL = getSignedMin().ssub_sat(Other.getSignedMax());
 1324   APInt NewU = getSignedMax().ssub_sat(Other.getSignedMin()) + 1;
 1341     APInt Lo;
 1344       Lo = APInt::getNullValue(getBitWidth());
 1349     return ConstantRange(Lo, APInt::getSignedMinValue(getBitWidth()) + 1);
 1352   APInt SMin = getSignedMin(), SMax = getSignedMax();
 1363   return ConstantRange(APInt::getNullValue(getBitWidth()),
 1372   APInt Min = getUnsignedMin(), Max = getUnsignedMax();
 1373   APInt OtherMin = Other.getUnsignedMin(), OtherMax = Other.getUnsignedMax();
 1388   APInt Min = getSignedMin(), Max = getSignedMax();
 1389   APInt OtherMin = Other.getSignedMin(), OtherMax = Other.getSignedMax();
 1391   APInt SignedMin = APInt::getSignedMinValue(getBitWidth());
 1391   APInt SignedMin = APInt::getSignedMinValue(getBitWidth());
 1392   APInt SignedMax = APInt::getSignedMaxValue(getBitWidth());
 1392   APInt SignedMax = APInt::getSignedMaxValue(getBitWidth());
 1418   APInt Min = getUnsignedMin(), Max = getUnsignedMax();
 1419   APInt OtherMin = Other.getUnsignedMin(), OtherMax = Other.getUnsignedMax();
 1434   APInt Min = getSignedMin(), Max = getSignedMax();
 1435   APInt OtherMin = Other.getSignedMin(), OtherMax = Other.getSignedMax();
 1437   APInt SignedMin = APInt::getSignedMinValue(getBitWidth());
 1437   APInt SignedMin = APInt::getSignedMinValue(getBitWidth());
 1438   APInt SignedMax = APInt::getSignedMaxValue(getBitWidth());
 1438   APInt SignedMax = APInt::getSignedMaxValue(getBitWidth());
 1464   APInt Min = getUnsignedMin(), Max = getUnsignedMax();
 1465   APInt OtherMin = Other.getUnsignedMin(), OtherMax = Other.getUnsignedMax();
lib/IR/Constants.cpp
  311                                    APInt::getNullValue(128)));
  326 Constant *Constant::getIntegerValue(Type *Ty, const APInt &V) {
  346                             APInt::getAllOnesValue(ITy->getBitWidth()));
  604 ConstantInt::ConstantInt(IntegerType *Ty, const APInt &V)
  640 ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
  675 Constant *ConstantInt::get(Type *Ty, const APInt& V) {
  768 Constant *ConstantFP::getQNaN(Type *Ty, bool Negative, APInt *Payload) {
  779 Constant *ConstantFP::getSNaN(Type *Ty, bool Negative, APInt *Payload) {
 1420 const APInt &Constant::getUniqueInteger() const {
 2712 APInt ConstantDataSequential::getElementAsAPInt(unsigned Elt) const {
lib/IR/Instructions.cpp
  488   APInt APS(128, S), APT(128, T);
  492     APInt Val(128, mdconst::dyn_extract<ConstantInt>(ProfileData->getOperand(1))
  503       APInt Val(128,
 1695                                                  APInt &Offset) const {
lib/IR/LLVMContextImpl.h
   63   static inline APInt getEmptyKey() {
   64     APInt V(nullptr, 0);
   69   static inline APInt getTombstoneKey() {
   70     APInt V(nullptr, 0);
   75   static unsigned getHashValue(const APInt &Key) {
   79   static bool isEqual(const APInt &LHS, const APInt &RHS) {
   79   static bool isEqual(const APInt &LHS, const APInt &RHS) {
 1261       DenseMap<APInt, std::unique_ptr<ConstantInt>, DenseMapAPIntKeyInfo>;
lib/IR/MDBuilder.cpp
   84 MDNode *MDBuilder::createRange(const APInt &Lo, const APInt &Hi) {
   84 MDNode *MDBuilder::createRange(const APInt &Lo, const APInt &Hi) {
lib/IR/Metadata.cpp
  952   APInt LB = EndPoints[Size - 2]->getValue();
  953   APInt LE = EndPoints[Size - 1]->getValue();
lib/IR/Operator.cpp
   35                                            APInt &Offset) const {
   57     APInt Index = OpC->getValue().sextOrTrunc(Offset.getBitWidth());
lib/IR/Type.cpp
  273 APInt IntegerType::getMask() const {
  274   return APInt::getAllOnesValue(getBitWidth());
lib/IR/Value.cpp
  550 Value::stripAndAccumulateConstantOffsets(const DataLayout &DL, APInt &Offset,
  576       APInt GEPOffset(DL.getIndexTypeSizeInBits(V->getType()), 0);
lib/IR/Verifier.cpp
  187   void Write(const APInt *AI) {
 3341     APInt HighV = High->getValue();
 3342     APInt LowV = Low->getValue();
 3357     APInt FirstLow =
 3359     APInt FirstHigh =
 4373     const APInt &ElementSizeVal = ElementSizeCI->getValue();
 5268   Optional<APInt> PrevOffset;
 5377                                                    APInt &Offset,
 5489   APInt Offset = OffsetCI->getValue();
lib/MC/MCInstrAnalysis.cpp
   21                                            APInt &Writes) const {
lib/MC/MCParser/AsmLexer.cpp
  272 static AsmToken intToken(StringRef Ref, APInt &Value)
  310       APInt Value(128, 0, true);
  339     APInt Value(128, 0, true);
  373     APInt Value(128, 0, true);
  399     APInt Result(128, 0);
  415   APInt Value(128, 0, true);
lib/MC/MCParser/AsmParser.cpp
  260   bool parseRealValue(const fltSemantics &Semantics, APInt &Res);
 3076   APInt IntValue = Asm.getTok().getAPIntVal();
 3115 bool AsmParser::parseRealValue(const fltSemantics &Semantics, APInt &Res) {
 3160     APInt AsInt;
 4792   APInt AsInt;
lib/MCA/InstrBuilder.cpp
   61   APInt Buffers(NumProcResources, 0);
  618   APInt Mask;
  681   APInt WriteMask(D.Writes.size(), 0);
lib/Passes/PassBuilder.cpp
 1542       APInt BonusInstThreshold;
lib/ProfileData/ProfileSummaryBuilder.cpp
   74     APInt Temp(128, TotalCount);
   75     APInt N(128, Cutoff);
   76     APInt D(128, ProfileSummary::Scale);
lib/Support/APFloat.cpp
  463   lsb = APInt::tcLSB(parts, partCount);
  471       APInt::tcExtractBit(parts, bits - 1))
  485   APInt::tcShiftRight(dst, parts, bits);
  599       APInt::tcFullMultiply(pow5, pow5 - pc, pow5 - pc, pc, pc);
  609       APInt::tcFullMultiply(p2, p1, pow5, result, pc);
  625     APInt::tcAssign(dst, p1, result);
  720   APInt::tcAssign(significandParts(), rhs.significandParts(),
  727 void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) {
  736     APInt::tcSet(significand, 0, numParts);
  738     APInt::tcAssign(significand, fill->getRawData(),
  754     APInt::tcClearBit(significand, QNaNBit);
  759     if (APInt::tcIsZero(significand, numParts))
  760       APInt::tcSetBit(significand, QNaNBit - 1);
  763     APInt::tcSetBit(significand, QNaNBit);
  770     APInt::tcSetBit(significand, QNaNBit + 1);
  800          (APInt::tcExtractBit(significandParts(),
  936   APInt::tcSet(significandParts(), 0, partCount());
  943   carry = APInt::tcIncrement(significandParts(), partCount());
  959   return APInt::tcAdd(parts, rhs.significandParts(), 0, partCount());
  973   return APInt::tcSubtract(parts, rhs.significandParts(), borrow,
 1006   APInt::tcFullMultiply(fullSignificand, lhsSignificand,
 1010   omsb = APInt::tcMSB(fullSignificand, newPartsCount) + 1;
 1039       APInt::tcShiftLeft(fullSignificand, newPartsCount,
 1074     omsb = APInt::tcMSB(fullSignificand, newPartsCount) + 1;
 1101   APInt::tcAssign(lhsSignificand, fullSignificand, partsCount);
 1142   bit = precision - APInt::tcMSB(divisor, partsCount) - 1;
 1145     APInt::tcShiftLeft(divisor, partsCount, bit);
 1149   bit = precision - APInt::tcMSB(dividend, partsCount) - 1;
 1152     APInt::tcShiftLeft(dividend, partsCount, bit);
 1158   if (APInt::tcCompare(dividend, divisor, partsCount) < 0) {
 1160     APInt::tcShiftLeft(dividend, partsCount, 1);
 1166     if (APInt::tcCompare(dividend, divisor, partsCount) >= 0) {
 1167       APInt::tcSubtract(dividend, divisor, 0, partsCount);
 1168       APInt::tcSetBit(lhsSignificand, bit - 1);
 1171     APInt::tcShiftLeft(dividend, partsCount, 1);
 1175   int cmp = APInt::tcCompare(dividend, divisor, partsCount);
 1181   else if (APInt::tcIsZero(dividend, partsCount))
 1193   return APInt::tcMSB(significandParts(), partCount());
 1197   return APInt::tcLSB(significandParts(), partCount());
 1217     APInt::tcShiftLeft(significandParts(), partsCount, bits);
 1237     compare = APInt::tcCompare(significandParts(), rhs.significandParts(),
 1263   APInt::tcSetLeastSignificantBits(significandParts(), partCount(),
 1293       return APInt::tcExtractBit(significandParts(), bit);
 1861   APInt IntegerConstant(NextPowerOf2(semanticsPrecision(*semantics)), 1);
 2016     APInt::tcSet(newParts, 0, newPartCount);
 2018       APInt::tcAssign(newParts, significandParts(), oldPartCount);
 2036     APInt::tcShiftLeft(significandParts(), newPartCount, shift);
 2047       APInt::tcSetBit(significandParts(), semantics->precision - 1);
 2089     APInt::tcSet(parts.data(), 0, dstPartsCount);
 2101     APInt::tcSet(parts.data(), 0, dstPartsCount);
 2117       APInt::tcExtract(parts.data(), dstPartsCount, src, bits, truncatedBits);
 2120       APInt::tcExtract(parts.data(), dstPartsCount, src, semantics->precision,
 2122       APInt::tcShiftLeft(parts.data(), dstPartsCount,
 2135       if (APInt::tcIncrement(parts.data(), dstPartsCount))
 2143   unsigned int omsb = APInt::tcMSB(parts.data(), dstPartsCount) + 1;
 2155           APInt::tcLSB(parts.data(), dstPartsCount) + 1 != omsb)
 2163     APInt::tcNegate (parts.data(), dstPartsCount);
 2207     APInt::tcSetLeastSignificantBits(parts.data(), dstPartsCount, bits);
 2209       APInt::tcShiftLeft(parts.data(), dstPartsCount, width - 1);
 2225   omsb = APInt::tcMSB(src, srcCount) + 1;
 2236     APInt::tcExtract(dst, dstCount, src, precision, omsb - precision);
 2240     APInt::tcExtract(dst, dstCount, src, omsb, 0);
 2246 IEEEFloat::opStatus IEEEFloat::convertFromAPInt(const APInt &Val, bool isSigned,
 2249   APInt api = Val;
 2270       APInt::tcExtractBit(src, srcCount * integerPartWidth - 1)) {
 2276     APInt::tcAssign(copy, src, srcCount);
 2277     APInt::tcNegate(copy, srcCount);
 2294   APInt api = APInt(width, makeArrayRef(parts, partCount));
 2297   if (isSigned && APInt::tcExtractBit(parts, width - 1)) {
 2454       APInt::tcExtract(significandParts(), partCount(), decSig.significandParts(),
 2568       APInt::tcMultiplyPart(decSignificand, decSignificand, multiplier, val,
 2835 APInt IEEEFloat::convertF80LongDoubleAPFloatToAPInt() const {
 2865 APInt IEEEFloat::convertPPCDoubleDoubleAPFloatToAPInt() const {
 2914 APInt IEEEFloat::convertQuadrupleAPFloatToAPInt() const {
 2948 APInt IEEEFloat::convertDoubleAPFloatToAPInt() const {
 2976 APInt IEEEFloat::convertFloatAPFloatToAPInt() const {
 3003 APInt IEEEFloat::convertHalfAPFloatToAPInt() const {
 3034 APInt IEEEFloat::bitcastToAPInt() const {
 3058   APInt api = bitcastToAPInt();
 3065   APInt api = bitcastToAPInt();
 3076 void IEEEFloat::initFromF80LongDoubleAPInt(const APInt &api) {
 3110 void IEEEFloat::initFromPPCDoubleDoubleAPInt(const APInt &api) {
 3134 void IEEEFloat::initFromQuadrupleAPInt(const APInt &api) {
 3172 void IEEEFloat::initFromDoubleAPInt(const APInt &api) {
 3203 void IEEEFloat::initFromFloatAPInt(const APInt &api) {
 3234 void IEEEFloat::initFromHalfAPInt(const APInt &api) {
 3269 void IEEEFloat::initFromAPInt(const fltSemantics *Sem, const APInt &api) {
 3321   APInt::tcSet(significandParts(), 1, partCount());
 3338 IEEEFloat::IEEEFloat(const fltSemantics &Sem, const APInt &API) {
 3343   initFromAPInt(&semIEEEsingle, APInt::floatToBits(f));
 3347   initFromAPInt(&semIEEEdouble, APInt::doubleToBits(d));
 3357   void AdjustToPrecision(APInt &significand,
 3371     APInt divisor(significand.getBitWidth(), 1);
 3372     APInt powten(significand.getBitWidth(), 10);
 3471   APInt significand(semantics->precision,
 3518     APInt five_to_the_i(precision, 5);
 3534   APInt ten(precision, 10);
 3535   APInt digit(precision, 0);
 3541     APInt::udivrem(significand, ten, significand, digit);
 3685   return !APInt::tcExtractBit(significandParts(), semantics->precision - 2);
 3726       APInt::tcSet(significandParts(), 0, partCount());
 3734       APInt::tcSet(significandParts(), 0, partCount());
 3766       APInt::tcDecrement(Parts, partCount());
 3772         APInt::tcSetBit(Parts, semantics->precision - 1);
 3788         APInt::tcSet(Parts, 0, partCount());
 3789         APInt::tcSetBit(Parts, semantics->precision - 1);
 3812   APInt::tcSet(significandParts(), 0, partCount());
 3819   APInt::tcSet(significandParts(), 0, partCount());
 3824   APInt::tcSetBit(significandParts(), semantics->precision - 2);
 3904 DoubleAPFloat::DoubleAPFloat(const fltSemantics &S, const APInt &I)
 4285 void DoubleAPFloat::makeNaN(bool SNaN, bool Neg, const APInt *fill) {
 4309 APInt DoubleAPFloat::bitcastToAPInt() const {
 4344 APFloat::opStatus DoubleAPFloat::convertFromAPInt(const APInt &Input,
 4512       return APFloat(semIEEEhalf, APInt::getAllOnesValue(BitWidth));
 4514       return APFloat(semIEEEsingle, APInt::getAllOnesValue(BitWidth));
 4516       return APFloat(semIEEEdouble, APInt::getAllOnesValue(BitWidth));
 4518       return APFloat(semX87DoubleExtended, APInt::getAllOnesValue(BitWidth));
 4520       return APFloat(semIEEEquad, APInt::getAllOnesValue(BitWidth));
 4526     return APFloat(semPPCDoubleDouble, APInt::getAllOnesValue(BitWidth));
lib/Support/APInt.cpp
   86 void APInt::initSlowCase(const APInt& that) {
  143 void APInt::AssignSlowCase(const APInt& RHS) {
  173 APInt& APInt::operator++() {
  182 APInt& APInt::operator--() {
  193 APInt& APInt::operator+=(const APInt& RHS) {
  193 APInt& APInt::operator+=(const APInt& RHS) {
  202 APInt& APInt::operator+=(uint64_t RHS) {
  213 APInt& APInt::operator-=(const APInt& RHS) {
  213 APInt& APInt::operator-=(const APInt& RHS) {
  222 APInt& APInt::operator-=(uint64_t RHS) {
  230 APInt APInt::operator*(const APInt& RHS) const {
  230 APInt APInt::operator*(const APInt& RHS) const {
  235   APInt Result(getMemory(getNumWords()), getBitWidth());
  243 void APInt::AndAssignSlowCase(const APInt& RHS) {
  247 void APInt::OrAssignSlowCase(const APInt& RHS) {
  251 void APInt::XorAssignSlowCase(const APInt& RHS) {
  255 APInt& APInt::operator*=(const APInt& RHS) {
  255 APInt& APInt::operator*=(const APInt& RHS) {
  261 APInt& APInt::operator*=(uint64_t RHS) {
  271 bool APInt::EqualSlowCase(const APInt& RHS) const {
  275 int APInt::compare(const APInt& RHS) const {
  283 int APInt::compareSigned(const APInt& RHS) const {
  345 void APInt::insertBits(const APInt &subBits, unsigned bitPosition) {
  431 APInt APInt::extractBits(unsigned numBits, unsigned bitPosition) const {
  453   APInt Result(numBits, 0);
  534   APInt tmp(sufficient, StringRef(p, slen), radix);
  549 hash_code llvm::hash_value(const APInt &Arg) {
  565 APInt APInt::getHiBits(unsigned numBits) const {
  570 APInt APInt::getLoBits(unsigned numBits) const {
  571   APInt Result(getLowBitsSet(BitWidth, numBits));
  577 APInt APInt::getSplat(unsigned NewLen, const APInt &V) {
  577 APInt APInt::getSplat(unsigned NewLen, const APInt &V) {
  580   APInt Val = V.zextOrSelf(NewLen);
  656 bool APInt::intersectsSlowCase(const APInt &RHS) const {
  664 bool APInt::isSubsetOfSlowCase(const APInt &RHS) const {
  672 APInt APInt::byteSwap() const {
  688   APInt Result(getNumWords() * APINT_BITS_PER_WORD, 0);
  698 APInt APInt::reverseBits() const {
  712   APInt Val(*this);
  713   APInt Reversed(BitWidth, 0);
  726 APInt llvm::APIntOps::GreatestCommonDivisor(APInt A, APInt B) {
  726 APInt llvm::APIntOps::GreatestCommonDivisor(APInt A, APInt B) {
  726 APInt llvm::APIntOps::GreatestCommonDivisor(APInt A, APInt B) {
  769 APInt llvm::APIntOps::RoundDoubleToAPInt(double Double, unsigned width) {
  796   APInt Tmp(width, mantissa);
  824   APInt Tmp(isNeg ? -(*this) : (*this));
  865 APInt APInt::trunc(unsigned width) const {
  872   APInt Result(getMemory(getNumWords(width)), width);
  888 APInt APInt::sext(unsigned Width) const {
  894   APInt Result(getMemory(getNumWords(Width)), Width);
  912 APInt APInt::zext(unsigned width) const {
  918   APInt Result(getMemory(getNumWords(width)), width);
  930 APInt APInt::zextOrTrunc(unsigned width) const {
  938 APInt APInt::sextOrTrunc(unsigned width) const {
  946 APInt APInt::zextOrSelf(unsigned width) const {
  952 APInt APInt::sextOrSelf(unsigned width) const {
  960 void APInt::ashrInPlace(const APInt &shiftAmt) {
 1009 void APInt::lshrInPlace(const APInt &shiftAmt) {
 1021 APInt &APInt::operator<<=(const APInt &shiftAmt) {
 1021 APInt &APInt::operator<<=(const APInt &shiftAmt) {
 1033 static unsigned rotateModulo(unsigned BitWidth, const APInt &rotateAmt) {
 1035   APInt rot = rotateAmt;
 1045 APInt APInt::rotl(const APInt &rotateAmt) const {
 1045 APInt APInt::rotl(const APInt &rotateAmt) const {
 1049 APInt APInt::rotl(unsigned rotateAmt) const {
 1056 APInt APInt::rotr(const APInt &rotateAmt) const {
 1056 APInt APInt::rotr(const APInt &rotateAmt) const {
 1060 APInt APInt::rotr(unsigned rotateAmt) const {
 1074 APInt APInt::sqrt() const {
 1110   APInt testy(BitWidth, 16);
 1111   APInt x_old(BitWidth, 1);
 1112   APInt x_new(BitWidth, 0);
 1113   APInt two(BitWidth, 2);
 1136   APInt square(x_old * x_old);
 1137   APInt nextSquare((x_old + 1) * (x_old +1));
 1141   APInt midpoint((nextSquare - square).udiv(two));
 1142   APInt offset(*this - square);
 1155 APInt APInt::multiplicativeInverse(const APInt& modulo) const {
 1155 APInt APInt::multiplicativeInverse(const APInt& modulo) const {
 1166   APInt r[2] = { modulo, *this };
 1167   APInt t[2] = { APInt(BitWidth, 0), APInt(BitWidth, 1) };
 1168   APInt q(BitWidth, 0);
 1201 APInt::ms APInt::magic() const {
 1202   const APInt& d = *this;
 1204   APInt ad, anc, delta, q1, r1, q2, r2, t;
 1205   APInt signedMin = APInt::getSignedMinValue(d.getBitWidth());
 1205   APInt signedMin = APInt::getSignedMinValue(d.getBitWidth());
 1245 APInt::mu APInt::magicu(unsigned LeadingZeros) const {
 1246   const APInt& d = *this;
 1248   APInt nc, delta, q1, r1, q2, r2;
 1251   APInt allOnes = APInt::getAllOnesValue(d.getBitWidth()).lshr(LeadingZeros);
 1251   APInt allOnes = APInt::getAllOnesValue(d.getBitWidth()).lshr(LeadingZeros);
 1252   APInt signedMin = APInt::getSignedMinValue(d.getBitWidth());
 1252   APInt signedMin = APInt::getSignedMinValue(d.getBitWidth());
 1253   APInt signedMax = APInt::getSignedMaxValue(d.getBitWidth());
 1253   APInt signedMax = APInt::getSignedMaxValue(d.getBitWidth());
 1576 APInt APInt::udiv(const APInt &RHS) const {
 1576 APInt APInt::udiv(const APInt &RHS) const {
 1609   APInt Quotient(BitWidth, 0); // to hold result.
 1614 APInt APInt::udiv(uint64_t RHS) const {
 1642   APInt Quotient(BitWidth, 0); // to hold result.
 1647 APInt APInt::sdiv(const APInt &RHS) const {
 1647 APInt APInt::sdiv(const APInt &RHS) const {
 1658 APInt APInt::sdiv(int64_t RHS) const {
 1669 APInt APInt::urem(const APInt &RHS) const {
 1669 APInt APInt::urem(const APInt &RHS) const {
 1702   APInt Remainder(BitWidth, 0);
 1739 APInt APInt::srem(const APInt &RHS) const {
 1739 APInt APInt::srem(const APInt &RHS) const {
 1761 void APInt::udivrem(const APInt &LHS, const APInt &RHS,
 1761 void APInt::udivrem(const APInt &LHS, const APInt &RHS,
 1762                     APInt &Quotient, APInt &Remainder) {
 1762                     APInt &Quotient, APInt &Remainder) {
 1832 void APInt::udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient,
 1832 void APInt::udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient,
 1893 void APInt::sdivrem(const APInt &LHS, const APInt &RHS,
 1893 void APInt::sdivrem(const APInt &LHS, const APInt &RHS,
 1894                     APInt &Quotient, APInt &Remainder) {
 1894                     APInt &Quotient, APInt &Remainder) {
 1897       APInt::udivrem(-LHS, -RHS, Quotient, Remainder);
 1899       APInt::udivrem(-LHS, RHS, Quotient, Remainder);
 1904     APInt::udivrem(LHS, -RHS, Quotient, Remainder);
 1907     APInt::udivrem(LHS, RHS, Quotient, Remainder);
 1911 void APInt::sdivrem(const APInt &LHS, int64_t RHS,
 1912                     APInt &Quotient, int64_t &Remainder) {
 1916       APInt::udivrem(-LHS, -RHS, Quotient, R);
 1918       APInt::udivrem(-LHS, RHS, Quotient, R);
 1923     APInt::udivrem(LHS, -RHS, Quotient, R);
 1926     APInt::udivrem(LHS, RHS, Quotient, R);
 1931 APInt APInt::sadd_ov(const APInt &RHS, bool &Overflow) const {
 1931 APInt APInt::sadd_ov(const APInt &RHS, bool &Overflow) const {
 1932   APInt Res = *this+RHS;
 1938 APInt APInt::uadd_ov(const APInt &RHS, bool &Overflow) const {
 1938 APInt APInt::uadd_ov(const APInt &RHS, bool &Overflow) const {
 1939   APInt Res = *this+RHS;
 1944 APInt APInt::ssub_ov(const APInt &RHS, bool &Overflow) const {
 1944 APInt APInt::ssub_ov(const APInt &RHS, bool &Overflow) const {
 1945   APInt Res = *this - RHS;
 1951 APInt APInt::usub_ov(const APInt &RHS, bool &Overflow) const {
 1951 APInt APInt::usub_ov(const APInt &RHS, bool &Overflow) const {
 1952   APInt Res = *this-RHS;
 1957 APInt APInt::sdiv_ov(const APInt &RHS, bool &Overflow) const {
 1957 APInt APInt::sdiv_ov(const APInt &RHS, bool &Overflow) const {
 1963 APInt APInt::smul_ov(const APInt &RHS, bool &Overflow) const {
 1963 APInt APInt::smul_ov(const APInt &RHS, bool &Overflow) const {
 1964   APInt Res = *this * RHS;
 1973 APInt APInt::umul_ov(const APInt &RHS, bool &Overflow) const {
 1973 APInt APInt::umul_ov(const APInt &RHS, bool &Overflow) const {
 1979   APInt Res = lshr(1) * RHS;
 1990 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const {
 1990 APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const {
 2003 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const {
 2003 APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const {
 2013 APInt APInt::sadd_sat(const APInt &RHS) const {
 2013 APInt APInt::sadd_sat(const APInt &RHS) const {
 2015   APInt Res = sadd_ov(RHS, Overflow);
 2019   return isNegative() ? APInt::getSignedMinValue(BitWidth)
 2020                       : APInt::getSignedMaxValue(BitWidth);
 2023 APInt APInt::uadd_sat(const APInt &RHS) const {
 2023 APInt APInt::uadd_sat(const APInt &RHS) const {
 2025   APInt Res = uadd_ov(RHS, Overflow);
 2029   return APInt::getMaxValue(BitWidth);
 2032 APInt APInt::ssub_sat(const APInt &RHS) const {
 2032 APInt APInt::ssub_sat(const APInt &RHS) const {
 2034   APInt Res = ssub_ov(RHS, Overflow);
 2038   return isNegative() ? APInt::getSignedMinValue(BitWidth)
 2039                       : APInt::getSignedMaxValue(BitWidth);
 2042 APInt APInt::usub_sat(const APInt &RHS) const {
 2042 APInt APInt::usub_sat(const APInt &RHS) const {
 2044   APInt Res = usub_ov(RHS, Overflow);
 2051 APInt APInt::smul_sat(const APInt &RHS) const {
 2051 APInt APInt::smul_sat(const APInt &RHS) const {
 2053   APInt Res = smul_ov(RHS, Overflow);
 2060   return ResIsNegative ? APInt::getSignedMinValue(BitWidth)
 2061                        : APInt::getSignedMaxValue(BitWidth);
 2064 APInt APInt::umul_sat(const APInt &RHS) const {
 2064 APInt APInt::umul_sat(const APInt &RHS) const {
 2066   APInt Res = umul_ov(RHS, Overflow);
 2070   return APInt::getMaxValue(BitWidth);
 2073 APInt APInt::sshl_sat(const APInt &RHS) const {
 2073 APInt APInt::sshl_sat(const APInt &RHS) const {
 2075   APInt Res = sshl_ov(RHS, Overflow);
 2079   return isNegative() ? APInt::getSignedMinValue(BitWidth)
 2080                       : APInt::getSignedMaxValue(BitWidth);
 2083 APInt APInt::ushl_sat(const APInt &RHS) const {
 2083 APInt APInt::ushl_sat(const APInt &RHS) const {
 2085   APInt Res = ushl_ov(RHS, Overflow);
 2089   return APInt::getMaxValue(BitWidth);
 2212   APInt Tmp(*this);
 2285 static_assert(APInt::APINT_BITS_PER_WORD % 2 == 0,
 2292 static inline APInt::WordType lowBitMask(unsigned bits) {
 2295   return ~(APInt::WordType) 0 >> (APInt::APINT_BITS_PER_WORD - bits);
 2299 static inline APInt::WordType lowHalf(APInt::WordType part) {
 2299 static inline APInt::WordType lowHalf(APInt::WordType part) {
 2300   return part & lowBitMask(APInt::APINT_BITS_PER_WORD / 2);
 2304 static inline APInt::WordType highHalf(APInt::WordType part) {
 2304 static inline APInt::WordType highHalf(APInt::WordType part) {
 2305   return part >> (APInt::APINT_BITS_PER_WORD / 2);
 2310 static unsigned partMSB(APInt::WordType value) {
 2316 static unsigned partLSB(APInt::WordType value) {
 2425 APInt::WordType APInt::tcAdd(WordType *dst, const WordType *rhs,
 2447 APInt::WordType APInt::tcAddPart(WordType *dst, WordType src,
 2460 APInt::WordType APInt::tcSubtract(WordType *dst, const WordType *rhs,
 2485 APInt::WordType APInt::tcSubtractPart(WordType *dst, WordType src,
 2792 APInt llvm::APIntOps::RoundingUDiv(const APInt &A, const APInt &B,
 2792 APInt llvm::APIntOps::RoundingUDiv(const APInt &A, const APInt &B,
 2792 APInt llvm::APIntOps::RoundingUDiv(const APInt &A, const APInt &B,
 2793                                    APInt::Rounding RM) {
 2796   case APInt::Rounding::DOWN:
 2797   case APInt::Rounding::TOWARD_ZERO:
 2799   case APInt::Rounding::UP: {
 2800     APInt Quo, Rem;
 2801     APInt::udivrem(A, B, Quo, Rem);
 2810 APInt llvm::APIntOps::RoundingSDiv(const APInt &A, const APInt &B,
 2810 APInt llvm::APIntOps::RoundingSDiv(const APInt &A, const APInt &B,
 2810 APInt llvm::APIntOps::RoundingSDiv(const APInt &A, const APInt &B,
 2811                                    APInt::Rounding RM) {
 2813   case APInt::Rounding::DOWN:
 2814   case APInt::Rounding::UP: {
 2815     APInt Quo, Rem;
 2816     APInt::sdivrem(A, B, Quo, Rem);
 2824     if (RM == APInt::Rounding::DOWN) {
 2834   case APInt::Rounding::TOWARD_ZERO:
 2840 Optional<APInt>
 2841 llvm::APIntOps::SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2841 llvm::APIntOps::SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2841 llvm::APIntOps::SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
 2907   APInt R = APInt::getOneBitSet(CoeffWidth, RangeWidth);
 2907   APInt R = APInt::getOneBitSet(CoeffWidth, RangeWidth);
 2908   APInt TwoA = 2 * A;
 2909   APInt SqrB = B * B;
 2914     APInt T = V.abs().urem(A);
 2937     APInt LowkR = C - SqrB.udiv(2*TwoA); // udiv because all values > 0.
 2969   APInt D = SqrB - 4*A*C;
 2971   APInt SQ = D.sqrt();
 2973   APInt Q = SQ * SQ;
 2980   APInt X;
 2981   APInt Rem;
 2990     APInt::sdivrem(-B - (SQ+InexactSQ), TwoA, X, Rem);
 2992     APInt::sdivrem(-B + SQ, TwoA, X, Rem);
 3013   APInt VX = (A*X + B)*X + C;
 3014   APInt VY = VX + TwoA*X + A + B;
 3031 llvm::APIntOps::GetMostSignificantDifferentBit(const APInt &A, const APInt &B) {
 3031 llvm::APIntOps::GetMostSignificantDifferentBit(const APInt &A, const APInt &B) {
 3040 void llvm::StoreIntToMemory(const APInt &IntVal, uint8_t *Dst,
 3066 void llvm::LoadIntFromMemory(APInt &IntVal, uint8_t *Src, unsigned LoadBytes) {
lib/Support/APSInt.cpp
   25   APInt Tmp(NumBits, Str, /*radix=*/10);
lib/Support/KnownBits.cpp
   24   APInt PossibleSumZero = ~LHS.Zero + ~RHS.Zero + !CarryZero;
   25   APInt PossibleSumOne = LHS.One + RHS.One + CarryOne;
   28   APInt CarryKnownZero = ~(PossibleSumZero ^ LHS.Zero ^ RHS.Zero);
   29   APInt CarryKnownOne = PossibleSumOne ^ LHS.One ^ RHS.One;
   32   APInt LHSKnownUnion = LHS.Zero | LHS.One;
   33   APInt RHSKnownUnion = RHS.Zero | RHS.One;
   34   APInt CarryKnownUnion = std::move(CarryKnownZero) | CarryKnownOne;
   35   APInt Known = std::move(LHSKnownUnion) & RHSKnownUnion & CarryKnownUnion;
lib/Support/StringRef.cpp
  508 bool StringRef::getAsInteger(unsigned Radix, APInt &Result) const {
  542   APInt RadixAP, CharAP; // unused unless !IsPowerOf2Radix
lib/Target/AArch64/AArch64FastISel.cpp
 4927   const APInt &C = cast<ConstantInt>(I->getOperand(1))->getValue();
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
 1869 static bool isBitfieldDstMask(uint64_t DstMask, const APInt &BitsToBeInserted,
 1875   APInt SignificantDstMask = APInt(BitWidth, DstMask);
 1876   APInt SignificantBitsToBeInserted = BitsToBeInserted.zextOrTrunc(BitWidth);
 1897 static void getUsefulBits(SDValue Op, APInt &UsefulBits, unsigned Depth = 0);
 1899 static void getUsefulBitsFromAndWithImmediate(SDValue Op, APInt &UsefulBits,
 1908 static void getUsefulBitsFromBitfieldMoveOpd(SDValue Op, APInt &UsefulBits,
 1912   APInt OpUsefulBits(UsefulBits);
 1935 static void getUsefulBitsFromUBFM(SDValue Op, APInt &UsefulBits,
 1945 static void getUsefulBitsFromOrWithShiftedReg(SDValue Op, APInt &UsefulBits,
 1949   APInt Mask(UsefulBits);
 1973 static void getUsefulBitsFromBFM(SDValue Op, SDValue Orig, APInt &UsefulBits,
 1980   APInt OpUsefulBits(UsefulBits);
 1983   APInt ResultUsefulBits(UsefulBits.getBitWidth(), 0);
 1985   APInt Mask(UsefulBits.getBitWidth(), 0);
 2028 static void getUsefulBitsForUse(SDNode *UserNode, APInt &UsefulBits,
 2076 static void getUsefulBits(SDValue Op, APInt &UsefulBits, unsigned Depth) {
 2086   APInt UsersUsefulBits(UsefulBits.getBitWidth(), 0);
 2090     APInt UsefulBitsForUse = APInt(UsefulBits);
 2281 static bool tryBitfieldInsertOpFromOr(SDNode *N, const APInt &UsefulBits,
 2366     APInt BitsToBeInserted =
 2367         APInt::getBitsSet(Known.getBitWidth(), DstLSB, DstLSB + Width);
 2445   APInt NUsefulBits;
lib/Target/AArch64/AArch64ISelLowering.cpp
  914                                const APInt &Demanded,
 1009     SDValue Op, const APInt &Demanded, TargetLoweringOpt &TLO) const {
 1054     const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const {
 1071     Known.Zero = APInt::getHighBitsSet(64, 32);
 1084       Known.Zero |= APInt::getHighBitsSet(BitWidth, BitWidth - MemBits);
 1106         APInt Mask = APInt::getHighBitsSet(BitWidth, BitWidth - 8);
 1106         APInt Mask = APInt::getHighBitsSet(BitWidth, BitWidth - 8);
 1110         APInt Mask = APInt::getHighBitsSet(BitWidth, BitWidth - 16);
 1110         APInt Mask = APInt::getHighBitsSet(BitWidth, BitWidth - 16);
 2690     const APInt &CInt = C->getAPIntValue();
 5714   const APInt ImmInt = Imm.bitcastToAPInt();
 6502   APInt ExpectedElt = APInt(MaskBits, *FirstRealElt + 1);
 7111 static bool resolveBuildVector(BuildVectorSDNode *BVN, APInt &CnstBits,
 7112                                APInt &UndefBits) {
 7114   APInt SplatBits, SplatUndef;
 7135                                  const APInt &Bits) {
 7156                                   const APInt &Bits,
 7204                                   const APInt &Bits,
 7244                                     SelectionDAG &DAG, const APInt &Bits) {
 7275                                  const APInt &Bits) {
 7296                                   const APInt &Bits) {
 7445   APInt DefBits(VT.getSizeInBits(), 0);
 7446   APInt UndefBits(VT.getSizeInBits(), 0);
 7486       APInt LowBits(EltTy.getSizeInBits(),
 7503   APInt DefBits(VT.getSizeInBits(), 0);
 7504   APInt UndefBits(VT.getSizeInBits(), 0);
 7556         APInt Val(BitSize,
 7967   APInt SplatBits, SplatUndef;
 8058   APInt CnstBits(VT.getSizeInBits(), 0);
 8059   APInt UndefBits(VT.getSizeInBits(), 0);
 9234 bool AArch64TargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
 9333 AArch64TargetLowering::BuildSDIVPow2(SDNode *N, const APInt &Divisor,
 9386   const APInt &ConstValue = C->getAPIntValue();
 9416   APInt ShiftedConstValue = ConstValue.ashr(TrailingZeroes);
 9428     APInt SCVMinus1 = ShiftedConstValue - 1;
 9429     APInt CVPlus1 = ConstValue + 1;
 9441     APInt CVNegPlus1 = -ConstValue + 1;
 9442     APInt CVNegMinus1 = -ConstValue - 1;
 9850   APInt DefBits(VT.getSizeInBits(), 0);
 9851   APInt UndefBits(VT.getSizeInBits(), 0);
 9891           DAG.MaskedValueIsZero(N00, APInt::getHighBitsSet(32, 16)))
 9894           DAG.MaskedValueIsZero(N00, APInt::getHighBitsSet(64, 32)))
10380     APInt SplatValue, SplatUndef;
10974   APInt DemandedMask = APInt::getLowBitsSet(64, 56);
10974   APInt DemandedMask = APInt::getLowBitsSet(64, 56);
lib/Target/AArch64/AArch64ISelLowering.h
  265                                      const APInt &DemandedElts,
  277   bool targetShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
  409   bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
  706   SDValue BuildSDIVPow2(SDNode *N, const APInt &Divisor, SelectionDAG &DAG,
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
   59 int AArch64TTIImpl::getIntImmCost(const APInt &Imm, Type *Ty) {
   67   APInt ImmVal = Imm;
   75     APInt Tmp = ImmVal.ashr(ShiftVal).sextOrTrunc(64);
   84                                   const APInt &Imm, Type *Ty) {
  150                                   const APInt &Imm, Type *Ty) {
lib/Target/AArch64/AArch64TargetTransformInfo.h
   75   int getIntImmCost(const APInt &Imm, Type *Ty);
   76   int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
   77   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
 3701       APInt Simm = APInt(64, Imm << ShiftAmt);
lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h
  367 static inline int getFP16Imm(const APInt &Imm) {
  393 static inline int getFP32Imm(const APInt &Imm) {
  421 static inline int getFP64Imm(const APInt &Imm) {
lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
  385 static APInt getIdentityValueForAtomicOp(AtomicRMWInst::BinOp Op,
  395     return APInt::getMinValue(BitWidth);
  398     return APInt::getMaxValue(BitWidth);
  400     return APInt::getSignedMinValue(BitWidth);
  402     return APInt::getSignedMaxValue(BitWidth);
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
 1590                     APInt::getAllOnesValue(32).getZExtValue(); // Size
 2212     const APInt &OffsetVal = cast<ConstantSDNode>(PtrOffset)->getAPIntValue();
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
 1654   if (DAG.MaskedValueIsZero(RHS, APInt::getHighBitsSet(64, 32)) &&
 1655       DAG.MaskedValueIsZero(LHS, APInt::getHighBitsSet(64, 32))) {
 2777   APInt Demanded = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 24);
 2777   APInt Demanded = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 24);
 3927       const APInt &Val = C->getValueAPF().bitcastToAPInt();
 4050       APInt Demanded = APInt::getBitsSet(32,
 4050       APInt Demanded = APInt::getBitsSet(32,
 4395     const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const {
 4406     Known.Zero = APInt::getHighBitsSet(32, 31);
 4419       Known.Zero = APInt::getHighBitsSet(32, 32 - Width);
 4428     Known.Zero = APInt::getHighBitsSet(BitWidth, BitWidth - 16);
 4536     SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG,
lib/Target/AMDGPU/AMDGPUISelLowering.h
  259                                      const APInt &DemandedElts,
  263   unsigned ComputeNumSignBitsForTargetNode(SDValue Op, const APInt &DemandedElts,
lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  237   APInt Imm(64, MO.getImm());
 1404     const APInt &Imm = ImmOp.getFPImm()->getValueAPF().bitcastToAPInt();
 1435   APInt Imm(Size, I.getOperand(1).getImm());
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
 1544   APInt Literal(64, Imm.Val);
 1711   APInt Literal(64, Val);
 1848   APInt Literal(64, Imm.Val);
lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
   96   APInt SignedOffset(18, Imm * 4, true);
lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
  125     APInt SignedOffset(18, Imm * 4, true);
lib/Target/AMDGPU/SIFoldOperands.cpp
  852     APInt Imm(64, OpToFold.getImm());
lib/Target/AMDGPU/SIISelLowering.cpp
 1365 bool SITargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
 8021     if (DAG.MaskedValueIsZero(Src, APInt::getHighBitsSet(32, 24))) {
 8068   APInt Offset = CAdd->getAPIntValue() << CN1->getAPIntValue();
 9895   APInt Demanded = APInt::getBitsSet(32, 8 * Offset, 8 * Offset + 8);
 9895   APInt Demanded = APInt::getBitsSet(32, 8 * Offset, 8 * Offset + 8);
10729                                                      const APInt &DemandedElts,
lib/Target/AMDGPU/SIISelLowering.h
  277   bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
  382                                      const APInt &DemandedElts,
lib/Target/AMDGPU/SIInstrInfo.cpp
 1427       APInt Imm(64, SrcOp.getImm());
 1590         APInt Imm(64, SrcOp.getImm());
 2810 bool SIInstrInfo::isInlineConstant(const APInt &Imm) const {
lib/Target/AMDGPU/SIInstrInfo.h
  693   bool isInlineConstant(const APInt &Imm) const;
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
 1356   APInt V(32, Val, true);
lib/Target/ARM/ARMCodeGenPrepare.cpp
  371   APInt Total = ICmpConst->getValue().getBitWidth() < 32 ?
  377   APInt Max = APInt::getAllOnesValue(ARMCodeGenPrepare::TypeSize);
  377   APInt Max = APInt::getAllOnesValue(ARMCodeGenPrepare::TypeSize);
  724       ConstantInt::get(SrcTy, APInt::getMaxValue(NumBits).getZExtValue());
lib/Target/ARM/ARMFastISel.cpp
 1373       const APInt &CIVal = ConstInt->getValue();
lib/Target/ARM/ARMISelDAGToDAG.cpp
 2837 getContiguousRangeOfSetBits(const APInt &A) {
lib/Target/ARM/ARMISelLowering.cpp
 5632   const APInt &APIntIndex = Index->getAPIntValue();
 5633   APInt NewIndex(APIntIndex.getBitWidth(), DstNumElt);
 5986   APInt SplatBits, SplatUndef;
 6523     APInt INTVal = FPVal.bitcastToAPInt();
 7102   APInt SplatBits, SplatUndef;
 8393     const APInt &CInt = C->getAPIntValue();
 8842 ARMTargetLowering::BuildSDIVPow2(SDNode *N, const APInt &Divisor,
10876       OtherOp = DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), dl,
11705   APInt C2Int = C2->getAPIntValue();
11706   APInt C1Int = C1ShlC2->getAPIntValue();
11709   APInt Mask = APInt::getHighBitsSet(C2Int.getBitWidth(),
11709   APInt Mask = APInt::getHighBitsSet(C2Int.getBitWidth(),
12021   APInt SplatBits, SplatUndef;
12328   APInt SplatBits, SplatUndef;
12369     APInt SplatUndef;
12373     APInt SplatBits0, SplatBits1;
12440 static SDValue ParseBFI(SDNode *N, APInt &ToMask, APInt &FromMask) {
12440 static SDValue ParseBFI(SDNode *N, APInt &ToMask, APInt &FromMask) {
12445   FromMask = APInt::getLowBitsSet(ToMask.getBitWidth(), ToMask.countPopulation());
12451     APInt Shift = cast<ConstantSDNode>(From->getOperand(1))->getAPIntValue();
12463 static bool BitsProperlyConcatenate(const APInt &A, const APInt &B) {
12463 static bool BitsProperlyConcatenate(const APInt &A, const APInt &B) {
12472   APInt ToMask, FromMask;
12480   APInt CombinedToMask = ToMask;
12482     APInt NewToMask, NewFromMask;
12543     APInt ToMask1, FromMask1;
12546     APInt ToMask2, FromMask2;
12554     APInt NewFromMask = FromMask1 | FromMask2;
12555     APInt NewToMask = ToMask1 | ToMask2;
13754                                 APInt::getHighBitsSet(32, 16)))
13935 static const APInt *isPowerOf2Constant(SDValue V) {
13939   const APInt *CV = &C->getAPIntValue();
13971   const APInt *AndC = isPowerOf2Constant(And->getOperand(1));
13996   APInt OrCI = OrC->getAPIntValue();
14023     APInt Mask(VT.getSizeInBits(), 0);
14381   const APInt *TrueConst;
14470     APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16);
14470     APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16);
14477     APInt DemandedMask = APInt::getHighBitsSet(BitWidth, 16);
14477     APInt DemandedMask = APInt::getHighBitsSet(BitWidth, 16);
14486     APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16);
14486     APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16);
14494     APInt LowMask = APInt::getLowBitsSet(LowWidth, 16);
14494     APInt LowMask = APInt::getLowBitsSet(LowWidth, 16);
14496     APInt HighMask = APInt::getHighBitsSet(HighWidth, 16);
14496     APInt HighMask = APInt::getHighBitsSet(HighWidth, 16);
14504     APInt HighMask = APInt::getHighBitsSet(HighWidth, 16);
14504     APInt HighMask = APInt::getHighBitsSet(HighWidth, 16);
14506     APInt LowMask = APInt::getLowBitsSet(LowWidth, 16);
14506     APInt LowMask = APInt::getLowBitsSet(LowWidth, 16);
14514     APInt DemandedMask = APInt::getHighBitsSet(BitWidth, 16);
14514     APInt DemandedMask = APInt::getHighBitsSet(BitWidth, 16);
14523     APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 8);
14523     APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 8);
15380                                                       const APInt &DemandedElts,
15398         Known.Zero |= APInt::getHighBitsSet(BitWidth, BitWidth - 1);
15423       Known.Zero |= APInt::getHighBitsSet(BitWidth, BitWidth - MemBits);
15436     const APInt &Mask = CI->getAPIntValue();
15451     APInt DemandedElt = APInt::getOneBitSet(NumSrcElts, Idx);
15451     APInt DemandedElt = APInt::getOneBitSet(NumSrcElts, Idx);
15473                                                 const APInt &DemandedAPInt,
16383 bool ARMTargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
lib/Target/ARM/ARMISelLowering.h
  411                                        const APInt &DemandedElts,
  415     bool targetShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
  515     bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
  738     SDValue BuildSDIVPow2(SDNode *N, const APInt &Divisor, SelectionDAG &DAG,
lib/Target/ARM/ARMLegalizerInfo.cpp
  463     auto AsInteger =
lib/Target/ARM/ARMTargetTransformInfo.cpp
   65 int ARMTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty) {
  100                                       const APInt &Imm, Type *Ty) {
  107 int ARMTTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
lib/Target/ARM/ARMTargetTransformInfo.h
  112   int getIntImmCodeSizeCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
  116   int getIntImmCost(const APInt &Imm, Type *Ty);
  118   int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h
  653   inline int getFP16Imm(const APInt &Imm) {
  679   inline int getFP32Imm(const APInt &Imm) {
  707   inline int getFP64Imm(const APInt &Imm) {
lib/Target/BPF/BPFISelLowering.h
  108   bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
lib/Target/Hexagon/BitTracker.cpp
  423   const APInt &A = CI->getValue();
lib/Target/Hexagon/HexagonConstPropagation.cpp
  350     bool constToInt(const Constant *C, APInt &Val) const;
  352     const ConstantInt *intToConst(const APInt &Val) const;
  357     bool evaluateCMPri(uint32_t Cmp, const RegisterSubReg &R1, const APInt &A2,
  361     bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2,
  361     bool evaluateCMPii(uint32_t Cmp, const APInt &A1, const APInt &A2,
  363     bool evaluateCMPpi(uint32_t Cmp, uint32_t Props, const APInt &A2,
  374     bool evaluateANDri(const RegisterSubReg &R1, const APInt &A2,
  376     bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result);
  376     bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result);
  376     bool evaluateANDii(const APInt &A1, const APInt &A2, APInt &Result);
  379     bool evaluateORri(const RegisterSubReg &R1, const APInt &A2,
  381     bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result);
  381     bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result);
  381     bool evaluateORii(const APInt &A1, const APInt &A2, APInt &Result);
  384     bool evaluateXORri(const RegisterSubReg &R1, const APInt &A2,
  386     bool evaluateXORii(const APInt &A1, const APInt &A2, APInt &Result);
  386     bool evaluateXORii(const APInt &A1, const APInt &A2, APInt &Result);
  386     bool evaluateXORii(const APInt &A1, const APInt &A2, APInt &Result);
  391     bool evaluateZEXTi(const APInt &A1, unsigned Width, unsigned Bits,
  392           APInt &Result);
  395     bool evaluateSEXTi(const APInt &A1, unsigned Width, unsigned Bits,
  396           APInt &Result);
  401     bool evaluateCLBi(const APInt &A1, bool Zeros, bool Ones, APInt &Result);
  401     bool evaluateCLBi(const APInt &A1, bool Zeros, bool Ones, APInt &Result);
  404     bool evaluateCTBi(const APInt &A1, bool Zeros, bool Ones, APInt &Result);
  404     bool evaluateCTBi(const APInt &A1, bool Zeros, bool Ones, APInt &Result);
  410     bool evaluateEXTRACTi(const APInt &A1, unsigned Bits, unsigned Offset,
  411           bool Signed, APInt &Result);
  415     bool evaluateSplati(const APInt &A1, unsigned Bits, unsigned Count,
  416           APInt &Result);
 1085       APInt &Val) const {
 1093 const ConstantInt *MachineConstEvaluator::intToConst(const APInt &Val) const {
 1118   APInt A;
 1137       const APInt &A2, const CellMap &Inputs, bool &Result) {
 1145   APInt A;
 1172   APInt A;
 1189 bool MachineConstEvaluator::evaluateCMPii(uint32_t Cmp, const APInt &A1,
 1190       const APInt &A2, bool &Result) {
 1193     Result = !APInt::isSameValue(A1, A2);
 1197     Result = APInt::isSameValue(A1, A2);
 1201     if (APInt::isSameValue(A1, A2))
 1211     const APInt Zx1 = A1.zextOrSelf(MaxW);
 1212     const APInt Zx2 = A2.zextOrSelf(MaxW);
 1221   const APInt Sx1 = A1.sextOrSelf(MaxW);
 1222   const APInt Sx2 = A2.sextOrSelf(MaxW);
 1231       const APInt &A2, bool &Result) {
 1380   APInt A;
 1393       const APInt &A2, const CellMap &Inputs, LatticeCell &Result) {
 1410   APInt A, ResA;
 1422 bool MachineConstEvaluator::evaluateANDii(const APInt &A1,
 1423       const APInt &A2, APInt &Result) {
 1423       const APInt &A2, APInt &Result) {
 1447   APInt A;
 1460       const APInt &A2, const CellMap &Inputs, LatticeCell &Result) {
 1477   APInt A, ResA;
 1489 bool MachineConstEvaluator::evaluateORii(const APInt &A1,
 1490       const APInt &A2, APInt &Result) {
 1490       const APInt &A2, APInt &Result) {
 1512   APInt A;
 1525       const APInt &A2, const CellMap &Inputs, LatticeCell &Result) {
 1539   APInt A, XA;
 1551 bool MachineConstEvaluator::evaluateXORii(const APInt &A1,
 1552       const APInt &A2, APInt &Result) {
 1552       const APInt &A2, APInt &Result) {
 1566   APInt A, XA;
 1578 bool MachineConstEvaluator::evaluateZEXTi(const APInt &A1, unsigned Width,
 1579       unsigned Bits, APInt &Result) {
 1583   APInt Mask = APInt::getLowBitsSet(Width, Bits);
 1583   APInt Mask = APInt::getLowBitsSet(Width, Bits);
 1597   APInt A, XA;
 1609 bool MachineConstEvaluator::evaluateSEXTi(const APInt &A1, unsigned Width,
 1610       unsigned Bits, APInt &Result) {
 1662   APInt A, CA;
 1674 bool MachineConstEvaluator::evaluateCLBi(const APInt &A1, bool Zeros,
 1675       bool Ones, APInt &Result) {
 1697   APInt A, CA;
 1709 bool MachineConstEvaluator::evaluateCTBi(const APInt &A1, bool Zeros,
 1710       bool Ones, APInt &Result) {
 1743   APInt A, CA;
 1755 bool MachineConstEvaluator::evaluateEXTRACTi(const APInt &A1, unsigned Bits,
 1756       unsigned Offset, bool Signed, APInt &Result) {
 1791   APInt A, SA;
 1803 bool MachineConstEvaluator::evaluateSplati(const APInt &A1, unsigned Bits,
 1804       unsigned Count, APInt &Result) {
 1807   APInt LoBits = (Bits < BW) ? A1.trunc(Bits) : A1.zextOrSelf(Bits);
 1811   APInt Res(SW, 0, false);
 1849     static APInt getCmpImm(unsigned Opc, unsigned OpX,
 2042       APInt A(32, (1ull << B), false);
 2092       APInt C;
 2124       APInt C;
 2149         APInt Zero(BW, 0, false);
 2229   APInt A;
 2458 APInt HexagonConstEvaluator::getCmpImm(unsigned Opc, unsigned OpX,
 2517   SmallVector<APInt,4> LoVs(LN), HiVs(HN);
 2532     APInt HV = HiVs[i].zextOrSelf(64) << 32;
 2534       APInt LV = LoVs[j].zextOrSelf(64);
 2601       APInt A2 = getCmpImm(Opc, 2, Src2);
 2605     APInt A1 = getCmpImm(Opc, 1, Src1);
 2611       APInt A2 = getCmpImm(Opc, 2, Src2);
 2639       APInt A(32, Src2.getImm(), true);
 2650       APInt A(32, Src2.getImm(), true);
 2690     APInt A(W, V, true);
 2883       APInt A;
 3003       APInt A;
 3032         APInt M1;
 3037         APInt M1;
lib/Target/Hexagon/HexagonGenExtract.cpp
  172     APInt A = APInt(BW, ~0ULL).lshr(SR).shl(SL);
  178   APInt M = CM->getValue().lshr(SL);
  198     APInt C = APInt::getHighBitsSet(BW, BW-U);
  198     APInt C = APInt::getHighBitsSet(BW, BW-U);
lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
  701   APInt A = CN->getValueAPF().bitcastToAPInt();
 1793       const APInt &CInt = C->getAPIntValue();
lib/Target/Hexagon/HexagonISelLowering.cpp
 2113       APInt A = CF->getValueAPF().bitcastToAPInt();
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
 1535   auto *BMI = ConstantInt::get(P->getType(), APInt::getLowBitsSet(32, IC));
lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
  393     const APInt IntMin = APInt::getSignedMinValue(bits+align_bits);
  393     const APInt IntMin = APInt::getSignedMinValue(bits+align_bits);
  394     const APInt IntMax = APInt::getSignedMaxValue(bits+align_bits);
  394     const APInt IntMax = APInt::getSignedMaxValue(bits+align_bits);
lib/Target/Lanai/LanaiISelLowering.cpp
 1395           DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), dl, VT);
 1489     const SDValue Op, KnownBits &Known, const APInt &DemandedElts,
lib/Target/Lanai/LanaiISelLowering.h
  108                                      const APInt &DemandedElts,
lib/Target/Lanai/LanaiTargetTransformInfo.h
   52   int getIntImmCost(const APInt &Imm, Type *Ty) {
   69   int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm, Type *Ty) {
   73   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/Mips/MipsISelDAGToDAG.cpp
  154 bool MipsDAGToDAGISel::selectVSplat(SDNode *N, APInt &Imm,
  236   APInt SplatValue, SplatUndef;
  249   APInt NegSplatValue = 0 - SplatValue;
lib/Target/Mips/MipsISelDAGToDAG.h
   98   virtual bool selectVSplat(SDNode *N, APInt &Imm,
lib/Target/Mips/MipsInstructionSelector.cpp
   42   bool materialize32BitImm(Register DestReg, APInt Imm,
  129 bool MipsInstructionSelector::materialize32BitImm(Register DestReg, APInt Imm,
  405         APInt OffsetValue = Offset->getOperand(1).getCImm()->getValue();
  479     APInt APImm = FPimm.bitcastToAPInt();
lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  509 bool MipsSEDAGToDAGISel::selectVSplat(SDNode *N, APInt &Imm,
  519   APInt SplatValue, SplatUndef;
  551   APInt ImmValue;
  627   APInt ImmValue;
  658   APInt ImmValue;
  692   APInt ImmValue;
  714   APInt ImmValue;
  982     APInt SplatValue, SplatUndef;
lib/Target/Mips/MipsSEISelDAGToDAG.h
   96   bool selectVSplat(SDNode *N, APInt &Imm,
lib/Target/Mips/MipsSEISelLowering.cpp
  533 static bool isVSplat(SDValue N, APInt &Imm, bool IsLittleEndian) {
  539   APInt SplatValue, SplatUndef;
  564   APInt SplatValue, SplatUndef;
  619     APInt Mask, InvMask;
  716 static bool shouldTransformMulToShiftsAddsSubs(APInt C, EVT VT,
  746   SmallVector<APInt, 16> WorkStack(1, C);
  751     APInt Val = WorkStack.pop_back_val();
  764     APInt Floor = APInt(BitWidth, 1) << Val.logBase2();
  765     APInt Ceil = Val.isNegative() ? APInt(BitWidth, 0)
  792 static SDValue genConstMult(SDValue X, APInt C, const SDLoc &DL, EVT VT,
  808   APInt Floor = APInt(BitWidth, 1) << C.logBase2();
  809   APInt Ceil = C.isNegative() ? APInt(BitWidth, 0) :
  848   APInt SplatValue, SplatUndef;
 1474       APInt BitImm = APInt(64, 1) << CImm->getAPIntValue();
 1533   APInt BitImm = APInt(ResTy.getScalarSizeInBits(), 1)
 1616     APInt Mask = APInt::getHighBitsSet(EltTy.getSizeInBits(),
 1616     APInt Mask = APInt::getHighBitsSet(EltTy.getSizeInBits(),
 1631     APInt Mask = APInt::getLowBitsSet(EltTy.getSizeInBits(),
 1631     APInt Mask = APInt::getLowBitsSet(EltTy.getSizeInBits(),
 2464   APInt SplatValue, SplatUndef;
 2586   APInt Imm(32, 0);
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
 1707   APInt API = APF.bitcastToAPInt();
 1865       APInt API = CFP->getValueAPF().bitcastToAPInt();
 1921     APInt Val = CI->getValue();
 2032     APInt OffsetAI(DL.getPointerTypeSizeInBits(CE->getType()), 0);
lib/Target/NVPTX/NVPTXISelLowering.cpp
 1925   APInt E0 =
 1927   APInt E1 =
 4623     const APInt &Val = CI->getAPIntValue();
 4668     APInt ShiftAmt = ShlRHS->getAPIntValue();
 4671       APInt MulVal = APInt(BitWidth, 1) << ShiftAmt;
lib/Target/NVPTX/NVPTXMCExpr.cpp
   49   APInt API = APF.bitcastToAPInt();
lib/Target/PowerPC/PPCFastISel.cpp
  846       const APInt &CIVal = ConstInt->getValue();
 1306     const APInt &CIVal = ConstInt->getValue();
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
 5331                 Op0, APInt::getHighBitsSet(Bits, Bits - (b + 1) * 8)))
lib/Target/PowerPC/PPCISelLowering.cpp
 8372   APInt APSplatBits, APSplatUndef;
 9584   auto HighBits = APInt::getHighBitsSet(32, 32 - MemVT.getSizeInBits());
 9584   auto HighBits = APInt::getHighBitsSet(32, 32 - MemVT.getSizeInBits());
12053                                  APInt::getHighBitsSet(OpBits, OpBits-1)) ||
12055                                  APInt::getHighBitsSet(OpBits, OpBits-1)))
12444                                   APInt::getHighBitsSet(OpBits,
12564                        DAG.getConstant(APInt::getLowBitsSet(
13781                                   APInt::getAllOnesValue(Bits /* alignment */)
14094 PPCTargetLowering::BuildSDIVPow2(SDNode *N, const APInt &Divisor,
14129                                                       const APInt &DemandedElts,
14849 bool PPCTargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
15362   const APInt &MulAmt = ConstOpOrElement->getAPIntValue();
15364   APInt MulAmtAbs = MulAmt.abs();
lib/Target/PowerPC/PPCISelLowering.h
  736     SDValue BuildSDIVPow2(SDNode *N, const APInt &Divisor, SelectionDAG &DAG,
  744                                        const APInt &DemandedElts,
  850     bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
lib/Target/PowerPC/PPCInstrInfo.cpp
 2888     APInt InVal((Opc == PPC::RLDICL || Opc == PPC::RLDICLo) ?
 2913     APInt InVal(32, SExtImm, true);
 3579       APInt ActualValue(64, Imm, true);
 3727     APInt ActualValue(64, Imm, true);
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
  587         const APInt &ConstInt = StepConst->getValue()->getValue();
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
   58 int PPCTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty) {
   87 int PPCTTIImpl::getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
  121 int PPCTTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
lib/Target/PowerPC/PPCTargetTransformInfo.h
   47   int getIntImmCost(const APInt &Imm, Type *Ty);
   49   int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
   50   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/RISCV/RISCVISelLowering.cpp
  943       APInt V = C->getValueAPF().bitcastToAPInt();
  961     APInt SignBit = APInt::getSignMask(32);
  961     APInt SignBit = APInt::getSignMask(32);
  978     APInt LHSMask = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 32);
  978     APInt LHSMask = APInt::getLowBitsSet(LHS.getValueSizeInBits(), 32);
  979     APInt RHSMask = APInt::getLowBitsSet(RHS.getValueSizeInBits(), 5);
  979     APInt RHSMask = APInt::getLowBitsSet(RHS.getValueSizeInBits(), 5);
 1006     APInt SignBit = APInt::getSignMask(32).sext(64);
 1006     APInt SignBit = APInt::getSignMask(32).sext(64);
 1036       APInt C1Int = C1->getAPIntValue();
 1037       APInt ShiftedC1Int = C1Int << C2->getAPIntValue();
 1069     SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG,
lib/Target/RISCV/RISCVISelLowering.h
   88                                            const APInt &DemandedElts,
  173   bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
lib/Target/RISCV/RISCVTargetTransformInfo.cpp
   18 int RISCVTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty) {
   32 int RISCVTTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
   89                                 const APInt &Imm, Type *Ty) {
lib/Target/RISCV/RISCVTargetTransformInfo.h
   44   int getIntImmCost(const APInt &Imm, Type *Ty);
   45   int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
   46   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/RISCV/Utils/RISCVMatInt.cpp
   78 int getIntMatCost(const APInt &Val, unsigned Size, bool IsRV64) {
   85     APInt Chunk = Val.ashr(ShiftVal).sextOrTrunc(PlatRegSize);
lib/Target/RISCV/Utils/RISCVMatInt.h
   41 int getIntMatCost(const APInt &Val, unsigned Size, bool IsRV64);
lib/Target/Sparc/SparcISelLowering.cpp
 1858                                  const APInt &DemandedElts,
 3067   APInt V = C->getValueAPF().bitcastToAPInt();
lib/Target/Sparc/SparcISelLowering.h
   66                                        const APInt &DemandedElts,
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
 1378   auto OperandV = OperandC->getAPIntValue();
lib/Target/SystemZ/SystemZISelLowering.cpp
  752     APInt HighValue = SplatBits.lshr(HalfSize).trunc(HalfSize);
  753     APInt LowValue = SplatBits.trunc(HalfSize);
 4879     APInt SplatBits, SplatUndef;
 6185 static APInt getDemandedSrcElements(SDValue Op, const APInt &DemandedElts,
 6185 static APInt getDemandedSrcElements(SDValue Op, const APInt &DemandedElts,
 6189   APInt SrcDemE;
 6250         APInt DemEls = DemandedElts.trunc(NumSrc0Els);
 6253         APInt DemEls = DemandedElts.lshr(NumSrc0Els);
 6283                                   const APInt &DemandedElts,
 6286   APInt Src0DemE = getDemandedSrcElements(Op, DemandedElts, OpNo);
 6287   APInt Src1DemE = getDemandedSrcElements(Op, DemandedElts, OpNo + 1);
 6299                                                      const APInt &DemandedElts,
 6356       APInt SrcDemE = getDemandedSrcElements(Op, DemandedElts, 0);
 6391 static unsigned computeNumSignBitsBinOp(SDValue Op, const APInt &DemandedElts,
 6394   APInt Src0DemE = getDemandedSrcElements(Op, DemandedElts, OpNo);
 6397   APInt Src1DemE = getDemandedSrcElements(Op, DemandedElts, OpNo + 1);
 6416     SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG,
 6447       APInt SrcDemE = getDemandedSrcElements(Op, DemandedElts, 1);
lib/Target/SystemZ/SystemZISelLowering.h
  509                                      const APInt &DemandedElts,
  515                                            const APInt &DemandedElts,
  663   APInt IntBits;             // The 128 bits as an integer.
  664   APInt SplatBits;           // Smallest splat value.
  665   APInt SplatUndef;          // Bits correspoding to undef operands of the BVN.
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
   33 int SystemZTTIImpl::getIntImmCost(const APInt &Imm, Type *Ty) {
   66                                   const APInt &Imm, Type *Ty) {
  184                                   const APInt &Imm, Type *Ty) {
lib/Target/SystemZ/SystemZTargetTransformInfo.h
   41   int getIntImmCost(const APInt &Imm, Type *Ty);
   43   int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
   44   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
  189     APInt AI = FP.bitcastToAPInt();
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
 1546   APInt Shift = SplatConst->getAPIntValue().zextOrTrunc(32);
lib/Target/X86/AsmParser/X86AsmParser.cpp
 1721     APInt DotDisp;
lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
  402                             APInt &Mask) const override;
  417                                               APInt &Mask) const {
lib/Target/X86/Utils/X86ShuffleDecode.cpp
  306 void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  338 void DecodeVPPERMMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  493                         ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  515                          ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  560 void DecodeVPERMVMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  574 void DecodeVPERMV3Mask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
lib/Target/X86/Utils/X86ShuffleDecode.h
  111 void DecodePSHUFBMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  134 void DecodeVPPERMMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  159                         ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  164                          ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  168 void DecodeVPERMVMask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
  172 void DecodeVPERMV3Mask(ArrayRef<uint64_t> RawMask, const APInt &UndefElts,
lib/Target/X86/X86ISelDAGToDAG.cpp
  442       const APInt &Val = cast<ConstantSDNode>(N->getOperand(1))->getAPIntValue();
  447       APInt Mask = Val | CurDAG->computeKnownBits(N->getOperand(0)).Zero;
 1748   APInt MaskedHighBits =
 1749     APInt::getHighBitsSet(X.getSimpleValueType().getSizeInBits(), MaskLZ);
 2149     APInt HighZeros = APInt::getHighBitsSet(Shl.getValueSizeInBits(),
 2149     APInt HighZeros = APInt::getHighBitsSet(Shl.getValueSizeInBits(),
 3246         V, APInt::getLowBitsSet(V.getSimpleValueType().getSizeInBits(),
 3809     APInt NeededMask = APInt::getLowBitsSet(NVT.getSizeInBits(),
 3809     APInt NeededMask = APInt::getLowBitsSet(NVT.getSizeInBits(),
 3851   APInt SplatVal;
 3858   APInt Ones = APInt::getAllOnesValue(32);
 3858   APInt Ones = APInt::getAllOnesValue(32);
 3904   APInt MaskVal = And1C->getAPIntValue();
 3916   APInt HighZeros = APInt::getHighBitsSet(MaskVal.getBitWidth(), MaskLZ);
 3916   APInt HighZeros = APInt::getHighBitsSet(MaskVal.getBitWidth(), MaskLZ);
 3917   APInt NegMaskVal = MaskVal | HighZeros;
lib/Target/X86/X86ISelLowering.cpp
 4895 bool X86TargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
 4927   APInt MulC;
 5336                                     const APInt &Zeroable,
 5391 static SDValue getConstVector(ArrayRef<APInt> Bits, APInt &Undefs,
 5391 static SDValue getConstVector(ArrayRef<APInt> Bits, APInt &Undefs,
 5412     const APInt &V = Bits[i];
 5582     const APInt &Idx = N->getConstantOperandAPInt(2);
 5816   APInt Ones = APInt::getAllOnesValue(32);
 5816   APInt Ones = APInt::getAllOnesValue(32);
 5955                                           APInt &UndefElts,
 5956                                           SmallVectorImpl<APInt> &EltBits,
 5988     APInt UndefBits(SizeInBits, 0);
 5989     APInt MaskBits(SizeInBits, 0);
 6004       APInt UndefEltBits = UndefBits.extractBits(EltSizeInBits, BitOffset);
 6046     APInt UndefSrcElts = APInt::getAllOnesValue(NumElts);
 6046     APInt UndefSrcElts = APInt::getAllOnesValue(NumElts);
 6047     SmallVector<APInt, 64> SrcEltBits(NumElts, APInt(EltSizeInBits, 0));
 6053     APInt UndefSrcElts = APInt::getNullValue(1);
 6053     APInt UndefSrcElts = APInt::getNullValue(1);
 6054     SmallVector<APInt, 64> SrcEltBits(1, Cst->getAPIntValue());
 6058     APInt UndefSrcElts = APInt::getNullValue(1);
 6058     APInt UndefSrcElts = APInt::getNullValue(1);
 6059     APInt RawBits = Cst->getValueAPF().bitcastToAPInt();
 6060     SmallVector<APInt, 64> SrcEltBits(1, RawBits);
 6069     APInt UndefSrcElts(NumSrcElts, 0);
 6070     SmallVector<APInt, 64> SrcEltBits(NumSrcElts, APInt(SrcEltSizeInBits, 0));
 6086     APInt UndefSrcElts(NumSrcElts, 0);
 6087     SmallVector<APInt, 64> SrcEltBits(NumSrcElts, APInt(SrcEltSizeInBits, 0));
 6095       APInt RawBits = Cst->getValueAPF().bitcastToAPInt();
 6111     APInt UndefSrcElts(NumSrcElts, 0);
 6112     SmallVector<APInt, 64> SrcEltBits(NumSrcElts, APInt(SrcEltSizeInBits, 0));
 6128       APInt UndefSrcElts(NumSrcElts, 0);
 6129       SmallVector<APInt, 64> SrcEltBits(1, APInt(SrcEltSizeInBits, 0));
 6159       APInt UndefSrcElts(NumSrcElts, 0);
 6160       SmallVector<APInt, 64> SrcEltBits(1, APInt(SrcEltSizeInBits, 0));
 6172     SmallVector<APInt, 16> SubEltBits;
 6176       UndefElts = APInt::getSplat(NumElts, UndefElts);
 6190     APInt UndefSrcElts(NumSrcElts, 0);
 6191     SmallVector<APInt, 64> SrcEltBits;
 6205     APInt UndefSubElts;
 6206     SmallVector<APInt, 32> EltSubBits;
 6255     APInt UndefElts0, UndefElts1;
 6256     SmallVector<APInt, 32> EltBits0, EltBits1;
 6268     UndefElts = APInt::getNullValue(NumElts);
 6273         EltBits.push_back(APInt::getNullValue(EltSizeInBits));
 6292 bool isConstantSplat(SDValue Op, APInt &SplatVal) {
 6293   APInt UndefElts;
 6294   SmallVector<APInt, 16> EltBits;
 6321                                         APInt &UndefElts) {
 6323   SmallVector<APInt, 64> EltBits;
 6330   for (APInt Elt : EltBits)
 6355 static void getPackDemandedElts(EVT VT, const APInt &DemandedElts,
 6356                                 APInt &DemandedLHS, APInt &DemandedRHS) {
 6356                                 APInt &DemandedLHS, APInt &DemandedRHS) {
 6363   DemandedLHS = APInt::getNullValue(NumInnerElts);
 6364   DemandedRHS = APInt::getNullValue(NumInnerElts);
 6380 static void getHorizDemandedElts(EVT VT, const APInt &DemandedElts,
 6381                                  APInt &DemandedLHS, APInt &DemandedRHS) {
 6381                                  APInt &DemandedLHS, APInt &DemandedRHS) {
 6387   DemandedLHS = APInt::getNullValue(NumElts);
 6388   DemandedRHS = APInt::getNullValue(NumElts);
 6420   APInt RawUndefs;
 6727                                          APInt &KnownUndef, APInt &KnownZero) {
 6727                                          APInt &KnownUndef, APInt &KnownZero) {
 6739   KnownUndef = KnownZero = APInt::getNullValue(Size);
 6749   APInt UndefSrcElts[2];
 6750   SmallVector<APInt, 32> SrcEltBits[2];
 6812                                               const APInt &KnownUndef,
 6813                                               const APInt &KnownZero) {
 6828                                               APInt &KnownUndef,
 6829                                               APInt &KnownZero) {
 6831   KnownUndef = KnownZero = APInt::getNullValue(NumElts);
 6852 static bool getFauxShuffleMask(SDValue N, const APInt &DemandedElts,
 6884     APInt UndefElts;
 6885     SmallVector<APInt, 32> EltBits;
 6897       const APInt &ByteBits = EltBits[i];
 6916       APInt ZeroMask = APInt::getNullValue(NumBytesPerElt);
 6916       APInt ZeroMask = APInt::getNullValue(NumBytesPerElt);
 6917       APInt SelectMask = APInt::getNullValue(NumBytesPerElt);
 6917       APInt SelectMask = APInt::getNullValue(NumBytesPerElt);
 7118     APInt EltsLHS, EltsRHS;
 7130       APInt ZeroMask = APInt::getHighBitsSet(2 * NumBitsPerElt, NumBitsPerElt);
 7130       APInt ZeroMask = APInt::getHighBitsSet(2 * NumBitsPerElt, NumBitsPerElt);
 7280 static bool getTargetShuffleInputs(SDValue Op, const APInt &DemandedElts,
 7283                                    APInt &KnownUndef, APInt &KnownZero,
 7283                                    APInt &KnownUndef, APInt &KnownZero,
 7311   APInt KnownUndef, KnownZero;
 7313   APInt DemandedElts = APInt::getAllOnesValue(NumElts);
 7313   APInt DemandedElts = APInt::getAllOnesValue(NumElts);
 7800   APInt LoadMask = APInt::getNullValue(NumElems);
 7800   APInt LoadMask = APInt::getNullValue(NumElems);
 7801   APInt ZeroMask = APInt::getNullValue(NumElems);
 7801   APInt ZeroMask = APInt::getNullValue(NumElems);
 7802   APInt UndefMask = APInt::getNullValue(NumElems);
 7802   APInt UndefMask = APInt::getNullValue(NumElems);
 8070 static Constant *getConstantVector(MVT VT, const APInt &SplatValue,
 8077     APInt Val = SplatValue.extractBits(ScalarSize, ScalarSize * i);
 8205     APInt SplatValue, Undef;
 9046   APInt DemandedElts = APInt::getAllOnesValue(NumElts);
 9046   APInt DemandedElts = APInt::getAllOnesValue(NumElts);
10435 static APInt computeZeroableShuffleElements(ArrayRef<int> Mask,
10437   APInt Zeroable(Mask.size(), 0);
10472         APInt Val = Cst->getAPIntValue();
10478         APInt Val = Cst->getValueAPF().bitcastToAPInt();
10512 static bool isNonZeroElementsInOrder(const APInt &Zeroable,
10540                                       SDValue V2, const APInt &Zeroable,
10597                                     const APInt &Zeroable,
10840       APInt ZeroMask = APInt::getHighBitsSet(BitSize * 2, BitSize);
10840       APInt ZeroMask = APInt::getHighBitsSet(BitSize * 2, BitSize);
10897                                      const APInt &Zeroable,
10977                                       const APInt &Zeroable, bool &ForceV1Zero,
11035                                    const APInt &Zeroable,
11614     const APInt &Zeroable, const X86Subtarget &Subtarget, SelectionDAG &DAG) {
11699                                int MaskOffset, const APInt &Zeroable,
11761                                    const APInt &Zeroable,
11797                                 uint64_t &BitIdx, const APInt &Zeroable) {
11919                                      const APInt &Zeroable, SelectionDAG &DAG) {
12108     const APInt &Zeroable, const X86Subtarget &Subtarget,
12264     const APInt &Zeroable, const X86Subtarget &Subtarget,
12459   const APInt &ExtIndex0 = N0.getConstantOperandAPInt(1);
12460   const APInt &ExtIndex1 = N1.getConstantOperandAPInt(1);
12682                                    const APInt &Zeroable,
12769                                       ArrayRef<int> Mask, const APInt &Zeroable,
12909                                  const APInt &Zeroable, SDValue V1, SDValue V2,
12993                                  const APInt &Zeroable, SDValue V1, SDValue V2,
13178                                  const APInt &Zeroable, SDValue V1, SDValue V2,
13274                                  const APInt &Zeroable, SDValue V1, SDValue V2,
13899     const APInt &Zeroable, SelectionDAG &DAG, bool &V1InUse, bool &V2InUse) {
13961                                  const APInt &Zeroable, SDValue V1, SDValue V2,
14169                                  const APInt &Zeroable, SDValue V1, SDValue V2,
14485                                   const APInt &Zeroable,
14813                                   const APInt &Zeroable,
15469                                    const APInt &Zeroable) {
15513                                       const APInt &Zeroable,
15541                                              const APInt &Zeroable,
15576                                  const APInt &Zeroable, SDValue V1, SDValue V2,
15684                                  const APInt &Zeroable, SDValue V1, SDValue V2,
15782                                  const APInt &Zeroable, SDValue V1, SDValue V2,
15881                                  const APInt &Zeroable, SDValue V1, SDValue V2,
15992                                   const APInt &Zeroable, SDValue V1, SDValue V2,
16092                                  const APInt &Zeroable, SDValue V1, SDValue V2,
16190                                   SDValue V1, SDValue V2, const APInt &Zeroable,
16255                                   const APInt &Zeroable, SDValue V1, SDValue V2,
16355                                  const APInt &Zeroable, SDValue V1, SDValue V2,
16409                                   const APInt &Zeroable, SDValue V1, SDValue V2,
16462                                  const APInt &Zeroable, SDValue V1, SDValue V2,
16525                                   const APInt &Zeroable, SDValue V1, SDValue V2,
16594                                   const APInt &Zeroable, SDValue V1, SDValue V2,
16647                                  const APInt &Zeroable, SDValue V1, SDValue V2,
16717                                   const APInt &Zeroable,
16813                                     int MaskOffset, const APInt &Zeroable) {
16848                                 const APInt &Zeroable,
17089   APInt Zeroable = computeZeroableShuffleElements(OrigMask, V1, V2);
18295     APInt APIntShiftAmt;
18867   APInt FF(32, 0x5F800000ULL);
18984                            DAG.getConstant(APInt::getSignMask(64),
19777   APInt MaskElt = IsFABS ? APInt::getSignedMaxValue(EltBits) :
19777   APInt MaskElt = IsFABS ? APInt::getSignedMaxValue(EltBits) :
19778                            APInt::getSignMask(EltBits);
19837       APFloat(Sem, APInt::getSignMask(EltSizeInBits)), dl, LogicVT);
19839       APFloat(Sem, APInt::getSignedMaxValue(EltSizeInBits)), dl, LogicVT);
19897   DenseMap<SDValue, APInt> SrcOpMap;
19928     DenseMap<SDValue, APInt>::iterator M = SrcOpMap.find(Src);
19936       APInt EltCount = APInt::getNullValue(NumElts);
19936       APInt EltCount = APInt::getNullValue(NumElts);
19948   for (DenseMap<SDValue, APInt>::const_iterator I = SrcOpMap.begin(),
20305 X86TargetLowering::BuildSDIVPow2(SDNode *N, const APInt &Divisor,
20336   APInt Lg2Mask = APInt::getLowBitsSet(VT.getSizeInBits(), Lg2);
20336   APInt Lg2Mask = APInt::getLowBitsSet(VT.getSizeInBits(), Lg2);
20559     const APInt &EltC = Elt->getAPIntValue();
20745       APInt UndefElts;
20746       SmallVector<APInt, 64> EltBits;
20783   APInt ConstValue;
20927     SDValue SM = DAG.getConstant(APInt::getSignMask(EltVT.getSizeInBits()), dl,
21102   APInt NegOne = APInt::getAllOnesValue(CarryVT.getScalarSizeInBits());
21102   APInt NegOne = APInt::getAllOnesValue(CarryVT.getScalarSizeInBits());
21198   return DAG.MaskedValueIsZero(VOp0, APInt::getHighBitsSet(InBits,InBits-Bits));
22476         const APInt &C = ND->getAPIntValue();
22488         const APInt &C = ND->getAPIntValue();
22500         const APInt &C = ND->getAPIntValue();
24091     const APInt &HintVal = Op.getConstantOperandAPInt(6);
24996     SDValue Sign = DAG.getConstant(APInt::getSignedMinValue(16), DL, VT);
25130   APInt LowerBitsMask = APInt::getLowBitsSet(64, 32);
25130   APInt LowerBitsMask = APInt::getLowBitsSet(64, 32);
25134   APInt UpperBitsMask = APInt::getHighBitsSet(64, 32);
25134   APInt UpperBitsMask = APInt::getHighBitsSet(64, 32);
25534   APInt APIntShiftAmt;
25583       APInt Mask = APInt::getHighBitsSet(8, 8 - ShiftAmt);
25583       APInt Mask = APInt::getHighBitsSet(8, 8 - ShiftAmt);
25711     APInt One(SVTBits, 1);
25722       APInt C(SVTBits, ND->getZExtValue());
25816     SDValue S = DAG.getConstant(APInt::getSignMask(64), dl, VT);
26255   APInt UndefElts;
26256   SmallVector<APInt, 32> EltBits;
27264   APInt NegOne = APInt::getAllOnesValue(CarryVT.getScalarSizeInBits());
27264   APInt NegOne = APInt::getAllOnesValue(CarryVT.getScalarSizeInBits());
27948       APInt SplatVal;
31424                                                 const APInt &Demanded,
31444   const APInt &Mask = C->getAPIntValue();
31447   APInt ShrunkMask = Mask & Demanded;
31462   APInt ZeroExtendMask = APInt::getLowBitsSet(Size, Width);
31462   APInt ZeroExtendMask = APInt::getLowBitsSet(Size, Width);
31483                                                       const APInt &DemandedElts,
31511     APInt DemandedElt = APInt::getOneBitSet(SrcVT.getVectorNumElements(),
31511     APInt DemandedElt = APInt::getOneBitSet(SrcVT.getVectorNumElements(),
31548     APInt DemandedLHS, DemandedRHS;
31551     Known.One = APInt::getAllOnesValue(BitWidth * 2);
31552     Known.Zero = APInt::getAllOnesValue(BitWidth * 2);
31626         SmallVector<APInt, 2> DemandedOps(NumOps, APInt(NumElts, 0));
31668     SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG,
31691     APInt DemandedLHS, DemandedRHS;
31709     const APInt &ShiftVal = Op.getConstantOperandAPInt(1);
31720     APInt ShiftVal = Op.getConstantOperandAPInt(1);
31764         SmallVector<APInt, 2> DemandedOps(NumOps, APInt(NumElts, 0));
31946                                      const APInt &Zeroable,
32132     MVT MaskVT, ArrayRef<int> Mask, const APInt &Zeroable,
32413   APInt Zeroable(NumMaskElts, 0);
32632     APInt Zero = APInt::getNullValue(MaskEltSizeInBits);
32632     APInt Zero = APInt::getNullValue(MaskEltSizeInBits);
32633     APInt AllOnes = APInt::getAllOnesValue(MaskEltSizeInBits);
32633     APInt AllOnes = APInt::getAllOnesValue(MaskEltSizeInBits);
32634     APInt UndefElts(NumMaskElts, 0);
32635     SmallVector<APInt, 64> EltBits(NumMaskElts, Zero);
32927   SmallVector<APInt, 16> UndefEltsOps(NumOps);
32928   SmallVector<SmallVector<APInt, 16>, 16> RawBitsOps(NumOps);
32944   APInt UndefElts(NumMaskElts, 0);
32945   APInt ZeroElts(NumMaskElts, 0);
32946   APInt ConstantElts(NumMaskElts, 0);
32947   SmallVector<APInt, 8> ConstantBitData(NumMaskElts,
32948                                         APInt::getNullValue(MaskSizeInBits));
32963     auto &SrcUndefElts = UndefEltsOps[SrcOpIdx];
32970     APInt &Bits = SrcEltBits[SrcMaskIdx];
33055   APInt OpUndef, OpZero;
33056   APInt OpDemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
33056   APInt OpDemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
33634     APInt KnownUndef1, KnownZero1;
33655     APInt KnownUndef0, KnownZero0;
34184     APInt KnownUndef, KnownZero;
34185     APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
34185     APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
34255     SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero,
34255     SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero,
34255     SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero,
34265     APInt LHSUndef, LHSZero;
34266     APInt RHSUndef, RHSZero;
34296     APInt AmtUndef, AmtZero;
34298     APInt AmtElts = APInt::getLowBitsSet(NumAmtElts, NumAmtElts / 2);
34298     APInt AmtElts = APInt::getLowBitsSet(NumAmtElts, NumAmtElts / 2);
34308     APInt SrcUndef;
34328       if (!DemandedElts.intersects(APInt::getLowBitsSet(NumElts, ShiftAmt))) {
34344     APInt DemandedSrc = DemandedElts.lshr(ShiftAmt);
34367       if (!DemandedElts.intersects(APInt::getHighBitsSet(NumElts, ShiftAmt))) {
34383     APInt DemandedSrc = DemandedElts.shl(ShiftAmt);
34397     APInt SrcUndef, SrcZero;
34398     APInt SrcElts = DemandedElts.zextOrTrunc(SrcVT.getVectorNumElements());
34409     APInt DemandedLHS, DemandedRHS;
34412     APInt SrcUndef, SrcZero;
34423       APInt DemandedSrcBits =
34424           APInt::getAllOnesValue(N0.getScalarValueSizeInBits());
34442     APInt DemandedLHS, DemandedRHS;
34445     APInt LHSUndef, LHSZero;
34449     APInt RHSUndef, RHSZero;
34460     APInt DemandedSrc = DemandedElts.zextOrTrunc(SrcVT.getVectorNumElements());
34461     APInt SrcUndef, SrcZero;
34470     APInt SelUndef, SelZero;
34476     APInt LHSUndef, LHSZero;
34481     APInt RHSUndef, RHSZero;
34502     APInt SrcUndef, SrcZero;
34503     APInt SrcElts = APInt::getOneBitSet(SrcVT.getVectorNumElements(), 0);
34503     APInt SrcElts = APInt::getOneBitSet(SrcVT.getVectorNumElements(), 0);
34511     APInt MaskUndef, MaskZero;
34521     APInt MaskUndef, MaskZero;
34530     APInt MaskUndef, MaskZero;
34645   APInt OpUndef, OpZero;
34689     APInt SrcElts = APInt::getNullValue(NumElts);
34689     APInt SrcElts = APInt::getNullValue(NumElts);
34698     APInt SrcUndef, SrcZero;
34708     SDValue Op, const APInt &OriginalDemandedBits,
34709     const APInt &OriginalDemandedElts, KnownBits &Known, TargetLoweringOpt &TLO,
34722     APInt DemandedMask = APInt::getLowBitsSet(64, 32);
34722     APInt DemandedMask = APInt::getLowBitsSet(64, 32);
34752       APInt DemandedMask = OriginalDemandedBits.lshr(ShAmt);
34793       APInt DemandedMask = OriginalDemandedBits << ShAmt;
34817       APInt DemandedMask = OriginalDemandedBits << ShAmt;
34871       APInt DemandedVecBits = OriginalDemandedBits.trunc(VecBitWidth);
34875       APInt KnownUndef, KnownZero;
34876       APInt DemandedVecElts = APInt::getOneBitSet(NumVecElts, Idx);
34876       APInt DemandedVecElts = APInt::getOneBitSet(NumVecElts, Idx);
34909       APInt DemandedVecElts(OriginalDemandedElts);
34917       APInt DemandedSclBits = OriginalDemandedBits.zext(NumSclBits);
34933       APInt DemandedLHS, DemandedRHS;
34937       APInt SignMask = APInt::getSignMask(BitWidth * 2);
34937       APInt SignMask = APInt::getSignMask(BitWidth * 2);
34965     APInt KnownUndef, KnownZero;
34966     APInt DemandedElts = OriginalDemandedBits.zextOrTrunc(NumElts);
34976     if (SimplifyDemandedBits(Src, APInt::getSignMask(SrcBits), DemandedElts,
34993     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
34993     SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
35013   APInt ShuffleUndef, ShuffleZero;
35032       APInt IdentityOp = APInt::getAllOnesValue(NumOps);
35032       APInt IdentityOp = APInt::getAllOnesValue(NumOps);
35043         IdentityOp &= APInt::getOneBitSet(NumOps, Op);
35321   APInt Imm(SrcVT.getVectorNumElements(), 0);
35569     APInt UndefElts;
35570     SmallVector<APInt, 1> EltBits;
35789     Mask = DAG.getConstant(APInt::getSignedMaxValue(MaskEltsBits), DL, SrcVT);
35791     Mask = DAG.getConstant(APInt::getSignedMinValue(MaskEltsBits), DL, SrcVT);
35793     Mask = DAG.getConstant(APInt::getAllOnesValue(MaskEltsBits), DL, SrcVT);
35937     CmpC = DAG.getConstant(APInt::getLowBitsSet(CmpVT.getSizeInBits(), NumElts),
36398     APInt UndefVecElts;
36399     SmallVector<APInt, 16> EltBits;
36414             SDValue(N, 0), APInt::getAllOnesValue(VT.getSizeInBits()), DCI))
36499           APInt MaskBit = APInt::getOneBitSet(NumSrcElts, MaskIdx);
36499           APInt MaskBit = APInt::getOneBitSet(NumSrcElts, MaskIdx);
36685   const APInt &TrueVal = TrueC->getAPIntValue();
36686   const APInt &FalseVal = FalseC->getAPIntValue();
36688   APInt Diff = TrueVal.ssub_ov(FalseVal, OV);
36692   APInt AbsDiff = Diff.abs();
36779   APInt DemandedMask(APInt::getSignMask(BitWidth));
36779   APInt DemandedMask(APInt::getSignMask(BitWidth));
37288   APInt Addend = OpRHSC->getAPIntValue();
37296   APInt Comparison = CmpRHSC->getAPIntValue();
37645         APInt Diff = TrueC->getAPIntValue() - FalseC->getAPIntValue();
38050   APInt Mask17 = APInt::getHighBitsSet(32, 17);
38050   APInt Mask17 = APInt::getHighBitsSet(32, 17);
38095   APInt Mask = APInt::getHighBitsSet(64, 32);
38095   APInt Mask = APInt::getHighBitsSet(64, 32);
38264     APInt Mask = N0.getConstantOperandAPInt(1);
38335   APInt ShlConst = (cast<ConstantSDNode>(N01))->getAPIntValue();
38336   APInt SarConst = (cast<ConstantSDNode>(N1))->getAPIntValue();
38390   APInt MaskVal = AndC->getAPIntValue();
38399   APInt NewMaskVal = MaskVal.lshr(ShiftC->getAPIntValue());
38432   APInt UndefElts0, UndefElts1;
38433   SmallVector<APInt, 32> EltBits0, EltBits1;
38444     APInt Undefs(NumDstElts, 0);
38445     SmallVector<APInt, 32> Bits(NumDstElts, APInt::getNullValue(DstBitsPerElt));
38445     SmallVector<APInt, 32> Bits(NumDstElts, APInt::getNullValue(DstBitsPerElt));
38449         auto &UndefElts = (Elt >= NumSrcEltsPerLane ? UndefElts1 : UndefElts0);
38457         APInt &Val = EltBits[SrcIdx];
38465             Val = APInt::getSignedMinValue(DstBitsPerElt);
38467             Val = APInt::getSignedMaxValue(DstBitsPerElt);
38475             Val = APInt::getNullValue(DstBitsPerElt);
38477             Val = APInt::getAllOnesValue(DstBitsPerElt);
38493          DAG.MaskedValueIsZero(N0, APInt::getHighBitsSet(16, 8)))) {
38528   APInt UndefElts;
38529   SmallVector<APInt, 32> EltBits;
38536   APInt KnownUndef, KnownZero;
38538   APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
38538   APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
38599   APInt UndefElts;
38600   SmallVector<APInt, 32> EltBits;
38605     for (APInt &Elt : EltBits) {
38618                                APInt::getAllOnesValue(NumBitsPerElt), DCI))
38635                                APInt::getAllOnesValue(NumBitsPerElt), DCI))
38895   APInt SplatVal;
39185     APInt HiMask = APInt::getHighBitsSet(64, 32);
39185     APInt HiMask = APInt::getHighBitsSet(64, 32);
39211         APInt AllBits = APInt::getAllOnesValue(NumElts);
39211         APInt AllBits = APInt::getAllOnesValue(NumElts);
39255     APInt UndefElts;
39256     SmallVector<APInt, 64> EltBits;
39311   APInt UndefElts0, UndefElts1;
39312   SmallVector<APInt, 32> EltBits0, EltBits1;
39616         APInt AllBits = APInt::getNullValue(NumElts);
39616         APInt AllBits = APInt::getNullValue(NumElts);
39896   APInt C1, C2;
39934     APInt C;
39941   APInt SignedMax, SignedMin;
39943     SignedMax = APInt::getAllOnesValue(NumDstBits).zext(NumSrcBits);
39946     SignedMax = APInt::getSignedMaxValue(NumDstBits).sext(NumSrcBits);
39947     SignedMin = APInt::getSignedMinValue(NumDstBits).sext(NumSrcBits);
40111       const APInt &Val = C->getAPIntValue();
40471     APInt DemandedMask(APInt::getSignMask(VT.getScalarSizeInBits()));
40471     APInt DemandedMask(APInt::getSignMask(VT.getScalarSizeInBits()));
41038   APInt Mask = APInt::getLowBitsSet(InVT.getScalarSizeInBits(),
41038   APInt Mask = APInt::getLowBitsSet(InVT.getScalarSizeInBits(),
41190   APInt ShiftAmt;
41471   APInt UndefElts;
41472   SmallVector<APInt, 16> EltBits;
41774     const APInt &Val1 = Cst1->getAPIntValue();
41775     APInt MaskedVal1 = Val1 & 0xFFFF;
41782   APInt DemandedMask(APInt::getLowBitsSet(NumBits, 16));
41782   APInt DemandedMask(APInt::getLowBitsSet(NumBits, 16));
41982   APInt KnownUndef, KnownZero;
41983   APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
41983   APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
42090   APInt DemandedMask = APInt::getLowBitsSet(BitWidth, Log2_32(BitWidth));
42090   APInt DemandedMask = APInt::getLowBitsSet(BitWidth, Log2_32(BitWidth));
42388     APInt Bit = APInt::getBitsSet(EltSizeInBits, BitIdx, BitIdx + 1);
42388     APInt Bit = APInt::getBitsSet(EltSizeInBits, BitIdx, BitIdx + 1);
42637     APInt ZeroMask = APInt::getHighBitsSet(NumSrcEltBits, NumSrcEltBits / 2);
42637     APInt ZeroMask = APInt::getHighBitsSet(NumSrcEltBits, NumSrcEltBits / 2);
42908     APInt Imm(32, 0);
42927     APInt NotMask = APInt::getLowBitsSet(NumBits, NumElts);
42927     APInt NotMask = APInt::getLowBitsSet(NumBits, NumElts);
42936   APInt DemandedMask(APInt::getAllOnesValue(NumBits));
42936   APInt DemandedMask(APInt::getAllOnesValue(NumBits));
42949     APInt DemandedMask(APInt::getSignMask(Mask.getScalarValueSizeInBits()));
42949     APInt DemandedMask(APInt::getSignMask(Mask.getScalarValueSizeInBits()));
43060     APInt DemandedMask(APInt::getSignMask(Mask.getScalarValueSizeInBits()));
43060     APInt DemandedMask(APInt::getSignMask(Mask.getScalarValueSizeInBits()));
43375     const APInt &ShAmt = Op.getConstantOperandAPInt(1);
43378       APInt Mask = Op.getOpcode() == ISD::SRL
43379                        ? APInt::getHighBitsSet(BitWidth, MaskBits)
43380                        : APInt::getLowBitsSet(BitWidth, MaskBits);
44189       DAG.getConstant(APInt::getLowBitsSet(ExtType.getScalarSizeInBits(),
44219       const APInt &XorC = Op1.getConstantOperandAPInt(1);
44804   if (TLI.SimplifyDemandedBits(SDValue(N, 0), APInt::getAllOnesValue(64), DCI))
44881   APInt KnownUndef, KnownZero;
44883   APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
44883   APInt DemandedElts = APInt::getAllOnesValue(VT.getVectorNumElements());
lib/Target/X86/X86ISelLowering.h
  692     bool isConstantSplat(SDValue Op, APInt &SplatVal);
  909     bool targetShrinkDemandedConstant(SDValue Op, const APInt &Demanded,
  916                                        const APInt &DemandedElts,
  922                                              const APInt &DemandedElts,
  927                                                  const APInt &DemandedElts,
  928                                                  APInt &KnownUndef,
  929                                                  APInt &KnownZero,
  934                                            const APInt &DemandedBits,
  935                                            const APInt &DemandedElts,
  941         SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
  941         SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts,
 1118     bool shouldConvertConstantLoadToIntImm(const APInt &Imm,
 1510     SDValue BuildSDIVPow2(SDNode *N, const APInt &Divisor, SelectionDAG &DAG,
lib/Target/X86/X86MCInstLower.cpp
 1709 static void printConstant(const APInt &Val, raw_ostream &CS) {
lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
   25                                 APInt &UndefElts,
   77   APInt UndefBits(CstSizeInBits, 0);
   78   APInt MaskBits(CstSizeInBits, 0);
   97     APInt EltUndef = UndefBits.extractBits(MaskEltSizeInBits, BitOffset);
  107     APInt EltBits = MaskBits.extractBits(MaskEltSizeInBits, BitOffset);
  121   APInt UndefElts;
  160   APInt UndefElts;
  197   APInt UndefElts;
  251   APInt UndefElts;
  304   APInt UndefElts;
  330   APInt UndefElts;
lib/Target/X86/X86TargetTransformInfo.cpp
 2926 int X86TTIImpl::getIntImmCost(const APInt &Imm, Type *Ty) {
 2944   APInt ImmVal = Imm;
 2952     APInt Tmp = ImmVal.ashr(ShiftVal).sextOrTrunc(64);
 2960 int X86TTIImpl::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm,
 3057 int X86TTIImpl::getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/X86/X86TargetTransformInfo.h
  179   int getIntImmCost(const APInt &Imm, Type *Ty);
  183   int getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, Type *Ty);
  184   int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm,
lib/Target/XCore/XCoreISelLowering.cpp
  655   APInt HighMask = APInt::getHighBitsSet(64, 32);
  655   APInt HighMask = APInt::getHighBitsSet(64, 32);
 1604         APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 8);
 1604         APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 8);
 1620         APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16);
 1620         APInt DemandedMask = APInt::getLowBitsSet(BitWidth, 16);
 1657       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 1657       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 1679       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 1679       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 1694       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 1694       APInt Mask = APInt::getHighBitsSet(VT.getSizeInBits(),
 1752     APInt HighMask = APInt::getHighBitsSet(64, 32);
 1752     APInt HighMask = APInt::getHighBitsSet(64, 32);
 1817                                                         const APInt &DemandedElts,
 1827       Known.Zero = APInt::getHighBitsSet(Known.getBitWidth(),
 1837         Known.Zero = APInt::getHighBitsSet(Known.getBitWidth(),
 1843         Known.Zero = APInt::getHighBitsSet(Known.getBitWidth(),
 1848         Known.Zero = APInt::getHighBitsSet(Known.getBitWidth(),
 1853         Known.Zero = APInt::getHighBitsSet(Known.getBitWidth(),
lib/Target/XCore/XCoreISelLowering.h
  206                                        const APInt &DemandedElts,
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
  159   APInt Mask;
  164       : Root(nullptr), Mask(APInt::getNullValue(BitWidth)),
  277   APInt Mask55 = APInt::getSplat(Len, APInt(8, 0x55));
  277   APInt Mask55 = APInt::getSplat(Len, APInt(8, 0x55));
  278   APInt Mask33 = APInt::getSplat(Len, APInt(8, 0x33));
  278   APInt Mask33 = APInt::getSplat(Len, APInt(8, 0x33));
  279   APInt Mask0F = APInt::getSplat(Len, APInt(8, 0x0F));
  279   APInt Mask0F = APInt::getSplat(Len, APInt(8, 0x0F));
  280   APInt Mask01 = APInt::getSplat(Len, APInt(8, 0x01));
  280   APInt Mask01 = APInt::getSplat(Len, APInt(8, 0x01));
  281   APInt MaskShift = APInt(Len, Len - 8);
lib/Transforms/IPO/Attributor.cpp
 2535       APInt Offset(IdxWidth, 0);
 3576         APInt TotalSize = SizeT->getValue() * Num->getValue();
lib/Transforms/IPO/LowerTypeTests.cpp
  706     APInt APOffset(DL.getPointerSizeInBits(0), 0);
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  779   const APInt *C1 = nullptr, *C2 = nullptr;
  837   const APInt *C1, *C2;
  898   const APInt *C;
  903   const APInt *C2;
  937     const APInt *C3;
  951 static bool MatchMul(Value *E, Value *&Op, APInt &C) {
  952   const APInt *AI;
  969 static bool MatchRem(Value *E, Value *&Op, APInt &C, bool &IsSigned) {
  970   const APInt *AI;
  991 static bool MatchDiv(Value *E, Value *&Op, APInt &C, bool IsSigned) {
  992   const APInt *AI;
 1012 static bool MulWillOverflow(APInt &C0, APInt &C1, bool IsSigned) {
 1012 static bool MulWillOverflow(APInt &C0, APInt &C1, bool IsSigned) {
 1026   APInt C0, MulOpC;
 1033     APInt C1;
 1039       APInt DivOpC;
 1092   const APInt *C, *NotC;
 1158   const APInt *Thr;
 1231       const APInt &RHSVal = CI->getValue();
 1243         APInt Mask = APInt::getHighBitsSet(TySizeBits, ExtendAmt);
 1243         APInt Mask = APInt::getHighBitsSet(TySizeBits, ExtendAmt);
 1331       const APInt &AddRHSV = CRHS->getValue();
 1334       APInt AddRHSHighBits(~((AddRHSV & -AddRHSV)-1));
 1337       APInt AddRHSHighBitsAnd(AddRHSHighBits & C2->getValue());
 1772   const APInt *Op0C;
 1783       const APInt *ShAmt;
 1900     const APInt *DivC;
 1993   const APInt *ShAmt;
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
   94   const APInt *C;
  130       const APInt &AndRHSV = AndRHS->getValue();
  137         const APInt& AddRHS = OpRHS->getValue();
  165 Value *InstCombiner::insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  165 Value *InstCombiner::insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  295   APInt Mask;
  508     APInt BorD = BCst->getValue() | DCst->getValue();
  509     APInt BandBxorDorE = (BCst->getValue() & (BCst->getValue() ^ DCst->getValue())) |
  690     APInt NewMask = BCst->getValue() & DCst->getValue();
  703     APInt NewMask = BCst->getValue() | DCst->getValue();
  811   const APInt *C1, *C2;
  829   APInt Xor = *C1 ^ *C2;
  937     const APInt *I01, *I1; // powers of two; I1 == I01 << 1
  950   APInt HighestBit;
  972     const APInt *Mask;
  983   APInt UnsetBitsMask;
 1002   APInt SignBitsMask = ~(HighestBit - 1U);
 1010     APInt OtherHighestBit = (~UnsetBitsMask) + 1U;
 1241       APInt Low = APInt::getLowBitsSet(BigBitSize, SmallBitSize);
 1241       APInt Low = APInt::getLowBitsSet(BigBitSize, SmallBitSize);
 1245         APInt N = SmallC->getValue().zext(BigBitSize) | BigC->getValue();
 1751   const APInt *C;
 1762     const APInt *XorC;
 1771     const APInt *OrC;
 1779       APInt Together = *C & *OrC;
 1790       APInt NotAndMask(~(*C));
 1809     const APInt &AndRHSMask = AndRHS->getValue();
 1965     const APInt *ShAmt;
 2227       APInt DiffC = LAddC->getValue() ^ RAddC->getValue();
 2235         APInt RRangeLow = -RAddC->getValue();
 2236         APInt RRangeHigh = RRangeLow + LHSC->getValue();
 2237         APInt LRangeLow = -LAddC->getValue();
 2238         APInt LRangeHigh = LRangeLow + LHSC->getValue();
 2239         APInt LowRangeDiff = RRangeLow ^ LRangeLow;
 2240         APInt HighRangeDiff = RRangeHigh ^ LRangeHigh;
 2241         APInt RangeDiff = LRangeLow.sgt(RRangeLow) ? LRangeLow - RRangeLow
 2485   const APInt *CV;
 2716     const APInt *ShAmt;
 3098     const APInt *RHSC;
 3101       const APInt *C;
 3139             APInt FoldConst = C1->getValue().lshr(C2->getValue());
 3223   const APInt *ShAmt;
lib/Transforms/InstCombine/InstCombineCalls.cpp
  364   APInt Count(64, 0);
  495     APInt ShiftVal = COp->getValue();
  572   APInt MinValue, MaxValue;
  578         APInt::getSignedMinValue(DstScalarSizeInBits).sext(SrcScalarSizeInBits);
  580         APInt::getSignedMaxValue(DstScalarSizeInBits).sext(SrcScalarSizeInBits);
  585     MinValue = APInt::getNullValue(SrcScalarSizeInBits);
  586     MaxValue = APInt::getLowBitsSet(SrcScalarSizeInBits, DstScalarSizeInBits);
  746     APInt APIndex = CIIndex->getValue().zextOrTrunc(6);
  747     APInt APLength = CILength->getValue().zextOrTrunc(6);
  796       APInt Elt = CI0->getValue();
  821                                  APInt APLength, APInt APIndex,
  821                                  APInt APLength, APInt APIndex,
  886     APInt V00 = CI00->getValue();
  887     APInt V10 = CI10->getValue();
  888     APInt Mask = APInt::getLowBitsSet(64, Length).shl(Index);
  888     APInt Mask = APInt::getLowBitsSet(64, Length).shl(Index);
  891     APInt Val = V00 | V10;
  989     APInt Index = cast<ConstantInt>(COp)->getValue();
 1094   APInt DemandedElts = possiblyDemandedEltsInMask(ConstMask);
 1095   APInt UndefElts(DemandedElts.getBitWidth(), 0);
 1132   APInt DemandedElts = possiblyDemandedEltsInMask(ConstMask);
 1133   APInt UndefElts(DemandedElts.getBitWidth(), 0);
 1863     APInt UndefElts(VWidth, 0);
 1864     APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 1864     APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 1877     APInt UndefElts(Width, 0);
 1878     APInt DemandedElts = APInt::getLowBitsSet(Width, DemandedWidth);
 1878     APInt DemandedElts = APInt::getLowBitsSet(Width, DemandedWidth);
 2004     APInt Op2Demanded = APInt::getLowBitsSet(BitWidth, Log2_32_Ceil(BitWidth));
 2004     APInt Op2Demanded = APInt::getLowBitsSet(BitWidth, Log2_32_Ceil(BitWidth));
 2021     const APInt *C0, *C1;
 2029       APInt NewC =
 2098         APInt Min = APSInt::getMinValue(BitWidth, !SI->isSigned());
 2103         APInt Max = APSInt::getMaxValue(BitWidth, !SI->isSigned());
 2123       const APInt *Val, *Val2;
 2124       APInt NewVal;
 2868       APInt UndefElts1(VWidth, 0);
 2869       APInt DemandedElts1 = APInt::getSplat(VWidth,
 2869       APInt DemandedElts1 = APInt::getSplat(VWidth,
 2877       APInt UndefElts2(VWidth, 0);
 2878       APInt DemandedElts2 = APInt::getSplat(VWidth,
 2878       APInt DemandedElts2 = APInt::getSplat(VWidth,
 2983       const APInt &V11 = CI11->getValue();
 2984       APInt Len = V11.zextOrTrunc(6);
 2985       APInt Idx = V11.lshr(8).zextOrTrunc(6);
 3017       APInt Len = CILength->getValue().zextOrTrunc(6);
 3018       APInt Idx = CIIndex->getValue().zextOrTrunc(6);
 3319     if (SimplifyDemandedBits(II, CarryOp, APInt::getOneBitSet(32, 29),
 4241     const APInt &N = Op0C->getValue();
 4242     APInt Size = N.umul_ov(Op1C->getValue(), Overflow);
lib/Transforms/InstCombine/InstCombineCasts.cpp
  367     APInt Mask = APInt::getBitsSetFrom(OrigBitWidth, BitWidth);
  367     APInt Mask = APInt::getBitsSetFrom(OrigBitWidth, BitWidth);
  378     const APInt *Amt;
  390     const APInt *Amt;
  396             APInt::getBitsSetFrom(OrigBitWidth, BitWidth), 0, CxtI)) {
  408     const APInt *Amt;
  559   APInt HiBitMask = APInt::getHighBitsSet(WideWidth, WideWidth - NarrowWidth);
  559   APInt HiBitMask = APInt::getHighBitsSet(WideWidth, WideWidth - NarrowWidth);
  738     const APInt *C;
  741       APInt MaskC = APInt(SrcTy->getScalarSizeInBits(), 1).shl(*C);
  748       APInt MaskC = APInt(SrcTy->getScalarSizeInBits(), 1).shl(*C) | 1;
  851   const APInt *Op1CV;
  889       APInt KnownZeroMask(~Known.Zero);
  936         APInt KnownBits = KnownLHS.Zero | KnownLHS.One;
  937         APInt UnknownBit = ~KnownBits;
 1017                                APInt::getHighBitsSet(VSize, BitsToClear),
 1033     const APInt *Amt;
 1046     const APInt *Amt;
 1127                           APInt::getHighBitsSet(DestBitSize,
 1134                                APInt::getLowBitsSet(DestBitSize, SrcBitsKept));
 1155       APInt AndValue(APInt::getLowBitsSet(SrcSize, MidSize));
 1155       APInt AndValue(APInt::getLowBitsSet(SrcSize, MidSize));
 1162       APInt AndValue(APInt::getLowBitsSet(SrcSize, MidSize));
 1162       APInt AndValue(APInt::getLowBitsSet(SrcSize, MidSize));
 1168       APInt AndValue(APInt::getLowBitsSet(DstSize, MidSize));
 1168       APInt AndValue(APInt::getLowBitsSet(DstSize, MidSize));
 1255       APInt KnownZeroMask(~Known.Zero);
lib/Transforms/InstCombine/InstCombineCompares.cpp
   39 static bool addWithOverflow(APInt &Result, const APInt &In1,
   39 static bool addWithOverflow(APInt &Result, const APInt &In1,
   40                             const APInt &In2, bool IsSigned = false) {
   52 static bool subWithOverflow(APInt &Result, const APInt &In1,
   52 static bool subWithOverflow(APInt &Result, const APInt &In1,
   53                             const APInt &In2, bool IsSigned = false) {
   76 static bool isSignTest(ICmpInst::Predicate &Pred, const APInt &C) {
  103                                                    APInt &Min, APInt &Max) {
  103                                                    APInt &Min, APInt &Max) {
  107   APInt UnknownBits = ~(Known.Zero|Known.One);
  125                                                      APInt &Min, APInt &Max) {
  125                                                      APInt &Min, APInt &Max) {
  129   APInt UnknownBits = ~(Known.Zero|Known.One);
 1102 Instruction *InstCombiner::foldICmpAddOpConst(Value *X, const APInt &C,
 1114                                    APInt::getMaxValue(C.getBitWidth()) - C);
 1125   APInt SMax = APInt::getSignedMaxValue(C.getBitWidth());
 1125   APInt SMax = APInt::getSignedMaxValue(C.getBitWidth());
 1153                                                  const APInt &AP1,
 1154                                                  const APInt &AP2) {
 1212                                                  const APInt &AP1,
 1213                                                  const APInt &AP2) {
 1281       CI1->getValue() != APInt::getLowBitsSet(CI1->getBitWidth(), NewWidth))
 1486   const APInt *C, *DomC;
 1518     if (const APInt *EqC = Intersection.getSingleElement())
 1520     if (const APInt *NeC = Difference.getSingleElement())
 1530                                                  const APInt &C) {
 1551       APInt NewRHS = C.zext(SrcBits);
 1552       NewRHS |= Known.One & APInt::getHighBitsSet(SrcBits, SrcBits - DstBits);
 1563                                                const APInt &C) {
 1566   const APInt *XorC;
 1634                                             const APInt &C1, const APInt &C2) {
 1634                                             const APInt &C1, const APInt &C2) {
 1646   const APInt *C3;
 1674       APInt NewCst = IsShl ? C1.lshr(*C3) : C1.shl(*C3);
 1675       APInt SameAsC1 = IsShl ? NewCst.shl(*C3) : NewCst.lshr(*C3);
 1687         APInt NewAndCst = IsShl ? C2.lshr(*C3) : C2.shl(*C3);
 1718                                                  const APInt &C1) {
 1728   const APInt *C2;
 1827                                                const APInt &C) {
 1861   const APInt *C2;
 1880                                               const APInt &C) {
 1942                                                const APInt &C) {
 1943   const APInt *MulC;
 1962                                    const APInt &C) {
 2025                                                const APInt &C) {
 2026   const APInt *ShiftVal;
 2030   const APInt *ShiftAmt;
 2050       APInt ShiftedC = C.ashr(*ShiftAmt);
 2055       APInt ShiftedC = C.ashr(*ShiftAmt);
 2064       APInt ShiftedC = (C - 1).ashr(*ShiftAmt) + 1;
 2080       APInt ShiftedC = C.lshr(*ShiftAmt);
 2085       APInt ShiftedC = C.lshr(*ShiftAmt);
 2094       APInt ShiftedC = (C - 1).lshr(*ShiftAmt) + 1;
 2103         APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt->getZExtValue()));
 2115         APInt::getOneBitSet(TypeBits, TypeBits - ShiftAmt->getZExtValue() - 1));
 2165                                                const APInt &C) {
 2174   const APInt *ShiftVal;
 2178   const APInt *ShiftAmt;
 2200       APInt ShiftedC = C.shl(ShAmtVal);
 2206       APInt ShiftedC = (C + 1).shl(ShAmtVal) - 1;
 2215       APInt ShiftedC = C.shl(ShAmtVal);
 2221       APInt ShiftedC = (C + 1).shl(ShAmtVal) - 1;
 2247     APInt Val(APInt::getHighBitsSet(TypeBits, TypeBits - ShAmtVal));
 2247     APInt Val(APInt::getHighBitsSet(TypeBits, TypeBits - ShAmtVal));
 2258                                                 const APInt &C) {
 2272   const APInt *DivisorC;
 2278   APInt SignMask = APInt::getSignMask(Ty->getScalarSizeInBits());
 2278   APInt SignMask = APInt::getSignMask(Ty->getScalarSizeInBits());
 2297                                                 const APInt &C) {
 2298   const APInt *C2;
 2326                                                const APInt &C) {
 2333   const APInt *C2;
 2361   APInt Prod = C * *C2;
 2372   APInt RangeSize = Div->isExact() ? APInt(C2->getBitWidth(), 1) : *C2;
 2382   APInt LoBound, HiBound;
 2408         APInt DivNeg = -RangeSize;
 2496                                                const APInt &C) {
 2499   const APInt *C2;
 2500   APInt SubResult;
 2558                                                const APInt &C) {
 2560   const APInt *C2;
 2580     APInt NewC =
 2591   const APInt &Upper = CR.getUpper();
 2592   const APInt &Lower = CR.getLower();
 2788   const APInt *C;
 2820   const APInt *C;
 2906                                                              const APInt &C) {
 2921       const APInt *BOC;
 2931     const APInt *BOC;
 2966       const APInt *BOC;
 2978     const APInt *BOC;
 2990     const APInt *BOC;
 3001       const APInt *BOC;
 3026                                                            const APInt &C) {
 3052       APInt Mask1 = IsTrailing ? APInt::getLowBitsSet(BitWidth, Num + 1)
 3052       APInt Mask1 = IsTrailing ? APInt::getLowBitsSet(BitWidth, Num + 1)
 3053                                : APInt::getHighBitsSet(BitWidth, Num + 1);
 3054       APInt Mask2 = IsTrailing
 3055         ? APInt::getOneBitSet(BitWidth, Num)
 3056         : APInt::getOneBitSet(BitWidth, BitWidth - Num - 1);
 3111                                                          const APInt &C) {
 3122       APInt Limit = APInt::getOneBitSet(BitWidth, BitWidth - Num - 1);
 3122       APInt Limit = APInt::getOneBitSet(BitWidth, BitWidth - Num - 1);
 3131       APInt Limit = APInt::getLowBitsSet(BitWidth, BitWidth - Num);
 3131       APInt Limit = APInt::getLowBitsSet(BitWidth, BitWidth - Num);
 3144       APInt Mask = APInt::getLowBitsSet(BitWidth, C.getLimitedValue() + 1);
 3144       APInt Mask = APInt::getLowBitsSet(BitWidth, C.getLimitedValue() + 1);
 3153       APInt Mask = APInt::getLowBitsSet(BitWidth, C.getLimitedValue());
 3153       APInt Mask = APInt::getLowBitsSet(BitWidth, C.getLimitedValue());
 3383   const APInt *C0, *C1; // FIXME: non-splats, potentially with undef.
 3400   const APInt &MaskedBits = *C0;
 3424   const APInt BitWidth = APInt(XBitWidth, XBitWidth);
 3428   const APInt KeptBits = BitWidth - MaskedBits;
 3431   const APInt ICmpCst = APInt(XBitWidth, 1).shl(KeptBits);
 3434   const APInt AddCst = ICmpCst.lshr(1);
 3572           APInt AdjNewShAmt =
 3824         const APInt &AP1 = C1->getValue();
 3825         const APInt &AP2 = C2->getValue();
 3827           APInt AP1Abs = C1->getValue().abs();
 3828           APInt AP2Abs = C2->getValue().abs();
 3937       const APInt *C;
 3960       const APInt *C;
 3968               APInt::getLowBitsSet(C->getBitWidth(), C->getBitWidth() - TZs));
 4201     APInt Pow2 = Cst1->getValue() + 1;
 4219       APInt CmpVal = APInt::getOneBitSet(TypeBits, ShAmt);
 4219       APInt CmpVal = APInt::getOneBitSet(TypeBits, ShAmt);
 4231       APInt AndVal = APInt::getLowBitsSet(TypeBits, TypeBits - ShAmt);
 4231       APInt AndVal = APInt::getLowBitsSet(TypeBits, TypeBits - ShAmt);
 4250       APInt MaskV =
 4251           APInt::getLowBitsSet(ASize, Op0->getType()->getPrimitiveSizeInBits());
 4254       APInt CmpV = Cst1->getValue().zext(ASize);
 4578           const APInt &CVal = CI->getValue();
 4616       const APInt &CVal = CI->getValue() + 1;
 4630       APInt MaxVal = APInt::getMaxValue(MulWidth);
 4630       APInt MaxVal = APInt::getMaxValue(MulWidth);
 4642       APInt MaxVal = APInt::getOneBitSet(CI->getBitWidth(), MulWidth);
 4642       APInt MaxVal = APInt::getOneBitSet(CI->getBitWidth(), MulWidth);
 4653       APInt MaxVal = APInt::getMaxValue(MulWidth);
 4653       APInt MaxVal = APInt::getMaxValue(MulWidth);
 4665       APInt MaxVal = APInt::getOneBitSet(CI->getBitWidth(), MulWidth);
 4665       APInt MaxVal = APInt::getOneBitSet(CI->getBitWidth(), MulWidth);
 4707         APInt ShortMask = CI->getValue().trunc(MulWidth);
 4757 static APInt getDemandedBitsLHSMask(ICmpInst &I, unsigned BitWidth) {
 4758   const APInt *RHS;
 4760     return APInt::getAllOnesValue(BitWidth);
 4766     return APInt::getSignMask(BitWidth);
 4774     return APInt::getBitsSetFrom(BitWidth, RHS->countTrailingOnes());
 4779     return APInt::getBitsSetFrom(BitWidth, RHS->countTrailingZeros());
 4782     return APInt::getAllOnesValue(BitWidth);
 4946   if (SimplifyDemandedBits(&I, 1, APInt::getAllOnesValue(BitWidth),
 4953   APInt Op0Min(BitWidth, 0), Op0Max(BitWidth, 0);
 4954   APInt Op1Min(BitWidth, 0), Op1Max(BitWidth, 0);
 4987     APInt Op0KnownZeroInverted = ~Op0Known.Zero;
 4991       const APInt *LHSC;
 4998         APInt ValToCheck = Op0KnownZeroInverted;
 5017       const APInt *CI;
 5037     const APInt *CmpC;
 5059     const APInt *CmpC;
 5080     const APInt *CmpC;
 5095     const APInt *CmpC;
 5460   const APInt *C;
 5532       const APInt *C;
 5583     const APInt *C;
 5716     SMax.convertFromAPInt(APInt::getSignedMaxValue(IntWidth), true,
 5728     UMax.convertFromAPInt(APInt::getMaxValue(IntWidth), false,
 5741     SMin.convertFromAPInt(APInt::getSignedMinValue(IntWidth), true,
 5752     SMin.convertFromAPInt(APInt::getMinValue(IntWidth), true,
lib/Transforms/InstCombine/InstCombineInternal.h
  119 inline bool isSignBitCheck(ICmpInst::Predicate Pred, const APInt &RHS,
  739   bool MaskedValueIsZero(const Value *V, const APInt &Mask, unsigned Depth = 0,
  833   Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, KnownBits &Known,
  836                             const APInt &DemandedMask, KnownBits &Known,
  843                                          const APInt &DemandedMask,
  850       Instruction *Shr, const APInt &ShrOp1, Instruction *Shl,
  851       const APInt &ShlOp1, const APInt &DemandedMask, KnownBits &Known);
  851       const APInt &ShlOp1, const APInt &DemandedMask, KnownBits &Known);
  858                                                APInt DemandedElts,
  861   Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
  862                                     APInt &UndefElts, unsigned Depth = 0,
  910   Instruction *foldICmpAddOpConst(Value *X, const APInt &C,
  930                                      const APInt &C);
  932                                    const APInt &C);
  934                                    const APInt &C);
  936                                   const APInt &C);
  938                                    const APInt &C);
  940                                    const APInt &C);
  942                                    const APInt &C);
  944                                     const APInt &C);
  946                                     const APInt &C);
  948                                    const APInt &C);
  950                                    const APInt &C);
  952                                    const APInt &C);
  954                                      const APInt &C1);
  956                                 const APInt &C1, const APInt &C2);
  956                                 const APInt &C1, const APInt &C2);
  957   Instruction *foldICmpShrConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
  958                                      const APInt &C2);
  959   Instruction *foldICmpShlConstConst(ICmpInst &I, Value *ShAmt, const APInt &C1,
  960                                      const APInt &C2);
  964                                                  const APInt &C);
  966                                              const APInt &C);
  968                                                const APInt &C);
  982   Value *insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  982   Value *insertRangeTest(Value *V, const APInt &Lo, const APInt &Hi,
  999   Value *Descale(Value *Val, APInt Scale, bool &NoSignedWrap);
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  103   const APInt *IVal;
  198     const APInt *IVal;
  222           const APInt *V;
  237       const APInt &   Val = CI->getValue();
  238       const APInt &PosVal = Val.abs();
  370   const APInt *C;
  647 static bool multiplyOverflows(const APInt &C1, const APInt &C2, APInt &Product,
  647 static bool multiplyOverflows(const APInt &C1, const APInt &C2, APInt &Product,
  647 static bool multiplyOverflows(const APInt &C1, const APInt &C2, APInt &Product,
  655 static bool isMultiple(const APInt &C1, const APInt &C2, APInt &Quotient,
  655 static bool isMultiple(const APInt &C1, const APInt &C2, APInt &Quotient,
  655 static bool isMultiple(const APInt &C1, const APInt &C2, APInt &Quotient,
  667   APInt Remainder(C1.getBitWidth(), /*val=*/0ULL, IsSigned);
  669     APInt::sdivrem(C1, C2, Quotient, Remainder);
  671     APInt::udivrem(C1, C2, Quotient, Remainder);
  696   const APInt *C2;
  699     const APInt *C1;
  704       APInt Product(C1->getBitWidth(), /*val=*/0ULL, IsSigned);
  712       APInt Quotient(C1->getBitWidth(), /*val=*/0ULL, IsSigned);
  736       APInt Quotient(C1->getBitWidth(), /*val=*/0ULL, IsSigned);
  737       APInt C1Shifted = APInt::getOneBitSet(
  737       APInt C1Shifted = APInt::getOneBitSet(
  968   const APInt *C1, *C2;
  972     APInt C2ShlC1 = C2->ushl_ov(*C1, Overflow);
 1072   const APInt *Op1C;
 1117   APInt Mask(APInt::getSignMask(I.getType()->getScalarSizeInBits()));
 1117   APInt Mask(APInt::getSignMask(I.getType()->getScalarSizeInBits()));
 1324         const APInt *Op1Int;
 1408     const APInt *Y;
 1424   APInt Mask(APInt::getSignMask(I.getType()->getScalarSizeInBits()));
 1424   APInt Mask(APInt::getSignMask(I.getType()->getScalarSizeInBits()));
lib/Transforms/InstCombine/InstCombineSelect.cpp
  125   const APInt *SelTC, *SelFC;
  136   APInt AndMask;
  144     const APInt *AndRHS;
  164   APInt TC = *SelTC;
  165   APInt FC = *SelFC;
  203   const APInt &ValC = !TC.isNullValue() ? TC : FC;
  263 static APInt getSelectFoldableConstant(BinaryOperator *I) {
  273     return APInt::getNullValue(I->getType()->getScalarSizeInBits());
  275     return APInt::getAllOnesValue(I->getType()->getScalarSizeInBits());
  415 static bool isSelect01(const APInt &C1I, const APInt &C2I) {
  415 static bool isSelect01(const APInt &C1I, const APInt &C2I) {
  439           APInt CI = getSelectFoldableConstant(TVI);
  443           const APInt *OOpC;
  470           APInt CI = getSelectFoldableConstant(FVI);
  474           const APInt *OOpC;
  607     const APInt *C1;
  632   const APInt *C2;
  658     APInt C1 = APInt::getOneBitSet(V->getType()->getScalarSizeInBits(), C1Log);
  658     APInt C1 = APInt::getOneBitSet(V->getType()->getScalarSizeInBits(), C1Log);
  737   const APInt *C, *CmpC;
  902   const APInt *CmpC;
 1207                                   APInt::getAllOnesValue(
 1267                                   APInt::getSignedMaxValue(
 1429     APInt MinSignedValue = APInt::getSignedMinValue(BitWidth);
 1429     APInt MinSignedValue = APInt::getSignedMinValue(BitWidth);
 1431     const APInt *Y, *C;
 1562     const APInt *CB, *CC;
 1986   const APInt *C1, *C2;
 2000     APInt Diff = C2->ssub_ov(*C1, Overflow);
 2023   const APInt *MinValue, *MaxValue;
 2636     APInt UndefElts(VWidth, 0);
 2637     APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 2637     APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
lib/Transforms/InstCombine/InstCombineShifts.cpp
  328   const APInt *B;
  349   const APInt *InnerShiftConst;
  377     APInt Mask = APInt::getLowBitsSet(TypeWidth, OuterShAmt) << MaskShift;
  377     APInt Mask = APInt::getLowBitsSet(TypeWidth, OuterShAmt) << MaskShift;
  476   const APInt *C1;
  507     APInt Mask = IsInnerShl
  508                      ? APInt::getLowBitsSet(TypeWidth, TypeWidth - OuterShAmt)
  509                      : APInt::getHighBitsSet(TypeWidth, TypeWidth - OuterShAmt);
  606   const APInt *Op1C;
  655       APInt MaskV(APInt::getLowBitsSet(SrcSize, DstSize));
  655       APInt MaskV(APInt::getLowBitsSet(SrcSize, DstSize));
  701           APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val);
  701           APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val);
  736           APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val);
  736           APInt Bits = APInt::getHighBitsSet(TypeBits, TypeBits - Op1Val);
  764       const APInt *Op0C;
  807       const APInt *C;
  826       const APInt *C;
  865   const APInt *ShAmtAPInt;
  875           MaskedValueIsZero(X, APInt::getHighBitsSet(SrcWidth, ShAmt), 0, &I))
  881       APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmt));
  881       APInt Mask(APInt::getHighBitsSet(BitWidth, BitWidth - ShAmt));
  887     const APInt *ShOp1;
  918         MaskedValueIsZero(Op0, APInt::getHighBitsSet(BitWidth, ShAmt), 0, &I)) {
  962         ConstantInt::get(Ty, APInt::getSignMask(BitWidth)), X);
  980   const APInt *ShAmtAPInt;
  999     const APInt *ShOp1;
 1012         APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt));
 1012         APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt));
 1026         APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt));
 1026         APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt));
 1031       APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt));
 1031       APInt Mask(APInt::getLowBitsSet(BitWidth, BitWidth - ShAmt));
 1079         MaskedValueIsZero(Op0, APInt::getLowBitsSet(BitWidth, ShAmt), 0, &I)) {
 1179   const APInt *ShAmtAPInt;
 1193     const APInt *ShOp1;
 1233         MaskedValueIsZero(Op0, APInt::getLowBitsSet(BitWidth, ShAmt), 0, &I)) {
 1243   if (MaskedValueIsZero(Op0, APInt::getSignMask(BitWidth), 0, &I))
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
   40                                    const APInt &Demanded) {
   46   const APInt *C;
   67   APInt DemandedMask(APInt::getAllOnesValue(BitWidth));
   67   APInt DemandedMask(APInt::getAllOnesValue(BitWidth));
   81                                         const APInt &DemandedMask,
  116 Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
  175     APInt IKnownZero = RHSKnown.Zero | LHSKnown.Zero;
  177     APInt IKnownOne = RHSKnown.One & LHSKnown.One;
  209     APInt IKnownZero = RHSKnown.Zero & LHSKnown.Zero;
  211     APInt IKnownOne = RHSKnown.One | LHSKnown.One;
  241     APInt IKnownZero = (RHSKnown.Zero & LHSKnown.Zero) |
  244     APInt IKnownOne =  (RHSKnown.Zero & LHSKnown.One) |
  297         APInt NewMask = ~(LHSKnown.One & RHSKnown.One & DemandedMask);
  323       const APInt *C;
  332       const APInt *C;
  364     APInt InputDemandedMask = DemandedMask.zextOrTrunc(SrcBitWidth);
  399     APInt InputDemandedBits = DemandedMask.trunc(SrcBitWidth);
  432     APInt DemandedFromOps(APInt::getLowBitsSet(BitWidth, BitWidth-NLZ));
  432     APInt DemandedFromOps(APInt::getLowBitsSet(BitWidth, BitWidth-NLZ));
  466     const APInt *SA;
  468       const APInt *ShrAmt;
  476       APInt DemandedMaskIn(DemandedMask.lshr(ShiftAmt));
  497     const APInt *SA;
  502       APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt));
  536     const APInt *SA;
  541       APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt));
  559       APInt HighBits(APInt::getHighBitsSet(
  559       APInt HighBits(APInt::getHighBitsSet(
  581     const APInt *SA;
  589       APInt DemandedMaskIn =
  590           APInt::getHighBitsSet(BitWidth, BitWidth - RHSTrailingZeros);
  606       APInt RA = Rem->getValue().abs();
  611         APInt LowBits = RA - 1;
  612         APInt Mask2 = LowBits | APInt::getSignMask(BitWidth);
  612         APInt Mask2 = LowBits | APInt::getSignMask(BitWidth);
  646     APInt AllOnes = APInt::getAllOnesValue(BitWidth);
  646     APInt AllOnes = APInt::getAllOnesValue(BitWidth);
  652     Known.Zero = APInt::getHighBitsSet(BitWidth, Leaders) & DemandedMask;
  693         const APInt *SA;
  703         APInt DemandedMaskLHS(DemandedMask.lshr(ShiftAmt));
  704         APInt DemandedMaskRHS(DemandedMask.shl(BitWidth - ShiftAmt));
  735         APInt DemandedElts = DemandedMask.zextOrTrunc(ArgWidth);
  763                                                      const APInt &DemandedMask,
  785     APInt IKnownZero = RHSKnown.Zero | LHSKnown.Zero;
  787     APInt IKnownOne = RHSKnown.One & LHSKnown.One;
  816     APInt IKnownZero = RHSKnown.Zero & LHSKnown.Zero;
  818     APInt IKnownOne = RHSKnown.One | LHSKnown.One;
  846     APInt IKnownZero = (RHSKnown.Zero & LHSKnown.Zero) |
  849     APInt IKnownOne =  (RHSKnown.Zero & LHSKnown.One) |
  904 InstCombiner::simplifyShrShlDemandedBits(Instruction *Shr, const APInt &ShrOp1,
  905                                          Instruction *Shl, const APInt &ShlOp1,
  906                                          const APInt &DemandedMask,
  924   APInt BitMask1(APInt::getAllOnesValue(BitWidth));
  924   APInt BitMask1(APInt::getAllOnesValue(BitWidth));
  925   APInt BitMask2(APInt::getAllOnesValue(BitWidth));
  925   APInt BitMask2(APInt::getAllOnesValue(BitWidth));
  972                                                            APInt DemandedElts,
 1089 Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts,
 1090                                                 APInt &UndefElts,
 1094   APInt EltMask(APInt::getAllOnesValue(VWidth));
 1094   APInt EltMask(APInt::getAllOnesValue(VWidth));
 1180   APInt UndefElts2(VWidth, 0);
 1181   APInt UndefElts3(VWidth, 0);
 1210         APInt UndefEltsOp(VWidth, 0);
 1232     APInt PreInsertDemandedElts = DemandedElts;
 1253     APInt LeftDemanded(LHSVWidth, 0), RightDemanded(LHSVWidth, 0);
 1268     APInt LHSUndefElts(LHSVWidth, 0);
 1271     APInt RHSUndefElts(LHSVWidth, 0);
 1369     APInt DemandedLHS(DemandedElts), DemandedRHS(DemandedElts);
 1400     APInt InputDemandedElts(InVWidth, 0);
 1446         APInt SubUndef = UndefElts2.lshr(OutIdx * Ratio).zextOrTrunc(Ratio);
 1469       APInt DemandedPtrs(APInt::getAllOnesValue(VWidth)),
 1469       APInt DemandedPtrs(APInt::getAllOnesValue(VWidth)),
 1555       APInt DemandedElts2 = DemandedElts;
 1636         APInt OpDemandedElts(InnerVWidth, 0);
 1647         APInt OpUndefElts(InnerVWidth, 0);
 1653           APInt LaneElts = OpUndefElts.lshr(InnerVWidthPerLane * Lane);
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  257 static APInt findDemandedEltsBySingleUser(Value *V, Instruction *UserInstr) {
  261   APInt UsedElts(APInt::getAllOnesValue(VWidth));
  261   APInt UsedElts(APInt::getAllOnesValue(VWidth));
  269       UsedElts = APInt::getOneBitSet(VWidth, EEIIndexC->getZExtValue());
  300 static APInt findDemandedEltsByAllUsers(Value *V) {
  303   APInt UnionUsedElts(VWidth, 0);
  308       UnionUsedElts = APInt::getAllOnesValue(VWidth);
  341         APInt UndefElts(NumElts, 0);
  342         APInt DemandedElts(NumElts, 0);
  352         APInt DemandedElts = findDemandedEltsByAllUsers(SrcVec);
  354           APInt UndefElts(NumElts, 0);
 1098   APInt UndefElts(VWidth, 0);
 1099   APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 1099   APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 1458       const APInt *C;
 1933   APInt UndefElts(VWidth, 0);
 1934   APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 1934   APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
lib/Transforms/InstCombine/InstructionCombining.cpp
  213   const APInt *BVal, *CVal;
  626           const APInt *CInt;
 1162 Value *InstCombiner::Descale(Value *Val, APInt Scale, bool &NoSignedWrap) {
 1213       APInt Quotient(Scale), Remainder(Scale); // Init ensures right bitwidth.
 1214       APInt::sdivrem(CI->getValue(), Scale, Quotient, Remainder);
 1299         APInt SmallScale = Scale.trunc(SmallSize);
 1628     APInt UndefElts(VWidth, 0);
 1629     APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 1629     APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth));
 2190     APInt Offset(OffsetBits, 0);
 2238     APInt BasePtrOffset(IdxWidth, 0);
 2245         APInt AllocSize(IdxWidth, DL.getTypeAllocSize(AI->getAllocatedType()));
 2635       APInt TruncatedCase = Case.getCaseValue()->getValue().trunc(NewWidth);
lib/Transforms/Instrumentation/MemorySanitizer.cpp
 2146           const APInt &V = Elt->getValue();
 2147           APInt V2 = APInt(V.getBitWidth(), 1) << V.countTrailingZeros();
 2156         const APInt &V = Elt->getValue();
 2157         APInt V2 = APInt(V.getBitWidth(), 1) << V.countTrailingZeros();
lib/Transforms/Scalar/ConstantHoisting.cpp
  406   APInt Offset(DL->getTypeSizeInBits(PtrIntTy), /*val*/0, /*isSigned*/true);
  511 static Optional<APInt> calculateOffsetDiff(const APInt &V1, const APInt &V2) {
  511 static Optional<APInt> calculateOffsetDiff(const APInt &V1, const APInt &V2) {
  511 static Optional<APInt> calculateOffsetDiff(const APInt &V1, const APInt &V2) {
  512   Optional<APInt> Res = None;
  568     auto Value = ConstCand->ConstInt->getValue();
  582         Optional<APInt> Diff = calculateOffsetDiff(
  627     APInt Diff = ConstCand->ConstInt->getValue() - ConstInt->getValue();
  678       APInt Diff = CC->ConstInt->getValue() - MinValItr->ConstInt->getValue();
lib/Transforms/Scalar/DeadStoreElimination.cpp
 1230             APInt EarlierValue =
 1232             APInt LaterValue =
 1244             APInt Mask =
 1245                 APInt::getBitsSet(EarlierValue.getBitWidth(), LShiftAmount,
 1249             APInt Merged =
lib/Transforms/Scalar/Float2Int.cpp
  258         auto Zero = ConstantRange(APInt::getNullValue(Size));
lib/Transforms/Scalar/GuardWidening.cpp
  223     const APInt &getOffsetValue() const { return getOffset()->getValue(); }
  565       APInt NewRHSAP;
  668       APInt NewOffset = Check.getOffsetValue() + OpRHS->getValue();
  676         APInt NewOffset = Check.getOffsetValue() + OpRHS->getValue();
  729             .ugt(APInt::getSignedMinValue(BitWidth)))
  732     APInt MaxDiff = MaxOffset->getValue() - MinOffset->getValue();
  733     const APInt &HighOffset = MaxOffset->getValue();
lib/Transforms/Scalar/IndVarSimplify.cpp
 1825   const APInt *NarrowDefRHS;
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  378     const SCEV *SIntMax = SE.getConstant(APInt::getSignedMaxValue(BitWidth));
  678   APInt Min = IsSigned ? APInt::getSignedMinValue(BitWidth) :
  678   APInt Min = IsSigned ? APInt::getSignedMinValue(BitWidth) :
  679     APInt::getMinValue(BitWidth);
  726   APInt Max = IsSigned ? APInt::getSignedMaxValue(BitWidth) :
  726   APInt Max = IsSigned ? APInt::getSignedMaxValue(BitWidth) :
  727     APInt::getMaxValue(BitWidth);
 1612   const SCEV *SIntMax = SE.getConstant(APInt::getSignedMaxValue(BitWidth));
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  422 static APInt getStoreStride(const SCEVAddRecExpr *StoreEv) {
  541     APInt Stride = getStoreStride(StoreEv);
  679     APInt FirstStride = getStoreStride(FirstStoreEv);
  715       APInt SecondStride = getStoreStride(SecondStoreEv);
  785     APInt Stride = getStoreStride(StoreEv);
  836   APInt Stride = ConstStride->getAPInt();
 1061   APInt Stride = getStoreStride(StoreEv);
lib/Transforms/Scalar/LoopLoadElimination.cpp
  126     const APInt &Val = Dist->getAPInt();
lib/Transforms/Scalar/LoopStrengthReduce.cpp
  668     const APInt &RA = RC->getAPInt();
  682     const APInt &LA = C->getAPInt();
  683     const APInt &RA = RC->getAPInt();
 3817         const APInt &StepInt = StepRec->getAPInt();
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
  104   const APInt &ExpectedPhiValue = ExpectedValue->getValue();
  145     APInt Result = Value;
lib/Transforms/Scalar/MergeICmps.cpp
   82   BCEAtom(GetElementPtrInst *GEP, LoadInst *LoadI, int BaseId, APInt Offset)
  116   APInt Offset;
  171   APInt Offset = APInt(DL.getPointerTypeSizeInBits(GEP->getType()), 0);
lib/Transforms/Scalar/Reassociate.cpp
  104   const APInt &getConstPart() const { return ConstPart; }
  112   APInt ConstPart;
  127     const APInt *C;
  141   ConstPart = APInt::getNullValue(V->getType()->getScalarSizeInBits());
  303 static void IncorporateWeight(APInt &LHS, const APInt &RHS, unsigned Opcode) {
  303 static void IncorporateWeight(APInt &LHS, const APInt &RHS, unsigned Opcode) {
  354     APInt CM = APInt::getOneBitSet(Bitwidth, CarmichaelShift(Bitwidth));
  354     APInt CM = APInt::getOneBitSet(Bitwidth, CarmichaelShift(Bitwidth));
  356     APInt Threshold = CM + Bitwidth;
  376 using RepeatedValue = std::pair<Value*, APInt>;
  471   SmallVector<std::pair<Instruction*, APInt>, 8> Worklist; // (Op, Weight)
  490   using LeafMap = DenseMap<Value *, APInt>;
  498     std::pair<Instruction*, APInt> P = Worklist.pop_back_val();
  503       APInt Weight = P.second; // Number of paths to this operand.
  611     APInt Weight = It->second;
 1182                              const APInt &ConstOpnd) {
 1203                                      APInt &ConstOpnd, Value *&Res) {
 1214   const APInt &C1 = Opnd1->getConstPart();
 1237                                      XorOpnd *Opnd2, APInt &ConstOpnd,
 1260     const APInt &C1 = Opnd1->getConstPart();
 1261     const APInt &C2 = Opnd2->getConstPart();
 1262     APInt C3((~C1) ^ C2);
 1276     const APInt &C1 = Opnd1->getConstPart();
 1277     const APInt &C2 = Opnd2->getConstPart();
 1278     APInt C3 = C1 ^ C2;
 1292     const APInt &C1 = Opnd1->getConstPart();
 1293     const APInt &C2 = Opnd2->getConstPart();
 1294     APInt C3 = C1 ^ C2;
 1322   APInt ConstOpnd(Ty->getScalarSizeInBits(), 0);
 1327     const APInt *C;
lib/Transforms/Scalar/SROA.cpp
  673   void insertUse(Instruction &I, const APInt &Offset, uint64_t Size,
  735       APInt GEPOffset = Offset;
  753           APInt Index = OpC->getValue().sextOrTrunc(Offset.getBitWidth());
  769   void handleLoadOrStore(Type *Ty, Instruction &I, const APInt &Offset,
 1204   APInt MaxSize(APWidth, 0);
 1465                                        Value *Ptr, Type *Ty, APInt &Offset,
 1486     APInt ElementSize(Offset.getBitWidth(), ElementSizeInBits / 8);
 1487     APInt NumSkippedElements = Offset.sdiv(ElementSize);
 1498     APInt ElementSize(Offset.getBitWidth(), DL.getTypeAllocSize(ElementTy));
 1499     APInt NumSkippedElements = Offset.sdiv(ElementSize);
 1539                                       Value *Ptr, APInt Offset, Type *TargetTy,
 1552   APInt ElementSize(Offset.getBitWidth(), DL.getTypeAllocSize(ElementTy));
 1555   APInt NumSkippedElements = Offset.sdiv(ElementSize);
 1579                              APInt Offset, Type *PointerTy, Twine NamePrefix) {
 1595   APInt Int8PtrOffset(Offset.getBitWidth(), 0);
 1609       APInt GEPOffset(Offset.getBitWidth(), 0);
 2175     APInt Mask = ~Ty->getMask().zext(IntTy->getBitWidth()).shl(ShAmt);
 2958     APInt OtherOffset(OffsetWidth, NewBeginOffset - BeginOffset);
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  264   APInt find(Value *V, bool SignExtended, bool ZeroExtended, bool NonNegative);
  267   APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended,
  548 APInt ConstantOffsetExtractor::findInEitherOperand(BinaryOperator *BO,
  553   APInt ConstantOffset = find(BO->getOperand(0), SignExtended, ZeroExtended,
  570 APInt ConstantOffsetExtractor::find(Value *V, bool SignExtended,
  581   APInt ConstantOffset(BitWidth, 0);
  740   APInt ConstantOffset =
  842       APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(),
  903       APInt ElementSize = APInt(IntPtrTy->getIntegerBitWidth(),
 1300   APInt Offset(DAL.getIndexSizeInBits(
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  408     APInt One(Idx->getBitWidth(), 1);
  510     APInt One(RHS->getBitWidth(), 1);
  563 static void unifyBitWidth(APInt &A, APInt &B) {
  563 static void unifyBitWidth(APInt &A, APInt &B) {
  575   APInt Idx = C.Index->getValue(), BasisIdx = Basis.Index->getValue();
  577   APInt IndexOffset = Idx - BasisIdx;
  581     APInt ElementSize(
  585     APInt Q, R;
  586     APInt::sdivrem(IndexOffset, ElementSize, Q, R);
lib/Transforms/Utils/FunctionComparator.cpp
   66 int FunctionComparator::cmpAPInts(const APInt &L, const APInt &R) const {
   66 int FunctionComparator::cmpAPInts(const APInt &L, const APInt &R) const {
  291     const APInt &LInt = cast<ConstantInt>(L)->getValue();
  292     const APInt &RInt = cast<ConstantInt>(R)->getValue();
  674   APInt OffsetL(BitWidth, 0), OffsetR(BitWidth, 0);
lib/Transforms/Utils/LibCallsShrinkWrap.cpp
  434     if (D < 1.0f || D > APInt::getMaxValue(8).getZExtValue()) {
lib/Transforms/Utils/Local.cpp
 1679     APInt Offset(BitWidth, 0);
 2753       APInt Bit(I->getType()->getPrimitiveSizeInBits(), 1);
 2754       const APInt &AndMask = cast<ConstantInt>(I->getOperand(1))->getValue();
lib/Transforms/Utils/LoopUtils.cpp
 1015   APInt Min = Signed ? APInt::getSignedMinValue(BitWidth) :
 1015   APInt Min = Signed ? APInt::getSignedMinValue(BitWidth) :
 1016     APInt::getMinValue(BitWidth);
 1026   APInt Max = Signed ? APInt::getSignedMaxValue(BitWidth) :
 1026   APInt Max = Signed ? APInt::getSignedMaxValue(BitWidth) :
 1027     APInt::getMaxValue(BitWidth);
lib/Transforms/Utils/LowerSwitch.cpp
  504     APInt Low = Cases.front().Low->getValue();
  505     APInt High = Cases.back().High->getValue();
  506     APInt Min = APIntOps::smin(ValRange.getSignedMin(), Low);
  507     APInt Max = APIntOps::smax(ValRange.getSignedMax(), High);
lib/Transforms/Utils/SimplifyCFG.cpp
  500     const APInt *RHSC;
  548         APInt Mask = ~*RHSC;
  571         APInt Mask = *RHSC;
  622     for (APInt Tmp = Span.getLower(); Tmp != Span.getUpper(); ++Tmp)
 4471     const APInt &CaseVal = Case.getCaseValue()->getValue();
 5026     APInt PrevVal;
 5027     APInt DistToPrev;
 5038       const APInt &Val = ConstVal->getValue();
 5040         APInt Dist = Val - PrevVal;
 5062     APInt TableInt(TableSize * IT->getBitWidth(), 0);
 5361   APInt RangeSpread = MaxCaseVal->getValue() - MinCaseVal->getValue();
 5445     APInt MaskInt(TableSizePowOf2, 0);
 5446     APInt One(TableSizePowOf2, 1);
 5626     auto Sub = Orig->getValue() - APInt(Ty->getBitWidth(), Base);
lib/Transforms/Utils/SimplifyIndVar.cpp
  142                            APInt::getOneBitSet(BitWidth, D->getZExtValue()));
  772       const APInt *C;
lib/Transforms/Utils/SimplifyLibCalls.cpp
  242     const APInt *X, *Y;
  952     APInt Bitfield(Width, 0);
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  150   bool areConsecutivePointers(Value *PtrA, Value *PtrB, APInt PtrDelta,
  152   bool lookThroughComplexAddresses(Value *PtrA, Value *PtrB, APInt PtrDelta,
  154   bool lookThroughSelects(Value *PtrA, Value *PtrB, const APInt &PtrDelta,
  333   APInt Size(PtrBitWidth, DL.getTypeStoreSize(PtrATy));
  339                                         APInt PtrDelta, unsigned Depth) const {
  341   APInt OffsetA(PtrBitWidth, 0);
  342   APInt OffsetB(PtrBitWidth, 0);
  362   APInt OffsetDelta = OffsetB - OffsetA;
  371   APInt BaseDelta = PtrDelta - OffsetDelta;
  396                                              APInt PtrDelta,
  433   APInt IdxDiff = PtrDelta.udiv(Stride).zextOrSelf(IdxBitWidth);
  472     APInt BitsAllowedToBeSet = Known.Zero.zext(IdxDiff.getBitWidth());
  487                                     const APInt &PtrDelta,
lib/Transforms/Vectorize/SLPVectorizer.cpp
 5107     auto Mask = DB->getDemandedBits(cast<Instruction>(Root));
tools/clang/include/clang/AST/ASTContext.h
 1335   QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize,
tools/clang/include/clang/AST/Expr.h
  956   static_assert(std::is_same<uint64_t, llvm::APInt::WordType>::value,
 1385   bool hasAllocation() const { return llvm::APInt::getNumWords(BitWidth) > 1; }
 1393   llvm::APInt getIntValue() const {
 1394     unsigned NumWords = llvm::APInt::getNumWords(BitWidth);
 1400   void setIntValue(const ASTContext &C, const llvm::APInt &Val);
 1405   llvm::APInt getValue() const { return getIntValue(); }
 1406   void setValue(const ASTContext &C, const llvm::APInt &Val) {
 1431   IntegerLiteral(const ASTContext &C, const llvm::APInt &V, QualType type,
 1438   static IntegerLiteral *Create(const ASTContext &C, const llvm::APInt &V,
 1473   FixedPointLiteral(const ASTContext &C, const llvm::APInt &V, QualType type,
 1478                                              const llvm::APInt &V,
 5023   llvm::APInt getArraySize() const {
tools/clang/include/clang/AST/TemplateBase.h
  308     unsigned NumWords = APInt::getNumWords(Integer.BitWidth);
tools/clang/include/clang/AST/Type.h
 2912   llvm::APInt Size; // Allows us to unique the type.
 2914   ConstantArrayType(QualType et, QualType can, const llvm::APInt &size,
 2929   const llvm::APInt &getSize() const { return Size; }
 2942                                        const llvm::APInt &NumElements);
 2954                       QualType ET, const llvm::APInt &ArraySize,
tools/clang/include/clang/Basic/FixedPoint.h
   97    APFixedPoint(const llvm::APInt &Val, const FixedPointSemantics &Sema)
tools/clang/include/clang/Basic/TargetInfo.h
  883     bool isValidAsmImmediate(const llvm::APInt &Value) const {
tools/clang/include/clang/Lex/LiteralSupport.h
  103   bool GetIntegerValue(llvm::APInt &Val);
  116   bool GetFixedPointValue(llvm::APInt &StoreVal, unsigned Scale);
tools/clang/include/clang/Sema/Sema.h
 1151   mutable llvm::DenseMap<const EnumDecl*, llvm::APInt> FlagBitsCache;
10307   bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val,
tools/clang/include/clang/Serialization/ASTReader.h
 2223   llvm::APInt ReadAPInt(const RecordData &Record, unsigned &Idx);
 2631   llvm::APInt readAPInt() {
tools/clang/include/clang/Serialization/ASTWriter.h
  858   void AddAPInt(const llvm::APInt &Value);
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
  137   const llvm::APSInt& getValue(const llvm::APInt& X, bool isUnsigned);
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
  298   NonLoc makeIntVal(const llvm::APInt& integer, bool isUnsigned) {
tools/clang/lib/AST/ASTContext.cpp
 3168                                           const llvm::APInt &ArySizeIn,
 3182   llvm::APInt ArySize(ArySizeIn);
 7481   llvm::APInt Size(Context->getTypeSize(Context->getSizeType()), 1);
 7536   llvm::APInt Size(Context->getTypeSize(Context->getSizeType()), 1);
 7544   llvm::APInt Size(Context->getTypeSize(Context->getSizeType()), 4);
 7639   llvm::APInt Size(Context->getTypeSize(Context->getSizeType()), 1);
 9082       llvm::APInt LSize, RSize;
 9085       if (HaveLSize && HaveRSize && !llvm::APInt::isSameValue(LSize, RSize))
tools/clang/lib/AST/ASTStructuralEquivalence.cpp
  533     if (!llvm::APInt::isSameValue(Array1->getSize(), Array2->getSize()))
tools/clang/lib/AST/Expr.cpp
  897                                    const llvm::APInt &Val) {
  913 IntegerLiteral::IntegerLiteral(const ASTContext &C, const llvm::APInt &V,
  925 IntegerLiteral::Create(const ASTContext &C, const llvm::APInt &V,
  935 FixedPointLiteral::FixedPointLiteral(const ASTContext &C, const llvm::APInt &V,
  948                                                        const llvm::APInt &V,
 3988           if (!llvm::APInt::isSameValue(Integer1->getValue(),
tools/clang/lib/AST/ExprConstant.cpp
 2411                                   llvm::APInt &Res) {
 2429     Res = llvm::APInt::getNullValue(VecSize);
 2432       llvm::APInt EltAsInt;
 5994   APInt Size, Remainder;
 5995   APInt ElemSizeAP(ByteSize.getBitWidth(), ElemSize.getQuantity());
 5996   APInt::udivrem(ByteSize, ElemSizeAP, Size, Remainder);
 7702                                             llvm::APInt &Result) {
 7737   llvm::APInt BytesAvailable = SizeOfElem.umul_ov(NumberOfElems, Overflow);
 7749                                             llvm::APInt &Result) {
 8390       llvm::APInt OrigN = N;
 8391       llvm::APInt::udivrem(OrigN, TSize, N, Remainder);
 8563       llvm::APInt InitBound = CAT->getSize().zextOrSelf(Bits);
 8564       llvm::APInt AllocBound = ArrayBound.zextOrSelf(Bits);
 9289     llvm::APInt SValInt;
 9303         llvm::APInt Elt;
 9312         llvm::APInt Elt;
 9665   bool Success(const llvm::APInt &I, const Expr *E, APValue &Result) {
 9675   bool Success(const llvm::APInt &I, const Expr *E) {
 9794   bool Success(const llvm::APInt &I, const Expr *E) {
10347 static bool convertUnsignedAPIntToCharUnits(const llvm::APInt &Int,
10381     llvm::APInt APEndOffset;
10406     llvm::APInt APEndOffset;
12418   llvm::APInt fill;
tools/clang/lib/AST/Interp/ByteCodeExprGen.cpp
  133   auto Val = LE->getValue();
tools/clang/lib/AST/Interp/ByteCodeExprGen.h
  193   bool emitConst(PrimType T, unsigned NumBits, const llvm::APInt &Value,
tools/clang/lib/AST/Interp/Integral.h
   27 using APInt = llvm::APInt;
tools/clang/lib/AST/Interp/Interp.h
   37 using APInt = llvm::APInt;
tools/clang/lib/AST/ItaniumMangle.cpp
 1018   llvm::APInt valueBits = f.bitcastToAPInt();
tools/clang/lib/AST/MicrosoftMangle.cpp
 2520   SmallVector<llvm::APInt, 3> Dimensions;
 2554   for (const llvm::APInt &Dimension : Dimensions)
tools/clang/lib/AST/Type.cpp
  141                                                const llvm::APInt &NumElements) {
  188                                 const llvm::APInt &ArraySize,
tools/clang/lib/Analysis/BodyFarm.cpp
  209   llvm::APInt APValue = llvm::APInt(C.getTypeSize(Ty), Value);
tools/clang/lib/Analysis/CFG.cpp
  937     llvm::APInt IntValue = IntLiteral->getValue();
  989       llvm::APInt L1 = IntLiteral->getValue();
  990       llvm::APInt L2 = IntLiteral2->getValue();
  999       llvm::APInt IntValue = IntLiteral->getValue();
tools/clang/lib/Basic/FixedPoint.cpp
   34   auto Mask = llvm::APInt::getBitsSetFrom(
   34   auto Mask = llvm::APInt::getBitsSetFrom(
   37   llvm::APInt Masked(NewVal & Mask);
  189   llvm::APInt FractPart = Val.zextOrTrunc(Scale).zext(Width);
  190   llvm::APInt FractPartMask = llvm::APInt::getAllOnesValue(Scale).zext(Width);
  190   llvm::APInt FractPartMask = llvm::APInt::getAllOnesValue(Scale).zext(Width);
  191   llvm::APInt RadixInt = llvm::APInt(Width, 10);
tools/clang/lib/CodeGen/CGAtomic.cpp
  102           llvm::APInt Size(
tools/clang/lib/CodeGen/CGBuilder.h
  264     llvm::APInt Offset(
tools/clang/lib/CodeGen/CGBuiltin.cpp
 1354     auto IntMax =
 1355         llvm::APInt::getSignedMaxValue(ResultInfo.Width).zextOrSelf(OpWidth);
 1374       auto IntMax =
 1375           llvm::APInt::getMaxValue(ResultInfo.Width).zext(OpWidth);
 3789       llvm::APInt ArraySize(32, NumArgs - First);
tools/clang/lib/CodeGen/CGDebugInfo.cpp
 3281     llvm::APInt ConstVal(32, 1);
 3879       llvm::APInt pad(32, NumPaddingBytes.getQuantity());
tools/clang/lib/CodeGen/CGDecl.cpp
 1179       const llvm::APInt &AP = cast<llvm::ConstantInt>(Pattern)->getValue();
tools/clang/lib/CodeGen/CGExpr.cpp
 1545                             llvm::APInt &Min, llvm::APInt &End,
 1545                             llvm::APInt &Min, llvm::APInt &End,
 1578   llvm::APInt Min, End;
 1608   llvm::APInt Min, End;
 1841       Val = Builder.CreateAnd(Val, llvm::APInt::getLowBitsSet(Info.StorageSize,
 2048                                  llvm::APInt::getLowBitsSet(Info.StorageSize,
 2057                             ~llvm::APInt::getBitsSet(Info.StorageSize,
tools/clang/lib/CodeGen/CGExprCXX.cpp
  691   llvm::APInt cookieSize(sizeWidth,
  716   llvm::APInt arraySizeMultiplier(sizeWidth, 1);
  724   llvm::APInt typeSizeMultiplier(sizeWidth, typeSize.getQuantity());
  734     const llvm::APInt &count = numElementsC->getValue();
  750     llvm::APInt adjustedCount = count.zextOrTrunc(sizeWidth);
  765     llvm::APInt allocationSize
  807       llvm::APInt threshold(numElementsWidth, 1);
tools/clang/lib/CodeGen/CGExprConstant.cpp
  117   bool addBits(llvm::APInt Bits, uint64_t OffsetInBits, bool AllowOverwrite);
  179 bool ConstantAggregateBuilder::addBits(llvm::APInt Bits, uint64_t OffsetInBits,
  199     llvm::APInt BitsThisChar = Bits;
  235       llvm::APInt UpdateMask(CharWidth, 0);
  592   llvm::APInt FieldValue = CI->getValue();
tools/clang/lib/CodeGen/CGExprScalar.cpp
   57                              llvm::APInt &Result) {
   60   const auto &LHSAP = LHS->getValue();
   61   const auto &RHSAP = RHS->getValue();
  102     llvm::APInt Result;
 1447           CGF.getLLVMContext(), APInt::getLowBitsSet(ResultWidth, SrcScale));
 2979       Builder.getInt(llvm::APInt::getSignedMinValue(Ty->getBitWidth()));
 4602         llvm::APInt N;
tools/clang/lib/CodeGen/CGObjC.cpp
  142   llvm::APInt APNumElements(Context.getTypeSize(Context.getSizeType()),
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
 3386     llvm::APInt ArraySize(/*unsigned int numBits=*/32, CopyprivateVars.size());
 3468     llvm::APInt ChunkSize(32, 1);
 5742   llvm::APInt ArraySize(/*unsigned int numBits=*/32, Size);
 6214   llvm::APInt ArraySize(/*numBits=*/64, Size);
 8577     llvm::APInt PointerNumAP(32, Info.NumberOfPtrs, /*isSigned=*/true);
10830   llvm::APInt Size(/*numBits=*/32, NumIterations.size());
10881   llvm::APInt Size(/*numBits=*/32, C->getNumLoops());
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  282       llvm::APInt ArraySize(32, BufSize);
  291       llvm::APInt Align(32, std::max(C.getDeclAlign(VD).getQuantity(),
 4297   llvm::APInt ArraySize(/*unsigned int numBits=*/32, Size);
 4839   llvm::APInt ChunkSize(32, 1);
 5083       llvm::APInt ArySize(/*numBits=*/64, Size);
 5110       llvm::APInt ArySize(/*numBits=*/64, SharedMemorySize);
 5143       llvm::APInt Size1(32, SMsBlockPerSM.second);
 5147       llvm::APInt Size2(32, SMsBlockPerSM.first);
tools/clang/lib/CodeGen/CGStmt.cpp
 1191   llvm::APInt Range = RHS - LHS;
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp
 1522     llvm::APInt ClauseAlignment(64, 0);
 1529       llvm::APInt Alignment(ClauseAlignment);
 3194     llvm::APInt ArrSize(/*numBits=*/32, InputInfo.NumberOfTargetItems);
 3270   llvm::APInt TrueOrFalse(32, S.hasClausesOfKind<OMPNowaitClause>() ? 1 : 0);
tools/clang/lib/CodeGen/PatternInit.cpp
   42         Ty, llvm::APInt::getSplat(BitWidth, llvm::APInt(64, IntValue)));
   59     llvm::APInt Payload(64, NaNPayload);
   61       Payload = llvm::APInt::getSplat(BitWidth, Payload);
tools/clang/lib/Frontend/InitPreprocessor.cpp
  169   llvm::APInt MaxVal = isSigned ? llvm::APInt::getSignedMaxValue(TypeWidth)
  169   llvm::APInt MaxVal = isSigned ? llvm::APInt::getSignedMaxValue(TypeWidth)
  170                                 : llvm::APInt::getMaxValue(TypeWidth);
tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
 3709         llvm::APInt Dim = CAT->getSize();
tools/clang/lib/Lex/LiteralSupport.cpp
  982 bool NumericLiteralParser::GetIntegerValue(llvm::APInt &Val) {
 1005   llvm::APInt RadixVal(Val.getBitWidth(), radix);
 1006   llvm::APInt CharVal(Val.getBitWidth(), 0);
 1007   llvm::APInt OldVal = Val;
 1061 bool NumericLiteralParser::GetFixedPointValue(llvm::APInt &StoreVal, unsigned Scale) {
 1086       llvm::APInt ExpInt(/*numBits=*/64, ExpStr, /*radix=*/10);
 1121   llvm::APInt Val(static_cast<unsigned>(NumBitsNeeded), 0, /*isSigned=*/false);
 1163   auto MaxVal = llvm::APInt::getMaxValue(StoreVal.getBitWidth());
 1163   auto MaxVal = llvm::APInt::getMaxValue(StoreVal.getBitWidth());
 1365   llvm::APInt LitVal(PP.getTargetInfo().getIntWidth(), 0);
tools/clang/lib/Lex/Preprocessor.cpp
 1353   llvm::APInt APVal(64, 0);
tools/clang/lib/Sema/Sema.cpp
 1121       llvm::APInt One(Context.getTypeSize(Context.getSizeType()), true);
tools/clang/lib/Sema/SemaChecking.cpp
 8385         const llvm::APInt &V = IL->getValue();
13189 static bool IsTailPaddedMemberArray(Sema &S, const llvm::APInt &Size,
13279     llvm::APInt size = ArrayTy->getSize();
14406       llvm::APInt MagicValueAPInt = IL->getValue();
tools/clang/lib/Sema/SemaDecl.cpp
16387   llvm::APInt Zero(Context.getTypeSize(Context.IntTy), 0);
17318 bool Sema::IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val,
17324   llvm::APInt &FlagBits = R.first->second;
17343   llvm::APInt FlagMask = ~FlagBits.zextOrTrunc(Val.getBitWidth());
tools/clang/lib/Sema/SemaDeclAttr.cpp
  697         llvm::APInt ArgValue = IL->getValue();
 3914   llvm::APInt VectorSize(64, 0);
tools/clang/lib/Sema/SemaDeclCXX.cpp
12033   llvm::APInt Size(S.Context.getTypeSize(SizeType),
12247   llvm::APInt Zero(S.Context.getTypeSize(SizeType), 0);
12278   llvm::APInt Upper
tools/clang/lib/Sema/SemaExpr.cpp
 1732     llvm::APInt Len(Context.getIntWidth(SizeType), Literal.GetNumStringChars());
 3226     llvm::APInt LengthI(32, Length + 1);
 3464         llvm::APInt ResultVal(Context.getTargetInfo().getLongLongWidth(), 0);
 3540     llvm::APInt Val(bit_width, 0, isSigned);
 3608     llvm::APInt ResultVal(MaxWidth, 0);
 9812   llvm::APInt LeftBits(Right.getBitWidth(),
 9846   llvm::APInt ResultBits =
11194   const llvm::APInt &LeftSideValue = LHSInt->getValue();
11195   llvm::APInt RightSideValue = RHSInt->getValue();
11244   const llvm::APInt XorValue = LeftSideValue ^ RightSideValue;
11249     llvm::APInt One = (LeftSideValue - 1);
11250     llvm::APInt PowValue = One.sshl_ov(RightSideValue, Overflow);
tools/clang/lib/Sema/SemaExprCXX.cpp
 2369   IntegerLiteral Size(Context, llvm::APInt::getNullValue(
tools/clang/lib/Sema/SemaInit.cpp
  198     llvm::APInt ConstVal(32, StrLength);
 2880         llvm::APInt CodeUnit(PromotedCharTyWidth, SL->getCodeUnit(i));
 2902         llvm::APInt CodeUnit(PromotedCharTyWidth, Str[i]);
tools/clang/lib/Sema/SemaOpenMP.cpp
13439           llvm::APInt InitValue = llvm::APInt::getAllOnesValue(Size);
13439           llvm::APInt InitValue = llvm::APInt::getAllOnesValue(Size);
13461           llvm::APInt InitValue =
13462               (BOK != BO_LT) ? IsSigned ? llvm::APInt::getSignedMinValue(Size)
13463                                         : llvm::APInt::getMinValue(Size)
13464                              : IsSigned ? llvm::APInt::getSignedMaxValue(Size)
13465                                         : llvm::APInt::getMaxValue(Size);
tools/clang/lib/Sema/SemaPseudoObject.cpp
  517   llvm::APInt oneV(S.Context.getTypeSize(S.Context.IntTy), 1);
tools/clang/lib/Sema/SemaTemplateDeduction.cpp
 3739       llvm::APInt Size(S.Context.getIntWidth(T), ILE->getNumInits());
tools/clang/lib/Sema/TreeTransform.h
  785                             const llvm::APInt *Size,
  797                                     const llvm::APInt &Size,
12902                                          const llvm::APInt *Size,
12938                                                  const llvm::APInt &Size,
13007   llvm::APInt numElements(SemaRef.Context.getIntWidth(SemaRef.Context.IntTy),
tools/clang/lib/Serialization/ASTReader.cpp
 6444     llvm::APInt Size = ReadAPInt(Record, Idx);
 9645 llvm::APInt ASTReader::ReadAPInt(const RecordData &Record, unsigned &Idx) {
 9647   unsigned NumWords = llvm::APInt::getNumWords(BitWidth);
 9648   llvm::APInt Result(BitWidth, NumWords, &Record[Idx]);
tools/clang/lib/Serialization/ASTWriter.cpp
 1836     auto CH = llvm::APInt(64, ContentHash);
 5437 void ASTRecordWriter::AddAPInt(const llvm::APInt &Value) {
tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
  424     const llvm::APInt &RHS = SIE->getRHS();
  429     const llvm::APInt &LHS = SIE->getLHS();
tools/clang/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp
  468     llvm::APInt I1 = IntLit1->getValue();
  469     llvm::APInt I2 = IntLit2->getValue();
tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
 1268     llvm::APInt Value = IL->getValue();
tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
  523     const llvm::APInt &RHS = SIE->getRHS();
tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
  107 const llvm::APSInt& BasicValueFactory::getValue(const llvm::APInt& X,
tools/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
  212   llvm::APInt BoundNum =
  214   llvm::APInt InitNum =
tools/clang/tools/extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
  805         llvm::APInt IntValue;
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
  126   llvm::APInt ArraySize = SizeArg.getAsIntegral();
tools/clang/tools/extra/clang-tidy/misc/RedundantExpressionCheck.cpp
   91     llvm::APInt LeftLit = cast<IntegerLiteral>(Left)->getValue();
   92     llvm::APInt RightLit = cast<IntegerLiteral>(Right)->getValue();
tools/clang/tools/extra/clang-tidy/readability/MagicNumbersCheck.cpp
  123   const llvm::APInt IntValue = Literal->getValue();
tools/clang/utils/TableGen/MveEmitter.cpp
  772       llvm::APInt lo(128, 0), hi(128, 0);
  784       llvm::APInt typelo, typehi;
  786         typelo = llvm::APInt::getSignedMinValue(IA.ArgType->sizeInBits());
  787         typehi = llvm::APInt::getSignedMaxValue(IA.ArgType->sizeInBits());
  789         typelo = llvm::APInt::getMinValue(IA.ArgType->sizeInBits());
  790         typehi = llvm::APInt::getMaxValue(IA.ArgType->sizeInBits());
tools/lldb/include/lldb/Core/Value.h
  102     llvm::APInt rhs = llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128,
tools/lldb/include/lldb/Utility/RegisterValue.h
   61   explicit RegisterValue(llvm::APInt inst) : m_type(eTypeUInt128) {
  128   llvm::APInt GetAsUInt128(const llvm::APInt &fail_value,
  128   llvm::APInt GetAsUInt128(const llvm::APInt &fail_value,
  169   void operator=(llvm::APInt uint) {
  209   void SetUInt128(llvm::APInt uint) {
tools/lldb/include/lldb/Utility/Scalar.h
  100   Scalar(llvm::APInt v) : m_type(), m_float(static_cast<float>(0)) {
  174   Scalar &operator=(llvm::APInt v);
  224   llvm::APInt SInt128(llvm::APInt &fail_value) const;
  224   llvm::APInt SInt128(llvm::APInt &fail_value) const;
  226   llvm::APInt UInt128(const llvm::APInt &fail_value) const;
  226   llvm::APInt UInt128(const llvm::APInt &fail_value) const;
  284   llvm::APInt m_integer;
tools/lldb/source/Core/DumpDataExtractor.cpp
   65 static llvm::Optional<llvm::APInt> GetAPInt(const DataExtractor &data,
  113   llvm::Optional<llvm::APInt> apint = GetAPInt(data, &offset, byte_size);
  578           llvm::Optional<llvm::APInt> apint =
tools/lldb/source/Expression/IRInterpreter.cpp
  169       APInt value_apint;
  229   bool ResolveConstantValue(APInt &value, const Constant *constant) {
  341     APInt resolved_value;
tools/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
 2948   llvm::APInt wr_val = llvm::APInt::getNullValue(128);
 2948   llvm::APInt wr_val = llvm::APInt::getNullValue(128);
 2949   llvm::APInt fail_value = llvm::APInt::getMaxValue(128);
 2949   llvm::APInt fail_value = llvm::APInt::getMaxValue(128);
 2950   llvm::APInt zero_value = llvm::APInt::getNullValue(128);
 2950   llvm::APInt zero_value = llvm::APInt::getNullValue(128);
 2966   if ((llvm::APInt::isSameValue(zero_value, wr_val) && !bnz) ||
 2967       (!llvm::APInt::isSameValue(zero_value, wr_val) && bnz))
tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
 2259   llvm::APInt wr_val = llvm::APInt::getNullValue(128);
 2259   llvm::APInt wr_val = llvm::APInt::getNullValue(128);
 2260   llvm::APInt fail_value = llvm::APInt::getMaxValue(128);
 2260   llvm::APInt fail_value = llvm::APInt::getMaxValue(128);
 2261   llvm::APInt zero_value = llvm::APInt::getNullValue(128);
 2261   llvm::APInt zero_value = llvm::APInt::getNullValue(128);
 2277   if ((llvm::APInt::isSameValue(zero_value, wr_val) && !bnz) ||
 2278       (!llvm::APInt::isSameValue(zero_value, wr_val) && bnz))
tools/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
  359                                  const llvm::APInt &value,
  600         llvm::APInt i128_value(128, words);
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
 1834           llvm::APInt apint(*size, uval64, is_signed);
tools/lldb/source/Symbol/ClangASTContext.cpp
 2170       llvm::APInt ap_element_count(64, element_count);
 7884     llvm::APInt bitfield_bit_size_apint(
tools/lldb/source/Utility/RegisterValue.cpp
  596 llvm::APInt RegisterValue::GetAsUInt128(const llvm::APInt &fail_value,
  596 llvm::APInt RegisterValue::GetAsUInt128(const llvm::APInt &fail_value,
tools/lldb/source/Utility/Scalar.cpp
  169     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
  212   llvm::APInt zero_int = llvm::APInt::getNullValue(m_integer.getBitWidth() / 8);
  212   llvm::APInt zero_int = llvm::APInt::getNullValue(m_integer.getBitWidth() / 8);
  228     return llvm::APInt::isSameValue(zero_int, m_integer);
  378 Scalar &Scalar::operator=(llvm::APInt rhs) {
 1373     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1403     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1433     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1463     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1493     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1523     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1553     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1583     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1613     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1642     llvm::APInt rounded_double =
 1648     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1655 llvm::APInt Scalar::SInt128(llvm::APInt &fail_value) const {
 1655 llvm::APInt Scalar::SInt128(llvm::APInt &fail_value) const {
 1680 llvm::APInt Scalar::UInt128(const llvm::APInt &fail_value) const {
 1680 llvm::APInt Scalar::UInt128(const llvm::APInt &fail_value) const {
 1727     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1755     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 1784     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
 2690         llvm::APInt sign_bit = llvm::APInt::getSignMask(sign_bit_pos + 1);
 2690         llvm::APInt sign_bit = llvm::APInt::getSignMask(sign_bit_pos + 1);
 2691         llvm::APInt bitwize_and = m_integer & sign_bit;
 2693           const llvm::APInt mask =
tools/lldb/unittests/Utility/ScalarTest.cpp
   24 bool checkInequality(T c1, T c2) {
   24 bool checkInequality(T c1, T c2) {
   29 bool checkEquality(T c1, T c2) {
   29 bool checkEquality(T c1, T c2) {
   39   auto apint1 = APInt(64, 234);
   40   auto apint2 = APInt(64, 246);
tools/llvm-exegesis/lib/AArch64/Target.cpp
   28                             const APInt &Value) {
   46                                const APInt &Value) const override {
tools/llvm-exegesis/lib/BenchmarkResult.cpp
  270       const unsigned BitsNeeded = APInt::getBitsNeeded(Pieces[1], kRadix);
tools/llvm-exegesis/lib/Mips/Target.cpp
   25                                const APInt &Value) const override;
   35                             const APInt &Value) {
   48                                                  const APInt &Value) const {
tools/llvm-exegesis/lib/PowerPC/Target.cpp
   26                                const APInt &Value) const override;
   45                             const APInt &Value) {
   55                                                     const APInt &Value) const {
tools/llvm-exegesis/lib/RegisterValue.cpp
   45 APInt bitcastFloatValue(const fltSemantics &FltSemantics,
tools/llvm-exegesis/lib/RegisterValue.h
   29   APInt Value;
   46 APInt bitcastFloatValue(const fltSemantics &FltSemantics,
tools/llvm-exegesis/lib/SnippetRepetitor.cpp
   65       const APInt LoopCount(32, (MinInstructions + Instructions.size() - 1) /
tools/llvm-exegesis/lib/Target.cpp
  151                                const APInt &Value) const override {
tools/llvm-exegesis/lib/Target.h
   73                                        const APInt &Value) const = 0;
tools/llvm-exegesis/lib/X86/Target.cpp
  377                             const APInt &Value) {
  431   explicit ConstantInliner(const APInt &Constant) : Constant_(Constant) {}
  452   APInt Constant_;
  505   const APInt WideConstant = Constant_.getBitWidth() < Bytes * 8
  554                                const APInt &Value) const override;
  665                                                 const APInt &Value) const {
tools/llvm-size/llvm-size.cpp
  164   APInt conv(64, num);
tools/llvm-stress/llvm-stress.cpp
  439       APInt RandomInt(Ty->getPrimitiveSizeInBits(), makeArrayRef(RandomBits));
  451             Ty, APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
  454             Ty, APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
tools/polly/include/polly/Support/GICHelper.h
   54 __isl_give isl_val *isl_valFromAPInt(isl_ctx *Ctx, const llvm::APInt Int,
   86 inline isl::val valFromAPInt(isl_ctx *Ctx, const llvm::APInt Int,
  118 llvm::APInt APIntFromVal(__isl_take isl_val *Val);
  147 inline llvm::APInt APIntFromVal(isl::val V) {
tools/polly/lib/Analysis/ScopBuilder.cpp
 2387           auto ValAPInt = APIntFromVal(Val);
tools/polly/lib/Analysis/ScopInfo.cpp
  756   const auto One = APInt(BW, 1);
  757   const auto LB = isWrapping ? Range.getLower() : Range.getSignedMin();
  758   const auto UB = isWrapping ? (Range.getUpper() - One) : Range.getSignedMax();
  760   auto Min = LB.sdiv(APInt(BW, ElementSize));
  761   auto Max = UB.sdiv(APInt(BW, ElementSize)) + One;
tools/polly/lib/CodeGen/IslExprBuilder.cpp
   81     APInt APValue = APIntFromVal(Val);
  751   APInt APValue;
tools/polly/lib/Support/GICHelper.cpp
   19 __isl_give isl_val *polly::isl_valFromAPInt(isl_ctx *Ctx, const APInt Int,
   21   APInt Abs;
   51 APInt polly::APIntFromVal(__isl_take isl_val *Val) {
   62   APInt A(NumBits, NumChunks, Data);
tools/polly/unittests/Isl/IslTest.cpp
   90     APInt APZero(1, 0, true);
   96     APInt APNOne(1, -1, true);
  102     APInt APZero(1, 0, false);
  108     APInt APOne(1, 1, false);
  114     APInt APNTwo(2, -2, true);
  121     APInt APNOne(32, -1, true);
  127     APInt APZero(32, 0, false);
  133     APInt APOne(32, 1, false);
  139     APInt APTwo(32, 2, false);
  145     APInt APNOne(32, (1ull << 32) - 1, false);
  152     APInt APLarge(130, 2, false);
  168     auto APNOne = APIntFromVal(IslNOne);
  176     auto APNTwo = APIntFromVal(IslNTwo);
  184     auto APNThree = APIntFromVal(IslNThree);
  192     auto APNFour = APIntFromVal(IslNFour);
  200     auto APZero = APIntFromVal(IslZero);
  207     auto APOne = APIntFromVal(IslOne);
  214     auto APTwo = APIntFromVal(IslTwo);
  221     auto APThree = APIntFromVal(IslThree);
  228     auto APFour = APIntFromVal(IslFour);
  235     auto APNOne = APIntFromVal(IslNOne);
  244     auto APLargeNum = APIntFromVal(IslLargeNum);
  252     auto APLargePow2 = APIntFromVal(IslLargePow2);
  261     auto APLargeNPow2 = APIntFromVal(IslLargeNPow2);
  270     auto APLargePow2 = APIntFromVal(IslLargePow2);
  279     auto APLargeNPow2 = APIntFromVal(IslLargeNPow2);
unittests/ADT/APFloatTest.cpp
   43   APInt payload = APInt::getOneBitSet(4, 2);
   43   APInt payload = APInt::getOneBitSet(4, 2);
 1099 static APInt nanbitsFromAPInt(const fltSemantics &Sem, bool SNaN, bool Negative,
 1101   APInt appayload(64, payload);
 3032   const APInt Payload(64, (UINT64_C(1) << 50) |
 3197   const APInt Payload(64, (UINT64_C(1) << 50) |
unittests/ADT/APIntTest.cpp
   21   APInt Zero = APInt();
   29   APInt One = APInt::getNullValue(65) + 1;
   29   APInt One = APInt::getNullValue(65) + 1;
   30   APInt Shl = One.shl(0);
   36   const APInt neg_one(64, static_cast<uint64_t>(-1), true);
   41   APInt Minus3(128, static_cast<uint64_t>(-3), true);
   45   APInt Minus1(128, static_cast<uint64_t>(-1), true);
   56   APInt i33minus2(33, static_cast<uint64_t>(-2), true);
   67   APInt i61(61, 1 << 15);
   87   APInt i65(65, 0, true);
   95   APInt i65minus(65, 0, true);
  105   APInt u128max = APInt::getAllOnesValue(128);
  105   APInt u128max = APInt::getAllOnesValue(128);
  113   APInt u64max(128, static_cast<uint64_t>(-1), false);
  122   APInt zero(128, 0, true);
  132   APInt one(128, 1, true);
  142   APInt s128(128, 2, true);
  187   APInt s256(256, 15, true);
  218   const APInt neg_two(1, static_cast<uint64_t>(-2), true);
  219   const APInt neg_one(1, static_cast<uint64_t>(-1), true);
  220   const APInt zero(1, 0);
  221   const APInt one(1, 1);
  222   const APInt two(1, 2);
  323   APInt q(8, 0);
  324   APInt r(8, 0);
  325   APInt one(8, 1);
  326   APInt two(8, 2);
  327   APInt nine(8, 9);
  328   APInt four(8, 4);
  335   APInt::sdivrem(nine, two, q, r);
  338   APInt::sdivrem(-nine, two, q, r);
  341   APInt::sdivrem(nine, -two, q, r);
  344   APInt::sdivrem(-nine, -two, q, r);
  351   std::array<APInt, 5> testVals{{
  359   for (auto &arg1 : testVals)
  360     for (auto &arg2 : testVals) {
  406   auto u64 = APInt{128, uint64max};
  407   auto s64 = APInt{128, static_cast<uint64_t>(int64max), true};
  408   auto big = u64 + 1;
  466   auto a = APInt{64, static_cast<uint64_t>(edge), true};
  486   auto a = APInt{64, edge};
  517   auto One = APInt{128, static_cast<uint64_t>(1), true};
  518   auto Two = APInt{128, static_cast<uint64_t>(2), true};
  519   auto MinusOne = APInt{128, static_cast<uint64_t>(-1), true};
  520   auto MinusTwo = APInt{128, static_cast<uint64_t>(-2), true};
  546   APInt A1(64, E1);
  568   APInt::WordType E2[4] = {
  574   APInt A2(APInt::APINT_BITS_PER_WORD*4, E2);
  574   APInt A2(APInt::APINT_BITS_PER_WORD*4, E2);
  601     APInt V(129, HexString, 16);
  606   APInt One(129, "1", 16);
  607   APInt Two(129, "2", 16);
  608   APInt Three(129, "3", 16);
  609   APInt MinusOne = -One;
  616     APInt AddLL = One + One;
  619     APInt AddLR = One + getRValue("1", RawDataR);
  623     APInt AddRL = getRValue("1", RawDataL) + One;
  627     APInt AddRR = getRValue("1", RawDataL) + getRValue("1", RawDataR);
  632     APInt AddLK = One + 1;
  635     APInt AddKL = 1 + One;
  639     APInt AddRK = getRValue("1", RawDataL) + 1;
  643     APInt AddKR = 1 + getRValue("1", RawDataR);
  650     APInt AllOnes(129, "0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 16);
  651     APInt HighOneLowOne(129, "100000000000000000000000000000001", 16);
  653     APInt AddLL = AllOnes + Two;
  656     APInt AddLR = AllOnes + getRValue("2", RawDataR);
  660     APInt AddRL = getRValue("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", RawDataL) + Two;
  664     APInt AddRR = getRValue("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", RawDataL) +
  670     APInt AddLK = AllOnes + 2;
  673     APInt AddKL = 2 + AllOnes;
  677     APInt AddRK = getRValue("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", RawDataL) + 2;
  681     APInt AddKR = 2 + getRValue("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", RawDataR);
  688     APInt SubLL = Two - One;
  691     APInt SubLR = Two - getRValue("1", RawDataR);
  695     APInt SubRL = getRValue("2", RawDataL) - One;
  699     APInt SubRR = getRValue("2", RawDataL) - getRValue("1", RawDataR);
  704     APInt SubLK = Two - 1;
  707     APInt SubKL = 2 - One;
  711     APInt SubRK = getRValue("2", RawDataL) - 1;
  715     APInt SubKR = 2 - getRValue("1", RawDataR);
  722     APInt AllOnes(129, "0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 16);
  723     APInt HighOneLowOne(129, "100000000000000000000000000000001", 16);
  725     APInt SubLL = HighOneLowOne - AllOnes;
  728     APInt SubLR = HighOneLowOne -
  733     APInt SubRL = getRValue("100000000000000000000000000000001", RawDataL) -
  738     APInt SubRR = getRValue("100000000000000000000000000000001", RawDataL) -
  745     APInt SubLK = HighOneLowOne - 2;
  749     APInt SubKL = 2 - MinusOne;
  754     APInt SubRK = getRValue("100000000000000000000000000000001", RawDataL) - 2;
  758     APInt SubKR = 2 - getRValue("1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", RawDataR);
  770     APInt V(129, HexString, 16);
  775   APInt Ten(129, "A", 16);
  776   APInt Twelve(129, "C", 16);
  783     APInt AndLL = Ten & Twelve;
  786     APInt AndLR = Ten & getRValue("C", RawDataR);
  790     APInt AndRL = getRValue("A", RawDataL) & Twelve;
  794     APInt AndRR = getRValue("A", RawDataL) & getRValue("C", RawDataR);
  799     APInt AndLK = Ten & 0xc;
  802     APInt AndKL = 0xa & Twelve;
  806     APInt AndRK = getRValue("A", RawDataL) & 0xc;
  810     APInt AndKR = 0xa & getRValue("C", RawDataR);
  817     APInt OrLL = Ten | Twelve;
  820     APInt OrLR = Ten | getRValue("C", RawDataR);
  824     APInt OrRL = getRValue("A", RawDataL) | Twelve;
  828     APInt OrRR = getRValue("A", RawDataL) | getRValue("C", RawDataR);
  833     APInt OrLK = Ten | 0xc;
  836     APInt OrKL = 0xa | Twelve;
  840     APInt OrRK = getRValue("A", RawDataL) | 0xc;
  844     APInt OrKR = 0xa | getRValue("C", RawDataR);
  851     APInt XorLL = Ten ^ Twelve;
  854     APInt XorLR = Ten ^ getRValue("C", RawDataR);
  858     APInt XorRL = getRValue("A", RawDataL) ^ Twelve;
  862     APInt XorRR = getRValue("A", RawDataL) ^ getRValue("C", RawDataR);
  867     APInt XorLK = Ten ^ 0xc;
  870     APInt XorKL = 0xa ^ Twelve;
  874     APInt XorRK = getRValue("A", RawDataL) ^ 0xc;
  878     APInt XorKR = 0xa ^ getRValue("C", RawDataR);
  888     APInt V(129, HexString, 16);
  893   APInt One(129, 1);
  894   APInt NegativeTwo(129, -2ULL, true);
  900     APInt NegL = ~One;
  903     APInt NegR = ~getRValue("1", RawData);
  910 void testDiv(APInt a, APInt b, APInt c) {
  910 void testDiv(APInt a, APInt b, APInt c) {
  910 void testDiv(APInt a, APInt b, APInt c) {
  914   auto p = a * b + c;
  916   auto q = p.udiv(a);
  917   auto r = p.urem(a);
  920   APInt::udivrem(p, a, q, r);
  927   APInt::sdivrem(p, a, q, r);
  936     APInt::udivrem(p, b, q, r);
  943     APInt::sdivrem(p, b, q, r);
 1005 void testDiv(APInt a, uint64_t b, APInt c) {
 1005 void testDiv(APInt a, uint64_t b, APInt c) {
 1006   auto p = a * b + c;
 1008   APInt q;
 1016     APInt::udivrem(p, b, q, r);
 1028   APInt::sdivrem(p, b, q, sr);
 1065   APInt A(65, 2), B(65, 2);
 1066   APInt Q, R;
 1069   APInt::sdivrem(A, B, Q, R);
 1072   APInt::udivrem(A, B, Q, R);
 1077   APInt O(65, 0);
 1078   APInt::sdivrem(O, B, Q, R);
 1081   APInt::udivrem(O, B, Q, R);
 1086   APInt I(65, 1);
 1087   APInt::sdivrem(A, I, Q, R);
 1090   APInt::udivrem(A, I, Q, R);
 1179   APInt AP_10 = APInt(8, 10);
 1180   APInt AP_100 = APInt(8, 100);
 1181   APInt AP_200 = APInt(8, 200);
 1442   APInt ValA(65, -1ULL);
 1443   APInt ValB(65, 4);
 1444   APInt ValC(65, 0);
 1522   APInt Big(256, "00004000800000000000000000003fff8000000000000003", 16);
 1523   APInt Rot(256, "3fff80000000000000030000000000000000000040008000", 16);
 1531   APInt ValA(8, 0x01);
 1535   APInt ValB(3, 5);
 1545     APInt::WordType singleWord = ~APInt::WordType(0) << (APInt::APINT_BITS_PER_WORD - 1);
 1545     APInt::WordType singleWord = ~APInt::WordType(0) << (APInt::APINT_BITS_PER_WORD - 1);
 1546     APInt::WordType carry = APInt::tcDecrement(&singleWord, 1);
 1546     APInt::WordType carry = APInt::tcDecrement(&singleWord, 1);
 1553     APInt::WordType singleWord = 0;
 1554     APInt::WordType carry = APInt::tcDecrement(&singleWord, 1);
 1554     APInt::WordType carry = APInt::tcDecrement(&singleWord, 1);
 1563     APInt::WordType test[4] = {0x1, 0x1, 0x1, 0x1};
 1564     APInt::WordType expected[4] = {0x0, 0x1, 0x1, 0x1};
 1565     APInt::tcDecrement(test, 4);
 1571     APInt::WordType test[4] = {0x0, 0xF, 0x1, 0x1};
 1572     APInt::WordType expected[4] = {~APInt::WordType(0), 0xE, 0x1, 0x1};
 1573     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1573     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1580     APInt::WordType test[4] = {0x0, 0x0, 0xC, 0x1};
 1581     APInt::WordType expected[4] = {~APInt::WordType(0), ~APInt::WordType(0), 0xB, 0x1};
 1582     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1582     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1589     APInt::WordType test[4] = {0x0, 0x0, 0x0, 0x1};
 1590     APInt::WordType expected[4] = {~APInt::WordType(0), ~APInt::WordType(0), ~APInt::WordType(0), 0x0};
 1591     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1591     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1598     APInt::WordType test[4] = {0x0, 0x0, 0x0, 0x0};
 1599     APInt::WordType expected[4] = {~APInt::WordType(0), ~APInt::WordType(0), ~APInt::WordType(0), ~APInt::WordType(0)};
 1600     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1600     APInt::WordType carry = APInt::tcDecrement(test, 4);
 1609   APInt A1(64, E1);
 1616   APInt::WordType E2[4] = {
 1622   APInt A2(APInt::APINT_BITS_PER_WORD*4, E2);
 1622   APInt A2(APInt::APINT_BITS_PER_WORD*4, E2);
 1624     for (unsigned j = 0; j < APInt::APINT_BITS_PER_WORD; ++j) {
 1635   APInt A9(UINT32_MAX, 0);
 1644   APInt A1(64, I1);
 1649   APInt A2(64, I2);
 1654   APInt A3(64, I3);
 1660   APInt::WordType I4[4] = {0x0, 0xF, 0x18, 0x0};
 1661   APInt A4(APInt::APINT_BITS_PER_WORD*4, I4);
 1661   APInt A4(APInt::APINT_BITS_PER_WORD*4, I4);
 1665   APInt::WordType I5[4] = {0x0, 0xF, 0x10, 0x0};
 1666   APInt A5(APInt::APINT_BITS_PER_WORD*4, I5);
 1666   APInt A5(APInt::APINT_BITS_PER_WORD*4, I5);
 1671   APInt A6(APInt::APINT_BITS_PER_WORD*4, I6);
 1671   APInt A6(APInt::APINT_BITS_PER_WORD*4, I6);
 1675   APInt A7(1, 1);
 1677   APInt A8(1, 0);
 1682   APInt A9(UINT32_MAX, 0);
 1687   APInt A(32, 0x01010101);
 1695   APInt B(24, 0xAAAAAA);
 1702   APInt C(24, 0xABAAAB);
 1709   APInt D(32, 0xABBAABBA);
 1717   APInt E(32, 0);
 1735     APInt One(N, 1);
 1737       APInt MaskVal = One.shl(I) - 1;
 1753     APInt One(N, 1);
 1755       APInt MaskVal = One.shl(I) - 1;
 1759       APInt MaskVal = One.shl(I);
 1763       APInt MaskVal = APInt::getHighBitsSet(N, I);
 1763       APInt MaskVal = APInt::getHighBitsSet(N, I);
 1835       APInt X = APInt::getOneBitSet(N, I);
 1835       APInt X = APInt::getOneBitSet(N, I);
 1836       APInt Y = APInt::getOneBitSet(N, N - (I + 1));
 1836       APInt Y = APInt::getOneBitSet(N, N - (I + 1));
 1844   APInt iSrc(31, 0x00123456);
 1847   APInt i31(31, 0x76543210ull);
 1852   APInt i63(63, 0x01234567FFFFFFFFull);
 1857   APInt i120(120, UINT64_MAX, true);
 1862   APInt i127(127, UINT64_MAX, true);
 1868   APInt i128(128, 0);
 1873   APInt i256(256, UINT64_MAX, true);
 1879   APInt i257(257, 0);
 1887   APInt i260(260, UINT64_MAX, true);
 1901   APInt i31(31, 0x76543210ull);
 1906   APInt i63(63, 0x01234567FFFFFFFFull);
 1911   APInt i120(120, UINT64_MAX, true);
 1916   APInt i127(127, UINT64_MAX, true);
 1922   APInt i128(128, 0);
 1927   APInt i256(256, UINT64_MAX, true);
 1936   APInt i257(257, 0);
 1945   APInt i260(260, UINT64_MAX, true);
 1955   APInt i32(32, 0x1234567);
 1958   APInt i257(257, 0xFFFFFFFFFF0000FFull, true);
 1979   APInt i32(32, 0x1234567);
 1982   APInt i257(257, 0xFFFFFFFFFF0000FFull, true);
 2005   APInt i128lo64 = APInt::getLowBitsSet(128, 64);
 2005   APInt i128lo64 = APInt::getLowBitsSet(128, 64);
 2015   APInt i64hi1lo1 = APInt::getBitsSet(64, 1, 63);
 2015   APInt i64hi1lo1 = APInt::getBitsSet(64, 1, 63);
 2023   APInt i127hi1lo1 = APInt::getBitsSet(127, 1, 126);
 2023   APInt i127hi1lo1 = APInt::getBitsSet(127, 1, 126);
 2033   APInt i64hi32 = APInt::getHighBitsSet(64, 32);
 2033   APInt i64hi32 = APInt::getHighBitsSet(64, 32);
 2043   APInt i64hi31 = APInt::getBitsSetFrom(64, 33);
 2043   APInt i64hi31 = APInt::getBitsSetFrom(64, 33);
 2053   APInt i64lo32(64, 0);
 2062   APInt i128lo64(128, 0);
 2071   APInt i128lo24(128, 0);
 2080   APInt i128lo104(128, 0);
 2089   APInt i128lo0(128, 0);
 2098   APInt i80lo79(80, 0);
 2109   APInt i64hi32(64, 0);
 2118   APInt i128hi64(128, 0);
 2127   APInt i128hi24(128, 0);
 2136   APInt i128hi104(128, 0);
 2145   APInt i128hi0(128, 0);
 2154   APInt i80hi1(80, 0);
 2163   APInt i32hi16(32, 0);
 2174   APInt i64from63(64, 0);
 2185   APInt i32(32, 0);
 2194   APInt i64(64, 0);
 2203   APInt i96(96, 0);
 2212   APInt i128(128, 0);
 2223   APInt i32(32, 0xfa);
 2226   APInt i128(128, 0xfa);
 2232   APInt i32(32, 0xfa);
 2235   APInt i128(128, 0xfa);
 2241   APInt i64hi32 = APInt::getAllOnesValue(64);
 2241   APInt i64hi32 = APInt::getAllOnesValue(64);
 2250   APInt i128hi64 = APInt::getAllOnesValue(128);
 2250   APInt i128hi64 = APInt::getAllOnesValue(128);
 2259   APInt i128hi24 = APInt::getAllOnesValue(128);
 2259   APInt i128hi24 = APInt::getAllOnesValue(128);
 2268   APInt i128hi104 = APInt::getAllOnesValue(128);
 2268   APInt i128hi104 = APInt::getAllOnesValue(128);
 2277   APInt i128hi0 = APInt::getAllOnesValue(128);
 2277   APInt i128hi0 = APInt::getAllOnesValue(128);
 2286   APInt i80hi1 = APInt::getAllOnesValue(80);
 2286   APInt i80hi1 = APInt::getAllOnesValue(80);
 2295   APInt i32hi16 = APInt::getAllOnesValue(32);
 2295   APInt i32hi16 = APInt::getAllOnesValue(32);
 2310     APInt Zero(Bits, 0), One(Bits, 1);
 2317       APInt Two(Bits, 2);
 2323       APInt Max(Bits, 0);
 2330       APInt MaxOver2 = Max.udiv(Two);
 2339   APInt HugePrime = APInt::getLowBitsSet(BitWidth, 4423);
 2339   APInt HugePrime = APInt::getLowBitsSet(BitWidth, 4423);
 2342   APInt A = HugePrime * APInt(BitWidth, 9931);
 2343   APInt B = HugePrime * APInt(BitWidth, 123456);
 2344   APInt C = GreatestCommonDivisor(A, B);
 2349   APInt i256(APInt::getHighBitsSet(256, 2));
 2349   APInt i256(APInt::getHighBitsSet(256, 2));
 2377   const APInt neg_one(128, static_cast<uint64_t>(-1), true);
 2382   APInt i72(APInt::getHighBitsSet(72, 1));
 2382   APInt i72(APInt::getHighBitsSet(72, 1));
 2388   i72 = APInt::getHighBitsSet(72, 1);
 2394   APInt i128(APInt::getHighBitsSet(128, 1));
 2394   APInt i128(APInt::getHighBitsSet(128, 1));
 2401   const APInt signmin32(APInt::getSignedMinValue(32));
 2401   const APInt signmin32(APInt::getSignedMinValue(32));
 2405   const APInt umax32(APInt::getSignedMaxValue(32));
 2405   const APInt umax32(APInt::getSignedMaxValue(32));
 2409   const APInt signmin128(APInt::getSignedMinValue(128));
 2409   const APInt signmin128(APInt::getSignedMinValue(128));
 2413   const APInt umax128(APInt::getSignedMaxValue(128));
 2413   const APInt umax128(APInt::getSignedMaxValue(128));
 2418   APInt i256(APInt::getLowBitsSet(256, 2));
 2418   APInt i256(APInt::getLowBitsSet(256, 2));
 2446   const APInt neg_one(128, static_cast<uint64_t>(-1), true);
 2451   APInt i32_1(32, 1);
 2452   APInt i32_2(32, 2);
 2453   APInt i32_3(32, 3);
 2460   APInt i128_1(128, 1);
 2461   APInt i128_2(128, 2);
 2462   APInt i128_3(128, 3);
 2483   APInt i32_max(APInt::getSignedMaxValue(32).sext(63));
 2483   APInt i32_max(APInt::getSignedMaxValue(32).sext(63));
 2488   APInt i32_min(APInt::getSignedMinValue(32).sext(63));
 2488   APInt i32_min(APInt::getSignedMinValue(32).sext(63));
 2493   APInt i32_neg1(APInt(32, ~uint64_t(0)).sext(63));
 2500   APInt i64(64, 1234);
 2505   APInt i128 = APInt::getOneBitSet(128, 64);
 2505   APInt i128 = APInt::getOneBitSet(128, 64);
 2506   APInt i128_1234(128, 1234);
 2511   APInt i96 = APInt::getOneBitSet(96, 64);
 2511   APInt i96 = APInt::getOneBitSet(96, 64);
 2520     APInt A(8, Ai);
 2521     APInt Zero(8, 0);
 2527       APInt B(8, Bi);
 2529         APInt Quo = APIntOps::RoundingUDiv(A, B, APInt::Rounding::UP);
 2529         APInt Quo = APIntOps::RoundingUDiv(A, B, APInt::Rounding::UP);
 2530         auto Prod = Quo.zext(16) * B.zext(16);
 2537         APInt Quo = A.udiv(B);
 2547     APInt A(8, Ai);
 2550       APInt Zero(8, 0);
 2560       APInt B(8, Bi);
 2562         APInt Quo = APIntOps::RoundingSDiv(A, B, APInt::Rounding::UP);
 2562         APInt Quo = APIntOps::RoundingSDiv(A, B, APInt::Rounding::UP);
 2563         auto Prod = Quo.sext(16) * B.sext(16);
 2570         APInt Quo = APIntOps::RoundingSDiv(A, B, APInt::Rounding::DOWN);
 2570         APInt Quo = APIntOps::RoundingSDiv(A, B, APInt::Rounding::DOWN);
 2571         auto Prod = Quo.sext(16) * B.sext(16);
 2578         APInt Quo = A.sdiv(B);
 2600     APInt A(64, X.first);
 2601     APInt B(64, X.second);
 2606     APInt A(64, X.first);
 2607     APInt B(64, X.second);
 2615         APInt C = APInt(Bits, A).umul_ov(APInt(Bits, B), Overflow);
 2616         APInt D = APInt(2 * Bits, A) * APInt(2 * Bits, B);
 2691           Optional<APInt> S = APIntOps::SolveQuadraticEquationWrap(
 2709       APInt V = APInt(BitWidth, Value);
 2710       APInt MulInv =
 2712               .multiplicativeInverse(APInt::getSignedMinValue(BitWidth + 1))
 2714       APInt One = V * MulInv;
 2769         APInt A = APInt(BitWidth, V0);
 2770         APInt B = APInt(BitWidth, V1);
 2780             APInt Adash = A;
 2782             APInt Bdash = B;
unittests/ADT/APSIntTest.cpp
   27   APInt Wide(256, 0);
unittests/Analysis/ScalarEvolutionTest.cpp
   61   static Optional<APInt> computeConstantDifference(ScalarEvolution &SE,
unittests/CodeGen/AArch64SelectionDAGTest.cpp
   90   auto DemandedElts = APInt(2, 3);
  105   auto DemandedElts = APInt(3, 7);
  120   auto DemandedElts = APInt(2, 3);
  134   auto DemandedElts = APInt(3, 7);
  151   auto DemandedElts = APInt(3, 7);
  152   auto KnownUndef = APInt(3, 0);
  153   auto KnownZero = APInt(3, 0);
unittests/CodeGen/GlobalISel/ConstantFoldingTest.cpp
   83   Optional<APInt> FoldGAddInt =
   88   Optional<APInt> FoldGAddMix =
   95   Optional<APInt> FoldGAndInt =
  100   Optional<APInt> FoldGAndMix =
  107   Optional<APInt> FoldGAShrInt =
  112   Optional<APInt> FoldGAShrMix =
  119   Optional<APInt> FoldGLShrInt =
  124   Optional<APInt> FoldGLShrMix =
  131   Optional<APInt> FoldGMulInt =
  136   Optional<APInt> FoldGMulMix =
  143   Optional<APInt> FoldGOrInt =
  148   Optional<APInt> FoldGOrMix =
  155   Optional<APInt> FoldGShlInt =
  160   Optional<APInt> FoldGShlMix =
  167   Optional<APInt> FoldGSubInt =
  172   Optional<APInt> FoldGSubMix =
  179   Optional<APInt> FoldGXorInt =
  184   Optional<APInt> FoldGXorMix =
  191   Optional<APInt> FoldGUdivInt =
  196   Optional<APInt> FoldGUdivMix =
  203   Optional<APInt> FoldGSdivInt =
  208   Optional<APInt> FoldGSdivMix =
  215   Optional<APInt> FoldGUremInt =
  220   Optional<APInt> FoldGUremMix =
  227   Optional<APInt> FoldGSremInt =
  232   Optional<APInt> FoldGSremMix =
unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
  118   APInt Zeroes = Info.getKnownZeroes(SrcReg);
unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp
   50   APInt APV32(32, 12345);
unittests/CodeGen/MachineOperandTest.cpp
   87   APInt Int(128, UINT64_MAX);
unittests/IR/ConstantRangeTest.cpp
   56     APInt N = CR.getLower();
   69     APInt Min = APInt::getMaxValue(Bits);
   69     APInt Min = APInt::getMaxValue(Bits);
   70     APInt Max = APInt::getMinValue(Bits);
   70     APInt Max = APInt::getMinValue(Bits);
   76         APInt N = IntFn(N1, N2);
  106     APInt Min = APInt::getSignedMaxValue(Bits);
  106     APInt Min = APInt::getSignedMaxValue(Bits);
  107     APInt Max = APInt::getSignedMinValue(Bits);
  107     APInt Max = APInt::getSignedMinValue(Bits);
  113         APInt N = IntFn(N1, N2);
  289   ConstantRange CR1(APInt(8, 42), APInt::getMinValue(8));
  293   ConstantRange CR2(APInt(8, 42), APInt::getSignedMinValue(8));
  436         APInt Lower1(Bits, 0), Upper1(Bits, 0);
  437         APInt Lower2(Bits, 0), Upper2(Bits, 0);
  438         APInt Lower3(Bits, 0), Upper3(Bits, 0);
  443         APInt Num(Bits, 0);
  652     APInt Min = APInt::getSignedMaxValue(Bits);
  652     APInt Min = APInt::getSignedMaxValue(Bits);
  653     APInt Max = APInt::getSignedMinValue(Bits);
  653     APInt Max = APInt::getSignedMinValue(Bits);
  657         APInt N = IntFn(IsOverflow, N1, N2);
  685     APInt Min = APInt::getMaxValue(Bits);
  685     APInt Min = APInt::getMaxValue(Bits);
  686     APInt Max = APInt::getMinValue(Bits);
  686     APInt Max = APInt::getMinValue(Bits);
  690         APInt N = IntFn(IsOverflow, N1, N2);
  721         APInt UMin = APInt::getMaxValue(Bits);
  721         APInt UMin = APInt::getMaxValue(Bits);
  722         APInt UMax = APInt::getMinValue(Bits);
  722         APInt UMax = APInt::getMinValue(Bits);
  723         APInt SMin = APInt::getSignedMaxValue(Bits);
  723         APInt SMin = APInt::getSignedMaxValue(Bits);
  724         APInt SMax = APInt::getSignedMinValue(Bits);
  724         APInt SMax = APInt::getSignedMinValue(Bits);
  728             APInt N = IntFnSigned(IsSignedOverflow, N1, N2);
 1096         APInt N = N1.sdiv(N2);
 1108     APInt SMin(Bits, Results.find_first() - Bias);
 1109     APInt SMax(Bits, Results.find_last() - Bias);
 1128     APInt WMax(Bits, LastNeg);
 1129     APInt WMin(Bits, LastPos);
 1182   ConstantRange IntMinMod(APInt::getSignedMinValue(16));
 1319   ConstantRange SMax = ConstantRange(APInt::getSignedMaxValue(32));
 1382     APInt C(4, Const, true /* = isSigned */);
 1394     for (APInt I = NUWRegion.getLower(), E = NUWRegion.getUpper(); I != E;
 1401     for (APInt I = NSWRegion.getLower(), E = NSWRegion.getUpper(); I != E;
 1410     APInt C(4, Const, true /* = isSigned */);
 1422     for (APInt I = NUWRegion.getLower(), E = NUWRegion.getUpper(); I != E;
 1429     for (APInt I = NSWRegion.getLower(), E = NSWRegion.getUpper(); I != E;
 1693   APInt RHS;
 1789   ConstantRange Zero(APInt::getNullValue(16));
 1823   ConstantRange Zero(APInt::getNullValue(16));
 1824   ConstantRange Max(APInt::getAllOnesValue(16));
 1858   ConstantRange Zero(APInt::getNullValue(16));
 1910   ConstantRange Zero(APInt::getNullValue(16));
 2109       APInt MinUnsigned = APInt::getMaxValue(Bits);
 2109       APInt MinUnsigned = APInt::getMaxValue(Bits);
 2110       APInt MaxUnsigned = APInt::getMinValue(Bits);
 2110       APInt MaxUnsigned = APInt::getMinValue(Bits);
 2111       APInt MinSigned = APInt::getSignedMaxValue(Bits);
 2111       APInt MinSigned = APInt::getSignedMaxValue(Bits);
 2112       APInt MaxSigned = APInt::getSignedMinValue(Bits);
 2112       APInt MaxSigned = APInt::getSignedMinValue(Bits);
 2114         APInt Num(Bits, N);
 2204     APInt Min = APInt::getMaxValue(Bits);
 2204     APInt Min = APInt::getMaxValue(Bits);
 2205     APInt Max = APInt::getMinValue(Bits);
 2205     APInt Max = APInt::getMinValue(Bits);
 2207       APInt AbsN = N.abs();
unittests/IR/MDBuilderTest.cpp
   46   APInt A(8, 1), B(8, 2);
unittests/Support/KnownBitsTest.cpp
   41     APInt Num(Bits, N);
   62               APInt Add = N1 + N2;
   94           APInt Res;
unittests/tools/llvm-exegesis/AArch64/TargetTest.cpp
   53   std::vector<MCInst> setRegTo(unsigned Reg, const APInt &Value) {
unittests/tools/llvm-exegesis/Mips/TargetTest.cpp
   65   std::vector<MCInst> setRegTo(unsigned Reg, const APInt &Value) {
unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
  355                                                         APInt Value) {
unittests/tools/llvm-exegesis/X86/TargetTest.cpp
  117   std::vector<MCInst> setRegTo(unsigned Reg, const APInt &Value) {
usr/include/c++/7.4.0/array
   50       typedef _Tp _Type[_Nm];
   51       typedef __is_swappable<_Tp> _Is_swappable;
   52       typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable;
   54       static constexpr _Tp&
   58       static constexpr _Tp*
   96       typedef _Tp 	    			      value_type;
  109       typedef _GLIBCXX_STD_C::__array_traits<_Tp, _Nm> _AT_Type;
usr/include/c++/7.4.0/bits/alloc_traits.h
  474 	construct(allocator_type& __a, _Up* __p, _Args&&... __args)
  475 	{ __a.construct(__p, std::forward<_Args>(__args)...); }
usr/include/c++/7.4.0/bits/move.h
   46     inline _GLIBCXX_CONSTEXPR _Tp*
   47     __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
   72     constexpr _Tp&&
   73     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
   83     constexpr _Tp&&
   84     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
   98     move(_Tp&& __t) noexcept
  136     inline _GLIBCXX17_CONSTEXPR _Tp*
  137     addressof(_Tp& __r) noexcept
  143     const _Tp* addressof(const _Tp&&) = delete;
  143     const _Tp* addressof(const _Tp&&) = delete;
  184     typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
  185 			      is_move_constructible<_Tp>,
  186 			      is_move_assignable<_Tp>>::value>::type
  187     swap(_Tp& __a, _Tp& __b)
  187     swap(_Tp& __a, _Tp& __b)
  198       _Tp __tmp = _GLIBCXX_MOVE(__a);
usr/include/c++/7.4.0/bits/stl_algo.h
 3455     inline _Tp
 3456     min(initializer_list<_Tp> __l, _Compare __comp)
 3467     inline _Tp
 3468     max(initializer_list<_Tp> __l, _Compare __comp)
usr/include/c++/7.4.0/bits/stl_construct.h
   74     _Construct(_T1* __p, _Args&&... __args)
   74     _Construct(_T1* __p, _Args&&... __args)
   75     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
   75     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
   97     _Destroy(_Tp* __pointer)
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h
  181       typedef _Tp                         value_type;
  183       typedef _Tp*                        pointer;
  184       typedef _Tp&                        reference;
  192       typedef _Tp                         value_type;
  194       typedef const _Tp*                  pointer;
  195       typedef const _Tp&                  reference;
usr/include/c++/7.4.0/bits/stl_map.h
  102       typedef _Key					key_type;
  104       typedef std::pair<const _Key, _Tp>		value_type;
usr/include/c++/7.4.0/bits/stl_pair.h
  100 	return __and_<is_constructible<_T1, const _U1&>,
  100 	return __and_<is_constructible<_T1, const _U1&>,
  101 		      is_constructible<_T2, const _U2&>>::value;
  101 		      is_constructible<_T2, const _U2&>>::value;
  107 	return __and_<is_convertible<const _U1&, _T1>,
  107 	return __and_<is_convertible<const _U1&, _T1>,
  108 		      is_convertible<const _U2&, _T2>>::value;
  108 		      is_convertible<const _U2&, _T2>>::value;
  114 	return __and_<is_constructible<_T1, _U1&&>,
  114 	return __and_<is_constructible<_T1, _U1&&>,
  115 		      is_constructible<_T2, _U2&&>>::value;
  115 		      is_constructible<_T2, _U2&&>>::value;
  121 	return __and_<is_convertible<_U1&&, _T1>,
  121 	return __and_<is_convertible<_U1&&, _T1>,
  122 		      is_convertible<_U2&&, _T2>>::value;
  122 		      is_convertible<_U2&&, _T2>>::value;
  128 	using __do_converts = __and_<is_convertible<const _U1&, _T1>,
  128 	using __do_converts = __and_<is_convertible<const _U1&, _T1>,
  129 				  is_convertible<_U2&&, _T2>>;
  129 				  is_convertible<_U2&&, _T2>>;
  133 	return __and_<is_constructible<_T1, const _U1&>,
  133 	return __and_<is_constructible<_T1, const _U1&>,
  134 		      is_constructible<_T2, _U2&&>,
  134 		      is_constructible<_T2, _U2&&>,
  142 	using __do_converts = __and_<is_convertible<_U1&&, _T1>,
  142 	using __do_converts = __and_<is_convertible<_U1&&, _T1>,
  143 				  is_convertible<const _U2&, _T2>>;
  143 				  is_convertible<const _U2&, _T2>>;
  147 	return __and_<is_constructible<_T1, _U1&&>,
  147 	return __and_<is_constructible<_T1, _U1&&>,
  148 		      is_constructible<_T2, const _U2&&>,
  148 		      is_constructible<_T2, const _U2&&>,
  209     : private __pair_base<_T1, _T2>
  209     : private __pair_base<_T1, _T2>
  211       typedef _T1 first_type;    /// @c first_type is the first bound type
  212       typedef _T2 second_type;   /// @c second_type is the second bound type
  214       _T1 first;                 /// @c first is a copy of the first object
  215       _T2 second;                /// @c second is a copy of the second object
  252       using _PCCP = _PCC<true, _T1, _T2>;
  252       using _PCCP = _PCC<true, _T1, _T2>;
  260       constexpr pair(const _T1& __a, const _T2& __b)
  260       constexpr pair(const _T1& __a, const _T2& __b)
  269       explicit constexpr pair(const _T1& __a, const _T2& __b)
  269       explicit constexpr pair(const _T1& __a, const _T2& __b)
  283 			    _T1, _T2>;
  283 			    _T1, _T2>;
  291         constexpr pair(const pair<_U1, _U2>& __p)
  311        constexpr pair(_U1&& __x, const _T2& __y)
  311        constexpr pair(_U1&& __x, const _T2& __y)
  318        explicit constexpr pair(_U1&& __x, const _T2& __y)
  325        constexpr pair(const _T1& __x, _U2&& __y)
  325        constexpr pair(const _T1& __x, _U2&& __y)
  332        explicit pair(const _T1& __x, _U2&& __y)
  341 	constexpr pair(_U1&& __x, _U2&& __y)
  341 	constexpr pair(_U1&& __x, _U2&& __y)
  342 	: first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
  342 	: first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
  360 	constexpr pair(pair<_U1, _U2>&& __p)
  362 	  second(std::forward<_U2>(__p.second)) { }
  379 		__and_<is_copy_assignable<_T1>,
  380 		       is_copy_assignable<_T2>>::value,
  390 		__and_<is_move_assignable<_T1>,
  391 		       is_move_assignable<_T2>>::value,
  402       typename enable_if<__and_<is_assignable<_T1&, const _U1&>,
  402       typename enable_if<__and_<is_assignable<_T1&, const _U1&>,
  403 				is_assignable<_T2&, const _U2&>>::value,
  403 				is_assignable<_T2&, const _U2&>>::value,
  405 	operator=(const pair<_U1, _U2>& __p)
  405 	operator=(const pair<_U1, _U2>& __p)
  413       typename enable_if<__and_<is_assignable<_T1&, _U1&&>,
  413       typename enable_if<__and_<is_assignable<_T1&, _U1&&>,
  414 				is_assignable<_T2&, _U2&&>>::value,
  414 				is_assignable<_T2&, _U2&&>>::value,
  416 	operator=(pair<_U1, _U2>&& __p)
  416 	operator=(pair<_U1, _U2>&& __p)
  448     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  448     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  448     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  448     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  461     operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  461     operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  522     constexpr pair<typename __decay_and_strip<_T1>::__type,
  523                    typename __decay_and_strip<_T2>::__type>
  524     make_pair(_T1&& __x, _T2&& __y)
  524     make_pair(_T1&& __x, _T2&& __y)
  526       typedef typename __decay_and_strip<_T1>::__type __ds_type1;
  527       typedef typename __decay_and_strip<_T2>::__type __ds_type2;
  529       return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
  529       return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y));
usr/include/c++/7.4.0/bits/stl_tree.h
  563       typedef _Key 				key_type;
  758       static const _Key&
  782       static const _Key&
usr/include/c++/7.4.0/bits/stl_uninitialized.h
  144 		      const _Tp& __x)
  182 		       const _Tp& __x)
  204 			const _Tp& __x)
  244     uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
usr/include/c++/7.4.0/bits/stl_vector.h
  962 	emplace_back(_Args&&... __args);
 1483 	_M_realloc_insert(iterator __position, _Args&&... __args);
usr/include/c++/7.4.0/bits/vector.tcc
  101 				     std::forward<_Args>(__args)...);
  105 	  _M_realloc_insert(end(), std::forward<_Args>(__args)...);
  418 				   std::forward<_Args>(__args)...);
usr/include/c++/7.4.0/ext/new_allocator.h
  135 	construct(_Up* __p, _Args&&... __args)
  136 	{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
usr/include/c++/7.4.0/initializer_list
   50       typedef _E 		value_type;
   51       typedef const _E& 	reference;
   52       typedef const _E& 	const_reference;
   54       typedef const _E* 	iterator;
   55       typedef const _E* 	const_iterator;
usr/include/c++/7.4.0/limits
  316       static _GLIBCXX_CONSTEXPR _Tp
  320       static _GLIBCXX_CONSTEXPR _Tp
  326       static constexpr _Tp
  332       static _GLIBCXX_CONSTEXPR _Tp
  336       static _GLIBCXX_CONSTEXPR _Tp
  340       static _GLIBCXX_CONSTEXPR _Tp
  345       static _GLIBCXX_CONSTEXPR _Tp
  350       static _GLIBCXX_CONSTEXPR _Tp
  356       static _GLIBCXX_CONSTEXPR _Tp
usr/include/c++/7.4.0/tuple
   56     struct __is_empty_non_tuple : is_empty<_Tp> { };
  125       constexpr _Head_base(const _Head& __h)
  132         constexpr _Head_base(_UHead&& __h)
  133 	: _M_head_impl(std::forward<_UHead>(__h)) { }
  159       static constexpr _Head&
  162       static constexpr const _Head&
  165       _Head _M_head_impl;
  186     : public _Tuple_impl<_Idx + 1, _Tail...>,
  187       private _Head_base<_Idx, _Head>
  191       typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
  192       typedef _Head_base<_Idx, _Head> _Base;
  194       static constexpr _Head&
  197       static constexpr const _Head&
  210       constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail)
  210       constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail)
  216         constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
  216         constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
  227 	_Base(std::forward<_Head>(_M_head(__in))) { }
  230         constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
  235         constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
  235         constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
  242 	_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a)
  248 		    const _Head& __head, const _Tail&... __tail)
  248 		    const _Head& __head, const _Tail&... __tail)
  262         _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
  268 	_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
  313 	  _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in);
  314 	  _M_tail(*this) = _Tuple_impl<_Idx, _UElements...>::_M_tail(__in);
  350       static constexpr _Head&
  353       static constexpr const _Head&
  360       constexpr _Tuple_impl(const _Head& __head)
  365         constexpr _Tuple_impl(_UHead&& __head)
  390 		    const _Head& __head)
  473       return __and_<is_constructible<_Elements, const _UElements&>...>::value;
  473       return __and_<is_constructible<_Elements, const _UElements&>...>::value;
  479       return __and_<is_convertible<const _UElements&, _Elements>...>::value;
  479       return __and_<is_convertible<const _UElements&, _Elements>...>::value;
  485       return __and_<is_constructible<_Elements, _UElements&&>...>::value;
  485       return __and_<is_constructible<_Elements, _UElements&&>...>::value;
  491       return __and_<is_convertible<_UElements&&, _Elements>...>::value;
  491       return __and_<is_convertible<_UElements&&, _Elements>...>::value;
  508       return  __not_<is_same<tuple<_Elements...>,
  556     class tuple : public _Tuple_impl<0, _Elements...>
  558       typedef _Tuple_impl<0, _Elements...> _Inherited;
  598             _Elements...>;
  608         constexpr tuple(const _Elements&... __elements)
  619       explicit constexpr tuple(const _Elements&... __elements)
  628                       _Elements...>;
  636                       _Elements...>;
  646         constexpr tuple(_UElements&&... __elements)
  668             _Elements...>;
  730 	      const _Elements&... __elements)
  741                        const _Elements&... __elements)
  853         operator=(const tuple<_UElements...>& __in)
  863         operator=(tuple<_UElements...>&& __in)
  947         constexpr tuple(const _T1& __a1, const _T2& __a2)
  956         explicit constexpr tuple(const _T1& __a1, const _T2& __a2)
  971         constexpr tuple(_U1&& __a1, _U2&& __a2)
 1066 	tuple(allocator_arg_t __tag, const _Alloc& __a)
 1078 	      const _T1& __a1, const _T2& __a2)
 1090 	      const _T1& __a1, const _T2& __a2)
 1241         operator=(const pair<_U1, _U2>& __in)
 1250         operator=(pair<_U1, _U2>&& __in)
 1253 	  this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second);
 1302     constexpr _Head&
 1307     constexpr const _Head&
 1313     constexpr __tuple_element_t<__i, tuple<_Elements...>>&
 1319     constexpr const __tuple_element_t<__i, tuple<_Elements...>>&
 1325     constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
 1448     make_tuple(_Elements&&... __args)
 1588     constexpr tuple<_Elements&...>
 1589     tie(_Elements&... __args) noexcept
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  326     : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
  354     : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
  567     : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  631     : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  762     typename add_rvalue_reference<_Tp>::type declval() noexcept;
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  798       typedef decltype(__test<_Tp>(0)) type;
  811                remove_all_extents<_Tp>::type>::type
  825     : public __is_destructible_safe<_Tp>::type
  889       typedef decltype(__test<_Tp>(0)) type;
  894     : public __and_<__not_<is_void<_Tp>>,
  895                     __is_default_constructible_impl<_Tp>>
  915     : public __is_default_constructible_atom<_Tp>::type
  921     : public __is_default_constructible_safe<_Tp>::type
  984       typedef decltype(__test<_Tp, _Arg>(0)) type;
  989     : public __and_<is_destructible<_Tp>,
  990                     __is_direct_constructible_impl<_Tp, _Arg>>
 1072 			 __is_direct_constructible_ref_cast<_Tp, _Arg>,
 1073 			 __is_direct_constructible_new_safe<_Tp, _Arg>
 1079     : public __is_direct_constructible_new<_Tp, _Arg>::type
 1119     : public __is_direct_constructible<_Tp, _Arg>
 1130     : public __is_constructible_impl<_Tp, _Args...>::type
 1142     : public is_constructible<_Tp, const _Tp&>
 1142     : public is_constructible<_Tp, const _Tp&>
 1148     : public __is_copy_constructible_impl<_Tp>
 1160     : public is_constructible<_Tp, _Tp&&>
 1160     : public is_constructible<_Tp, _Tp&&>
 1166     : public __is_move_constructible_impl<_Tp>
 1215     : public __and_<is_constructible<_Tp, _Args...>,
 1216 		    __is_nt_constructible_impl<_Tp, _Args...>>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1252     : public __is_nothrow_move_constructible_impl<_Tp>
 1286     : public is_assignable<_Tp&, const _Tp&>
 1286     : public is_assignable<_Tp&, const _Tp&>
 1292     : public __is_copy_assignable_impl<_Tp>
 1304     : public is_assignable<_Tp&, _Tp&&>
 1304     : public is_assignable<_Tp&, _Tp&&>
 1310     : public __is_move_assignable_impl<_Tp>
 1352     : public is_nothrow_assignable<_Tp&, _Tp&&>
 1352     : public is_nothrow_assignable<_Tp&, _Tp&&>
 1358     : public __is_nt_move_assignable_impl<_Tp>
 1377     static void __helper(const _Tp&);
 1390     typedef decltype(__test(declval<_Tp>())) type;
 1395       : public __is_implicitly_default_constructible_impl<_Tp>::type
 1400       : public __and_<is_default_constructible<_Tp>,
 1401                       __is_implicitly_default_constructible_safe<_Tp>>
 1526 	static void __test_aux(_To1);
 1538       typedef decltype(__test<_From, _To>(0)) type;
 1538       typedef decltype(__test<_From, _To>(0)) type;
 1545     : public __is_convertible_helper<_From, _To>::type
 1545     : public __is_convertible_helper<_From, _To>::type
 1554     { typedef _Tp     type; };
 1558     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1629     { typedef _Tp   type; };
 1633     { typedef _Tp   type; };
 1659     { typedef _Tp&&   type; };
 1664     : public __add_rvalue_reference_helper<_Tp>
 1955     { typedef _Tp     type; };
 2104     { typedef typename remove_cv<_Up>::type __type; };
 2118       typedef typename remove_reference<_Tp>::type __remove_type;
 2131       typedef _Tp __type;
 2144 	typename decay<_Tp>::type>::__type __type;
 2574       typename remove_reference<_Tp>::type>::type>::type
utils/TableGen/CodeEmitterGen.cpp
  341 static void emitInstBits(raw_ostream &OS, const APInt &Bits) {
  377     APInt Value(BitWidth, 0);
  479     int NumWords = APInt::getNumWords(BitWidth);
utils/TableGen/CodeGenSchedule.cpp
  269 static APInt constructOperandMask(ArrayRef<int64_t> Indices) {
  270   APInt OperandMask;
  291   std::vector<std::pair<APInt, APInt>> OpcodeMasks;
  291   std::vector<std::pair<APInt, APInt>> OpcodeMasks;
  323   APInt DefaultProcMask(ProcModelMap.size(), 0);
  324   APInt DefaultPredMask(NumUniquePredicates, 0);
  325   for (std::pair<APInt, APInt> &MaskPair : OpcodeMasks)
  325   for (std::pair<APInt, APInt> &MaskPair : OpcodeMasks)
  334     APInt ProcMask(ProcModelMap.size(), 0);
  342       APInt OperandMask = constructOperandMask(OpIndices);
  345       APInt PredMask(NumUniquePredicates, 0);
  371                const std::pair<APInt, APInt> &LhsMasks = OpcodeMasks[LhsIdx];
  371                const std::pair<APInt, APInt> &LhsMasks = OpcodeMasks[LhsIdx];
  372                const std::pair<APInt, APInt> &RhsMasks = OpcodeMasks[RhsIdx];
  372                const std::pair<APInt, APInt> &RhsMasks = OpcodeMasks[RhsIdx];
  426 void OpcodeInfo::addPredicateForProcModel(const llvm::APInt &CpuMask,
  427                                           const llvm::APInt &OperandMask,
utils/TableGen/CodeGenSchedule.h
  313   llvm::APInt ProcModelMask; // A set of processor model indices.
  314   llvm::APInt OperandMask;   // An operand mask.
  316   PredicateInfo(llvm::APInt CpuMask, llvm::APInt Operands, const Record *Pred)
  316   PredicateInfo(llvm::APInt CpuMask, llvm::APInt Operands, const Record *Pred)
  342   void addPredicateForProcModel(const llvm::APInt &CpuMask,
  343                                 const llvm::APInt &OperandMask,
utils/TableGen/FixedLenDecoderEmitter.cpp
 1297   APInt PositiveMask(BitWidth, 0ULL);
 1298   APInt NegativeMask(BitWidth, 0ULL);
utils/TableGen/PredicateExpander.cpp
  433     const APInt &ProcModelMask = PI.ProcModelMask;
utils/unittest/googlemock/include/gmock/gmock-matchers.h
  206   bool operator()(const A& a, const B& b) const { return a == b; }
  206   bool operator()(const A& a, const B& b) const { return a == b; }
  519   static Matcher<T> Cast(const M& polymorphic_matcher_or_value) {
  536             internal::ImplicitlyConvertible<M, Matcher<T> >::value>());
  540   static Matcher<T> CastImpl(const M& value, BooleanConstant<false>) {
  547   static Matcher<T> CastImpl(const M& polymorphic_matcher_or_value,
  612 inline Matcher<T> MatcherCast(const M& matcher) {
  613   return internal::MatcherCastImpl<T, M>::Cast(matcher);
  897   explicit ComparisonBase(const Rhs& rhs) : rhs_(rhs) {}
  907     explicit Impl(const Rhs& rhs) : rhs_(rhs) {}
  921     Rhs rhs_;
  924   Rhs rhs_;
  929 class EqMatcher : public ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq> {
  929 class EqMatcher : public ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq> {
  931   explicit EqMatcher(const Rhs& rhs)
 2230   const Matcher<const FieldType&> matcher_;
 3760 inline internal::EqMatcher<T> Eq(T x) { return internal::EqMatcher<T>(x); }
 3760 inline internal::EqMatcher<T> Eq(T x) { return internal::EqMatcher<T>(x); }
 3914   internal::FieldMatcher<Class, FieldType> > Field(
 3918           field, MatcherCast<const FieldType&>(matcher)));
utils/unittest/googletest/include/gtest/gtest-printers.h
  223 void DefaultPrintNonContainerTo(const T& value, ::std::ostream* os) {
  276   static ::std::string Format(const ToPrint& value) {
  351     const T1& value, const T2& /* other_operand */) {
  351     const T1& value, const T2& /* other_operand */) {
  352   return FormatForComparison<T1, T2>::Format(value);
  352   return FormatForComparison<T1, T2>::Format(value);
  366 void UniversalPrint(const T& value, ::std::ostream* os);
  373                     const C& container, ::std::ostream* os) {
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
  439                     const T& value, ::std::ostream* os) {
  455 void PrintTo(const T& value, ::std::ostream* os) {
  478   DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
  699   static void Print(const T& value, ::std::ostream* os) {
  784   static void Print(const T& value, ::std::ostream* os) {
  853 void UniversalPrint(const T& value, ::std::ostream* os) {
  856   typedef T T1;
  983   internal::UniversalTersePrinter<T>::Print(value, &ss);
utils/unittest/googletest/include/gtest/gtest.h
 1377                                    const T1& lhs, const T2& rhs) {
 1377                                    const T1& lhs, const T2& rhs) {
 1389                             const T1& lhs,
 1390                             const T2& rhs) {
 1419                                  const T1& lhs,
 1420                                  const T2& rhs) {
 1452       const T2& rhs,
 1458       typename EnableIf<!is_pointer<T2>::value>::type* = 0) {
 1487                                    const T1& val1, const T2& val2,
 1487                                    const T1& val1, const T2& val2,
utils/unittest/googletest/include/gtest/internal/custom/raw-ostream.h
   35 auto printable(const T &V) -> decltype(StreamSwitch<T>::printable(V)) {
   35 auto printable(const T &V) -> decltype(StreamSwitch<T>::printable(V)) {
   37   return StreamSwitch<T>::printable(V);
   54   const T& V;
   55   friend std::ostream &operator<<(std::ostream &S, const RawStreamProxy<T> &V) {
   69   static const RawStreamProxy<T> printable(const T &V) { return {V}; }
   69   static const RawStreamProxy<T> printable(const T &V) { return {V}; }
utils/unittest/googletest/include/gtest/internal/gtest-internal.h
   94 ::std::string PrintToString(const T& value);
  830 struct AddReference { typedef T& type; };  // NOLINT
  863   static typename AddReference<From>::type MakeFrom();