Home
last modified time | relevance | path

Searched refs:APInt (Results 1 – 25 of 1199) sorted by relevance

12345678910>>...48

/external/llvm-project/llvm/unittests/ADT/
DAPIntTest.cpp21 APInt Zero = APInt(); in TEST()
29 APInt One = APInt::getNullValue(65) + 1; in TEST()
30 APInt Shl = One.shl(0); in TEST()
36 const APInt neg_one(64, static_cast<uint64_t>(-1), true); in TEST()
41 APInt Minus3(128, static_cast<uint64_t>(-3), true); in TEST()
45 APInt Minus1(128, static_cast<uint64_t>(-1), true); in TEST()
56 APInt i33minus2(33, static_cast<uint64_t>(-2), true); in TEST()
67 APInt i61(61, 1 << 15); in TEST()
87 APInt i65(65, 0, true); in TEST()
95 APInt i65minus(65, 0, true); in TEST()
[all …]
DAPSIntTest.cpp27 APInt Wide(256, 0); in TEST()
36 Wide = APInt(128, 1); in TEST()
66 EXPECT_TRUE(APSInt(APInt(3, 7), true).isUnsigned()); in TEST()
67 EXPECT_TRUE(APSInt(APInt(3, 7), false).isSigned()); in TEST()
68 EXPECT_TRUE(APSInt(APInt(4, 7), true).isUnsigned()); in TEST()
69 EXPECT_TRUE(APSInt(APInt(4, 7), false).isSigned()); in TEST()
70 EXPECT_TRUE(APSInt(APInt(4, -7), true).isUnsigned()); in TEST()
71 EXPECT_TRUE(APSInt(APInt(4, -7), false).isSigned()); in TEST()
72 EXPECT_EQ(7, APSInt(APInt(3, 7), true).getExtValue()); in TEST()
73 EXPECT_EQ(-1, APSInt(APInt(3, 7), false).getExtValue()); in TEST()
[all …]
/external/llvm/unittests/ADT/
DAPIntTest.cpp21 APInt Zero = APInt(); in TEST()
29 APInt One = APInt::getNullValue(65) + 1; in TEST()
30 APInt Shl = One.shl(0); in TEST()
36 APInt Minus3(128, static_cast<uint64_t>(-3), true); in TEST()
40 APInt Minus1(128, static_cast<uint64_t>(-1), true); in TEST()
54 APInt i33minus2(33, static_cast<uint64_t>(-2), true); in TEST()
67 APInt i65(65, 0, true); in TEST()
75 APInt i65minus(65, 0, true); in TEST()
85 APInt u128max = APInt::getAllOnesValue(128); in TEST()
93 APInt u64max(128, static_cast<uint64_t>(-1), false); in TEST()
[all …]
/external/swiftshader/third_party/llvm-subzero/include/llvm/ADT/
DAPInt.h43 class APInt; variable
45 inline APInt operator-(APInt);
77 class LLVM_NODISCARD APInt {
102 APInt(uint64_t *val, unsigned bits) : BitWidth(bits), pVal(val) {} in APInt() function
140 APInt &clearUnusedBits() { in clearUnusedBits()
184 static void divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS,
185 unsigned rhsWords, APInt *Quotient, APInt *Remainder);
194 void initSlowCase(const APInt &that);
197 APInt shlSlowCase(unsigned shiftAmt) const;
200 APInt AndSlowCase(const APInt &RHS) const;
[all …]
/external/llvm/include/llvm/ADT/
DAPInt.h73 class APInt {
98 APInt(uint64_t *val, unsigned bits) : BitWidth(bits), pVal(val) {} in APInt() function
136 APInt &clearUnusedBits() { in clearUnusedBits()
180 static void divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS,
181 unsigned rhsWords, APInt *Quotient, APInt *Remainder);
190 void initSlowCase(const APInt &that);
193 APInt shlSlowCase(unsigned shiftAmt) const;
196 APInt AndSlowCase(const APInt &RHS) const;
199 APInt OrSlowCase(const APInt &RHS) const;
202 APInt XorSlowCase(const APInt &RHS) const;
[all …]
DAPSInt.h22 class APSInt : public APInt {
32 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
34 explicit APSInt(APInt I, bool isUnsigned = true)
35 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function
46 APSInt &operator=(APInt RHS) {
48 APInt::operator=(std::move(RHS));
54 APInt::operator=(RHS);
66 APInt::toString(Str, Radix, isSigned());
71 return APInt::toString(Radix, isSigned()); in toString()
73 using APInt::toString;
[all …]
/external/llvm/unittests/IR/
DConstantRangeTest.cpp30 ConstantRange ConstantRangeTest::One(APInt(16, 0xa));
31 ConstantRange ConstantRangeTest::Some(APInt(16, 0xa), APInt(16, 0xaaa));
32 ConstantRange ConstantRangeTest::Wrap(APInt(16, 0xaaa), APInt(16, 0xa));
39 EXPECT_TRUE(Full.contains(APInt(16, 0x0))); in TEST_F()
40 EXPECT_TRUE(Full.contains(APInt(16, 0x9))); in TEST_F()
41 EXPECT_TRUE(Full.contains(APInt(16, 0xa))); in TEST_F()
42 EXPECT_TRUE(Full.contains(APInt(16, 0xaa9))); in TEST_F()
43 EXPECT_TRUE(Full.contains(APInt(16, 0xaaa))); in TEST_F()
49 EXPECT_FALSE(Empty.contains(APInt(16, 0x0))); in TEST_F()
50 EXPECT_FALSE(Empty.contains(APInt(16, 0x9))); in TEST_F()
[all …]
/external/llvm-project/llvm/unittests/IR/
DConstantRangeTest.cpp38 ConstantRange CR(APInt(Bits, Lo), APInt(Bits, Hi)); in EnumerateConstantRanges()
56 APInt N = CR.getLower(); in ForeachNumInConstantRange()
63 void account(const APInt &N);
68 APInt Min;
69 APInt Max;
72 : Min(APInt::getMaxValue(Bits)), Max(APInt::getMinValue(Bits)) {} in UnsignedOpRangeGatherer()
74 void account(const APInt &N) { in account()
89 APInt Min;
90 APInt Max;
93 : Min(APInt::getSignedMaxValue(Bits)), in SignedOpRangeGatherer()
[all …]
DDemandedBitsTest.cpp25 APInt AOut(Bits, AOut_); in TestBinOpExhaustive()
26 APInt AB1 = PropagateFn(0, AOut, Known1, Known2); in TestBinOpExhaustive()
27 APInt AB2 = PropagateFn(1, AOut, Known1, Known2); in TestBinOpExhaustive()
39 APInt AB1R = PropagateFn(0, AOut, Known1Redacted, Known2Redacted); in TestBinOpExhaustive()
40 APInt AB2R = PropagateFn(1, AOut, Known1Redacted, Known2Redacted); in TestBinOpExhaustive()
44 ForeachNumInKnownBits(Known1, [&](APInt Value1) { in TestBinOpExhaustive()
45 ForeachNumInKnownBits(Known2, [&](APInt Value2) { in TestBinOpExhaustive()
46 APInt ReferenceResult = EvalFn((Value1 & AB1), (Value2 & AB2)); in TestBinOpExhaustive()
47 APInt Result = EvalFn(Value1, Value2); in TestBinOpExhaustive()
58 [](APInt N1, APInt N2) -> APInt { return N1 + N2; }); in TEST()
[all …]
/external/llvm-project/llvm/include/llvm/ADT/
DAPInt.h36 class APInt; variable
38 inline APInt operator-(APInt);
70 class LLVM_NODISCARD APInt {
100 friend struct DenseMapInfo<APInt>;
108 APInt(uint64_t *val, unsigned bits) : BitWidth(bits) {
148 APInt &clearUnusedBits() {
203 void initSlowCase(const APInt &that);
215 void AssignSlowCase(const APInt &RHS);
218 bool EqualSlowCase(const APInt &RHS) const LLVM_READONLY;
236 bool intersectsSlowCase(const APInt &RHS) const LLVM_READONLY;
[all …]
DAPSInt.h21 class LLVM_NODISCARD APSInt : public APInt {
31 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
33 explicit APSInt(APInt I, bool isUnsigned = true)
34 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function
48 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative()
63 APSInt &operator=(APInt RHS) {
65 APInt::operator=(std::move(RHS));
71 APInt::operator=(RHS);
83 APInt::toString(Str, Radix, isSigned());
88 return APInt::toString(Radix, isSigned()); in toString()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/
DAPInt.h35 class APInt; variable
37 inline APInt operator-(APInt);
69 class LLVM_NODISCARD APInt {
107 APInt(uint64_t *val, unsigned bits) : BitWidth(bits) { in APInt() function
147 APInt &clearUnusedBits() { in 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;
[all …]
DAPSInt.h21 class LLVM_NODISCARD APSInt : public APInt {
31 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
33 explicit APSInt(APInt I, bool isUnsigned = true)
34 : APInt(std::move(I)), IsUnsigned(isUnsigned) {} in APInt() function
48 bool isNegative() const { return isSigned() && APInt::isNegative(); } in isNegative()
63 APSInt &operator=(APInt RHS) {
65 APInt::operator=(std::move(RHS));
71 APInt::operator=(RHS);
83 APInt::toString(Str, Radix, isSigned());
88 return APInt::toString(Radix, isSigned()); in toString()
[all …]
/external/llvm-project/llvm/lib/Support/
DAPInt.cpp77 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase()
86 void APInt::initSlowCase(const APInt& that) { in initSlowCase()
91 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray()
108 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt
113 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt
118 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt
124 void APInt::reallocate(unsigned NewBitWidth) { in reallocate()
143 void APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase()
159 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile()
173 APInt& APInt::operator++() { in operator ++()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DAPInt.cpp77 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase()
86 void APInt::initSlowCase(const APInt& that) { in initSlowCase()
91 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray()
108 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt
113 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt
118 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt
124 void APInt::reallocate(unsigned NewBitWidth) { in reallocate()
143 void APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase()
159 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile()
173 APInt& APInt::operator++() { in operator ++()
[all …]
/external/llvm/lib/Support/
DAPInt.cpp78 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase()
86 void APInt::initSlowCase(const APInt& that) { in initSlowCase()
91 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray()
108 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt
113 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt
118 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt
124 APInt& APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase()
156 APInt& APInt::operator=(uint64_t RHS) { in operator =()
167 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile()
198 APInt& APInt::operator++() { in operator ++()
[all …]
/external/swiftshader/third_party/llvm-subzero/lib/Support/
DAPInt.cpp78 void APInt::initSlowCase(uint64_t val, bool isSigned) { in initSlowCase()
86 void APInt::initSlowCase(const APInt& that) { in initSlowCase()
91 void APInt::initFromArray(ArrayRef<uint64_t> bigVal) { in initFromArray()
108 APInt::APInt(unsigned numBits, ArrayRef<uint64_t> bigVal) in APInt() function in APInt
113 APInt::APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]) in APInt() function in APInt
118 APInt::APInt(unsigned numbits, StringRef Str, uint8_t radix) in APInt() function in APInt
124 APInt& APInt::AssignSlowCase(const APInt& RHS) { in AssignSlowCase()
156 APInt& APInt::operator=(uint64_t RHS) { in operator =()
167 void APInt::Profile(FoldingSetNodeID& ID) const { in Profile()
198 APInt& APInt::operator++() { in operator ++()
[all …]
/external/llvm-project/llvm/lib/IR/
DConstantRange.cpp44 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange()
47 ConstantRange::ConstantRange(APInt V) in ConstantRange()
50 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange()
72 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits()
94 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
97 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion()
100 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
103 return ConstantRange(APInt::getSignedMinValue(W), std::move(SMax)); in makeAllowedICmpRegion()
106 return getNonEmpty(APInt::getMinValue(W), CR.getUnsignedMax() + 1); in makeAllowedICmpRegion()
108 return getNonEmpty(APInt::getSignedMinValue(W), CR.getSignedMax() + 1); in makeAllowedICmpRegion()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
DConstantRange.cpp43 : Lower(Full ? APInt::getMaxValue(BitWidth) : APInt::getMinValue(BitWidth)), in ConstantRange()
46 ConstantRange::ConstantRange(APInt V) in ConstantRange()
49 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange()
71 APInt Lower = Known.getMinValue(), Upper = Known.getMaxValue(); in fromKnownBits()
93 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
96 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion()
99 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
102 return ConstantRange(APInt::getSignedMinValue(W), std::move(SMax)); in makeAllowedICmpRegion()
105 return getNonEmpty(APInt::getMinValue(W), CR.getUnsignedMax() + 1); in makeAllowedICmpRegion()
107 return getNonEmpty(APInt::getSignedMinValue(W), CR.getSignedMax() + 1); in makeAllowedICmpRegion()
[all …]
/external/llvm/lib/IR/
DConstantRange.cpp36 Lower = Upper = APInt::getMaxValue(BitWidth); in ConstantRange()
38 Lower = Upper = APInt::getMinValue(BitWidth); in ConstantRange()
70 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
73 return ConstantRange(APInt::getMinValue(W), UMax); in makeAllowedICmpRegion()
76 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
79 return ConstantRange(APInt::getSignedMinValue(W), SMax); in makeAllowedICmpRegion()
82 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
85 return ConstantRange(APInt::getMinValue(W), UMax + 1); in makeAllowedICmpRegion()
88 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
91 return ConstantRange(APInt::getSignedMinValue(W), SMax + 1); in makeAllowedICmpRegion()
[all …]
/external/llvm/lib/Analysis/
DDemandedBits.cpp75 const APInt &AOut, APInt &AB, APInt &KnownZero, APInt &KnownOne, in determineLiveOperandBits()
76 APInt &KnownZero2, APInt &KnownOne2) { in determineLiveOperandBits()
88 KnownZero = APInt(BitWidth, 0); in determineLiveOperandBits()
89 KnownOne = APInt(BitWidth, 0); in determineLiveOperandBits()
94 KnownZero2 = APInt(BitWidth, 0); in determineLiveOperandBits()
95 KnownOne2 = APInt(BitWidth, 0); in determineLiveOperandBits()
119 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits()
129 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits()
141 AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits()); in determineLiveOperandBits()
154 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1); in determineLiveOperandBits()
[all …]
/external/llvm-project/llvm/lib/Analysis/
DDemandedBits.cpp88 const APInt &AOut, APInt &AB, KnownBits &Known, KnownBits &Known2, in determineLiveOperandBits()
137 AB = APInt::getHighBitsSet(BitWidth, in determineLiveOperandBits()
147 AB = APInt::getLowBitsSet(BitWidth, in determineLiveOperandBits()
153 const APInt *SA; in determineLiveOperandBits()
179 AB = APInt::getBitsSetFrom(BitWidth, AOut.countTrailingZeros()); in determineLiveOperandBits()
204 AB = APInt::getLowBitsSet(BitWidth, AOut.getActiveBits()); in determineLiveOperandBits()
208 const APInt *ShiftAmtC; in determineLiveOperandBits()
217 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt+1); in determineLiveOperandBits()
219 AB |= APInt::getHighBitsSet(BitWidth, ShiftAmt); in determineLiveOperandBits()
225 const APInt *ShiftAmtC; in determineLiveOperandBits()
[all …]
/external/llvm-project/lldb/unittests/Utility/
DScalarTest.cpp20 using llvm::APInt;
40 auto apint1 = APInt(64, 234); in TEST()
41 auto apint2 = APInt(64, 246); in TEST()
42 ASSERT_TRUE(checkInequality<APInt>(apint1, apint2)); in TEST()
43 ASSERT_TRUE(checkEquality<APInt>(apint1, apint1)); in TEST()
98 EXPECT_EQ(APInt(128, 1) << 70, Scalar(std::pow(2.0f, 70.0f)).SInt128(APInt())); in TEST()
99 EXPECT_EQ(APInt(128, -1, true) << 70, in TEST()
100 Scalar(-std::pow(2.0f, 70.0f)).SInt128(APInt())); in TEST()
101 EXPECT_EQ(APInt(128, 1) << 70, in TEST()
102 Scalar(std::pow(2.0f, 70.0f)).UInt128(APInt())); in TEST()
[all …]
/external/llvm/include/llvm/IR/
DConstantRange.h44 APInt Lower, Upper;
47 typedef APInt APIntMoveTy;
93 const APInt &Other);
120 bool getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS) const;
124 const APInt &getLower() const { return Lower; } in getLower()
128 const APInt &getUpper() const { return Upper; } in getUpper()
155 bool contains(const APInt &Val) const;
163 const APInt *getSingleElement() const { in getSingleElement()
175 APInt getSetSize() const;
179 APInt getUnsignedMax() const;
[all …]
/external/llvm-project/llvm/unittests/CodeGen/GlobalISel/
DConstantFoldingTest.cpp83 Optional<APInt> FoldGAddInt = in TEST_F()
88 Optional<APInt> FoldGAddMix = in TEST_F()
95 Optional<APInt> FoldGAndInt = in TEST_F()
100 Optional<APInt> FoldGAndMix = in TEST_F()
107 Optional<APInt> FoldGAShrInt = in TEST_F()
112 Optional<APInt> FoldGAShrMix = in TEST_F()
119 Optional<APInt> FoldGLShrInt = in TEST_F()
124 Optional<APInt> FoldGLShrMix = in TEST_F()
131 Optional<APInt> FoldGMulInt = in TEST_F()
136 Optional<APInt> FoldGMulMix = in TEST_F()
[all …]

12345678910>>...48