Home
last modified time | relevance | path

Searched refs:Dividend (Results 1 – 25 of 41) sorted by relevance

12

/external/llvm/lib/Transforms/Utils/
DBypassSlowDivision.cpp31 Value *Dividend; member
35 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivOpInfo()
52 Val1.Dividend == Val2.Dividend && in isEqual()
65 return (unsigned)(reinterpret_cast<uintptr_t>(Val.Dividend) ^ in getHashValue()
82 Value *Dividend = I->getOperand(0); in insertFastDiv() local
86 (isa<ConstantInt>(Dividend) && isa<ConstantInt>(Divisor))) { in insertFastDiv()
104 SlowQuotientV = SlowBuilder.CreateSDiv(Dividend, Divisor); in insertFastDiv()
105 SlowRemainderV = SlowBuilder.CreateSRem(Dividend, Divisor); in insertFastDiv()
107 SlowQuotientV = SlowBuilder.CreateUDiv(Dividend, Divisor); in insertFastDiv()
108 SlowRemainderV = SlowBuilder.CreateURem(Dividend, Divisor); in insertFastDiv()
[all …]
DIntegerDivision.cpp34 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
36 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedRemainderCode()
58 Value *DividendSign = Builder.CreateAShr(Dividend, Shift); in generateSignedRemainderCode()
60 Value *DvdXor = Builder.CreateXor(Dividend, DividendSign); in generateSignedRemainderCode()
80 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
89 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode()
91 Value *Remainder = Builder.CreateSub(Dividend, Product); in generatedUnsignedRemainderCode()
104 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor, in generateSignedDivisionCode() argument
108 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedDivisionCode()
131 Value *Tmp = Builder.CreateAShr(Dividend, Shift); in generateSignedDivisionCode()
[all …]
/external/llvm-project/llvm/lib/Support/
DScaledNumber.cpp57 std::pair<uint32_t, int16_t> ScaledNumbers::divide32(uint32_t Dividend, in divide32() argument
59 assert(Dividend && "expected non-zero dividend"); in divide32()
63 uint64_t Dividend64 = Dividend; in divide32()
80 std::pair<uint64_t, int16_t> ScaledNumbers::divide64(uint64_t Dividend, in divide64() argument
82 assert(Dividend && "expected non-zero dividend"); in divide64()
94 return std::make_pair(Dividend, Shift); in divide64()
97 if (int Zeros = countLeadingZeros(Dividend)) { in divide64()
99 Dividend <<= Zeros; in divide64()
103 uint64_t Quotient = Dividend / Divisor; in divide64()
104 Dividend %= Divisor; in divide64()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DScaledNumber.cpp57 std::pair<uint32_t, int16_t> ScaledNumbers::divide32(uint32_t Dividend, in divide32() argument
59 assert(Dividend && "expected non-zero dividend"); in divide32()
63 uint64_t Dividend64 = Dividend; in divide32()
80 std::pair<uint64_t, int16_t> ScaledNumbers::divide64(uint64_t Dividend, in divide64() argument
82 assert(Dividend && "expected non-zero dividend"); in divide64()
94 return std::make_pair(Dividend, Shift); in divide64()
97 if (int Zeros = countLeadingZeros(Dividend)) { in divide64()
99 Dividend <<= Zeros; in divide64()
103 uint64_t Quotient = Dividend / Divisor; in divide64()
104 Dividend %= Divisor; in divide64()
[all …]
/external/llvm/lib/Support/
DScaledNumber.cpp58 std::pair<uint32_t, int16_t> ScaledNumbers::divide32(uint32_t Dividend, in divide32() argument
60 assert(Dividend && "expected non-zero dividend"); in divide32()
64 uint64_t Dividend64 = Dividend; in divide32()
81 std::pair<uint64_t, int16_t> ScaledNumbers::divide64(uint64_t Dividend, in divide64() argument
83 assert(Dividend && "expected non-zero dividend"); in divide64()
95 return std::make_pair(Dividend, Shift); in divide64()
98 if (int Zeros = countLeadingZeros(Dividend)) { in divide64()
100 Dividend <<= Zeros; in divide64()
104 uint64_t Quotient = Dividend / Divisor; in divide64()
105 Dividend %= Divisor; in divide64()
[all …]
/external/webrtc/rtc_base/numerics/
Ddivide_round.h21 template <typename Dividend, typename Divisor>
22 inline auto constexpr DivideRoundUp(Dividend dividend, Divisor divisor) { in DivideRoundUp()
23 static_assert(std::is_integral<Dividend>(), ""); in DivideRoundUp()
33 template <typename Dividend, typename Divisor>
34 inline auto constexpr DivideRoundToNearest(Dividend dividend, Divisor divisor) { in DivideRoundToNearest()
35 static_assert(std::is_integral<Dividend>(), ""); in DivideRoundToNearest()
/external/grpc-grpc/src/csharp/Grpc.Examples/
DMathExamples.cs29 DivReply result = client.Div(new DivArgs { Dividend = 10, Divisor = 3 }); in DivExample()
35 DivReply result = await client.DivAsync(new DivArgs { Dividend = 4, Divisor = 5 }); in DivAsyncExample()
68 new DivArgs { Dividend = 10, Divisor = 3 }, in DivManyExample()
69 new DivArgs { Dividend = 100, Divisor = 21 }, in DivManyExample()
70 new DivArgs { Dividend = 7, Divisor = 2 } in DivManyExample()
95 …DivReply result = await client.DivAsync(new DivArgs { Dividend = sum.Num_, Divisor = numbers.Count… in DependendRequestsExample()
106 DivReply result = await client.DivAsync(new DivArgs { Dividend = 5, Divisor = 0 }); in HandleErrorExample()
125 var call = client.DivAsync(new DivArgs { Dividend = 5, Divisor = 0 }, requestHeaders); in MetadataExample()
DMath.cs89 public long Dividend { property in Math.DivArgs
120 if (Dividend != other.Dividend) return false; in Equals()
128 if (Dividend != 0L) hash ^= Dividend.GetHashCode(); in GetHashCode()
143 if (Dividend != 0L) { in WriteTo()
145 output.WriteInt64(Dividend); in WriteTo()
159 if (Dividend != 0L) { in CalculateSize()
160 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Dividend); in CalculateSize()
176 if (other.Dividend != 0L) { in MergeFrom()
177 Dividend = other.Dividend; in MergeFrom()
194 Dividend = input.ReadInt64(); in MergeFrom()
DMathServiceImpl.cs77 long quotient = args.Dividend / args.Divisor; in DivInternal()
78 long remainder = args.Dividend % args.Divisor; in DivInternal()
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Utils/
DBypassSlowDivision.h32 AssertingVH<Value> Dividend; member
38 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivRemMapKey()
43 return Val1.SignedOp == Val2.SignedOp && Val1.Dividend == Val2.Dividend &&
57 static_cast<Value *>(Val.Dividend)) ^
/external/llvm-project/llvm/include/llvm/Transforms/Utils/
DBypassSlowDivision.h32 AssertingVH<Value> Dividend; member
38 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivRemMapKey()
43 return Val1.SignedOp == Val2.SignedOp && Val1.Dividend == Val2.Dividend &&
57 static_cast<Value *>(Val.Dividend)) ^
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DBypassSlowDivision.cpp157 Value *Dividend = SlowDivOrRem->getOperand(0); in getReplacement() local
159 DivRemMapKey Key(isSignedOp(), Dividend, Divisor); in getReplacement()
268 Value *Dividend = SlowDivOrRem->getOperand(0); in createSlowBB() local
272 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB()
273 DivRemPair.Remainder = Builder.CreateSRem(Dividend, Divisor); in createSlowBB()
275 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB()
276 DivRemPair.Remainder = Builder.CreateURem(Dividend, Divisor); in createSlowBB()
291 Value *Dividend = SlowDivOrRem->getOperand(0); in createFastBB() local
296 Builder.CreateCast(Instruction::Trunc, Dividend, BypassType); in createFastBB()
351 Value *Dividend = SlowDivOrRem->getOperand(0); in insertFastDivAndRem() local
[all …]
DIntegerDivision.cpp33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
35 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedRemainderCode()
57 Value *DividendSign = Builder.CreateAShr(Dividend, Shift); in generateSignedRemainderCode()
59 Value *DvdXor = Builder.CreateXor(Dividend, DividendSign); in generateSignedRemainderCode()
79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
88 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode()
90 Value *Remainder = Builder.CreateSub(Dividend, Product); in generatedUnsignedRemainderCode()
103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor, in generateSignedDivisionCode() argument
107 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedDivisionCode()
130 Value *Tmp = Builder.CreateAShr(Dividend, Shift); in generateSignedDivisionCode()
[all …]
/external/llvm-project/llvm/lib/Transforms/Utils/
DBypassSlowDivision.cpp157 Value *Dividend = SlowDivOrRem->getOperand(0); in getReplacement() local
159 DivRemMapKey Key(isSignedOp(), Dividend, Divisor); in getReplacement()
268 Value *Dividend = SlowDivOrRem->getOperand(0); in createSlowBB() local
272 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB()
273 DivRemPair.Remainder = Builder.CreateSRem(Dividend, Divisor); in createSlowBB()
275 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB()
276 DivRemPair.Remainder = Builder.CreateURem(Dividend, Divisor); in createSlowBB()
292 Value *Dividend = SlowDivOrRem->getOperand(0); in createFastBB() local
297 Builder.CreateCast(Instruction::Trunc, Dividend, BypassType); in createFastBB()
354 Value *Dividend = SlowDivOrRem->getOperand(0); in insertFastDivAndRem() local
[all …]
DIntegerDivision.cpp33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
35 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedRemainderCode()
57 Value *DividendSign = Builder.CreateAShr(Dividend, Shift); in generateSignedRemainderCode()
59 Value *DvdXor = Builder.CreateXor(Dividend, DividendSign); in generateSignedRemainderCode()
79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
88 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode()
90 Value *Remainder = Builder.CreateSub(Dividend, Product); in generatedUnsignedRemainderCode()
103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor, in generateSignedDivisionCode() argument
107 unsigned BitWidth = Dividend->getType()->getIntegerBitWidth(); in generateSignedDivisionCode()
130 Value *Tmp = Builder.CreateAShr(Dividend, Shift); in generateSignedDivisionCode()
[all …]
/external/grpc-grpc/src/csharp/Grpc.Examples.Tests/
DMathClientServerTests.cs64 DivReply response = client.Div(new DivArgs { Dividend = 10, Divisor = 3 }); in Div1()
72 DivReply response = client.Div(new DivArgs { Dividend = 0, Divisor = 1 }); in Div2()
80 … var ex = Assert.Throws<RpcException>(() => client.Div(new DivArgs { Dividend = 0, Divisor = 0 })); in DivByZero()
87 DivReply response = await client.DivAsync(new DivArgs { Dividend = 10, Divisor = 3 }); in DivAsync()
164 new DivArgs { Dividend = 10, Divisor = 3 }, in DivMany()
165 new DivArgs { Dividend = 100, Divisor = 21 }, in DivMany()
166 new DivArgs { Dividend = 7, Divisor = 2 } in DivMany()
/external/llvm/include/llvm/Support/
DScaledNumber.h139 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor);
146 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor);
154 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument
160 if (!Dividend) in getQuotient()
166 return divide64(Dividend, Divisor); in getQuotient()
167 return divide32(Dividend, Divisor); in getQuotient()
171 inline std::pair<uint32_t, int16_t> getQuotient32(uint32_t Dividend, in getQuotient32() argument
173 return getQuotient(Dividend, Divisor); in getQuotient32()
177 inline std::pair<uint64_t, int16_t> getQuotient64(uint64_t Dividend, in getQuotient64() argument
179 return getQuotient(Dividend, Divisor); in getQuotient64()
[all …]
/external/llvm-project/llvm/include/llvm/Support/
DScaledNumber.h138 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor);
145 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor);
153 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument
159 if (!Dividend) in getQuotient()
165 return divide64(Dividend, Divisor); in getQuotient()
166 return divide32(Dividend, Divisor); in getQuotient()
170 inline std::pair<uint32_t, int16_t> getQuotient32(uint32_t Dividend, in getQuotient32() argument
172 return getQuotient(Dividend, Divisor); in getQuotient32()
176 inline std::pair<uint64_t, int16_t> getQuotient64(uint64_t Dividend, in getQuotient64() argument
178 return getQuotient(Dividend, Divisor); in getQuotient64()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DScaledNumber.h138 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor);
145 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor);
153 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument
159 if (!Dividend) in getQuotient()
165 return divide64(Dividend, Divisor); in getQuotient()
166 return divide32(Dividend, Divisor); in getQuotient()
170 inline std::pair<uint32_t, int16_t> getQuotient32(uint32_t Dividend, in getQuotient32() argument
172 return getQuotient(Dividend, Divisor); in getQuotient32()
176 inline std::pair<uint64_t, int16_t> getQuotient64(uint64_t Dividend, in getQuotient64() argument
178 return getQuotient(Dividend, Divisor); in getQuotient64()
[all …]
/external/llvm-project/polly/lib/Support/
DSCEVValidator.cpp377 ValidatorResult visitDivision(const SCEV *Dividend, const SCEV *Divisor, in visitDivision()
385 return visit(Dividend); in visitDivision()
392 ValidatorResult LHS = visit(Dividend); in visitDivision()
406 auto *Dividend = Expr->getLHS(); in visitUDivExpr() local
408 return visitDivision(Dividend, Divisor, Expr); in visitUDivExpr()
415 auto *Dividend = SE.getSCEV(SDiv->getOperand(0)); in visitSDivInstruction() local
417 return visitDivision(Dividend, Divisor, Expr, SDiv); in visitSDivInstruction()
429 auto *Dividend = SRem->getOperand(0); in visitSRemInstruction() local
430 auto *DividendSCEV = SE.getSCEV(Dividend); in visitSRemInstruction()
599 auto *Dividend = SE.getSCEV(Inst->getOperand(1)); in follow() local
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DDivRemPairs.cpp52 Value *Dividend, *XroundedDownToMultipleOfY; in matchExpandedRem() local
53 if (!match(&I, m_Sub(m_Value(Dividend), m_Value(XroundedDownToMultipleOfY)))) in matchExpandedRem()
61 m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)), in matchExpandedRem()
68 M.Key.Dividend = Dividend; in matchExpandedRem()
/external/llvm-project/llvm/lib/Transforms/Scalar/
DDivRemPairs.cpp53 Value *Dividend, *XroundedDownToMultipleOfY; in matchExpandedRem() local
54 if (!match(&I, m_Sub(m_Value(Dividend), m_Value(XroundedDownToMultipleOfY)))) in matchExpandedRem()
62 m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)), in matchExpandedRem()
69 M.Key.Dividend = Dividend; in matchExpandedRem()
/external/llvm/lib/CodeGen/
DTargetSchedule.cpp38 static unsigned gcd(unsigned Dividend, unsigned Divisor) { in gcd() argument
41 unsigned Rem = Dividend % Divisor; in gcd()
42 Dividend = Divisor; in gcd()
45 return Dividend; in gcd()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DTargetSchedule.cpp47 static unsigned gcd(unsigned Dividend, unsigned Divisor) { in gcd() argument
50 unsigned Rem = Dividend % Divisor; in gcd()
51 Dividend = Divisor; in gcd()
54 return Dividend; in gcd()
/external/llvm-project/llvm/lib/CodeGen/
DTargetSchedule.cpp47 static unsigned gcd(unsigned Dividend, unsigned Divisor) { in gcd() argument
50 unsigned Rem = Dividend % Divisor; in gcd()
51 Dividend = Divisor; in gcd()
54 return Dividend; in gcd()

12