Home
last modified time | relevance | path

Searched refs:Quotient (Results 1 – 14 of 14) sorted by relevance

/external/llvm/unittests/Transforms/Utils/
DIntegerDivision.cpp49 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local
50 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub); in TEST()
79 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local
80 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI); in TEST()
170 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local
171 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub); in TEST()
200 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local
201 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI); in TEST()
/external/llvm/lib/Support/
DScaledNumber.cpp69 uint64_t Quotient = Dividend64 / Divisor; in divide32() local
73 if (Quotient > UINT32_MAX) in divide32()
74 return getAdjusted<uint32_t>(Quotient, Shift); in divide32()
77 return getRounded<uint32_t>(Quotient, Shift, Remainder >= getHalf(Divisor)); in divide32()
103 uint64_t Quotient = Dividend / Divisor; in divide64() local
107 while (!(Quotient >> 63) && Dividend) { in divide64()
114 Quotient <<= 1; in divide64()
116 Quotient |= 1; in divide64()
121 return getRounded(Quotient, Shift, Dividend >= getHalf(Divisor)); in divide64()
DAPInt.cpp1673 APInt *Quotient, APInt *Remainder) in divide() argument
1777 if (Quotient) { in divide()
1779 if (Quotient->BitWidth != LHS.BitWidth) { in divide()
1780 if (Quotient->isSingleWord()) in divide()
1781 Quotient->VAL = 0; in divide()
1783 delete [] Quotient->pVal; in divide()
1784 Quotient->BitWidth = LHS.BitWidth; in divide()
1785 if (!Quotient->isSingleWord()) in divide()
1786 Quotient->pVal = getClearedMemory(Quotient->getNumWords()); in divide()
1788 Quotient->clearAllBits(); in divide()
[all …]
/external/llvm/lib/Transforms/Utils/
DIntegerDivision.cpp89 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode() local
90 Value *Product = Builder.CreateMul(Divisor, Quotient); in generatedUnsignedRemainderCode()
93 if (Instruction *UDiv = dyn_cast<Instruction>(Quotient)) in generatedUnsignedRemainderCode()
455 Value *Quotient = generateSignedDivisionCode(Div->getOperand(0), in expandDivision() local
457 Div->replaceAllUsesWith(Quotient); in expandDivision()
472 Value *Quotient = generateUnsignedDivisionCode(Div->getOperand(0), in expandDivision() local
475 Div->replaceAllUsesWith(Quotient); in expandDivision()
DBypassSlowDivision.cpp39 PHINode *Quotient; member
43 : Quotient(InQuotient), Remainder(InRemainder) {} in DivPhiNodes()
207 J->replaceAllUsesWith(Value.Quotient); in reuseOrInsertFastDiv()
/external/mesa3d/src/gallium/drivers/radeon/
DAMDGPUISelLowering.cpp224 SDValue Quotient = DAG.getNode(ISD::MULHU, DL, VT, Tmp0, Num); in LowerUDIVREM() local
227 SDValue Num_S_Remainder = DAG.getNode(ISD::UMULO, DL, VT, Quotient, Den); in LowerUDIVREM()
250 SDValue Quotient_A_One = DAG.getNode(ISD::ADD, DL, VT, Quotient, in LowerUDIVREM()
254 SDValue Quotient_S_One = DAG.getNode(ISD::SUB, DL, VT, Quotient, in LowerUDIVREM()
259 Quotient, Quotient_A_One, ISD::SETEQ); in LowerUDIVREM()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineMulDivRem.cpp93 static bool IsMultiple(const APInt &C1, const APInt &C2, APInt &Quotient, in IsMultiple() argument
100 APInt::sdivrem(C1, C2, Quotient, Remainder); in IsMultiple()
102 APInt::udivrem(C1, C2, Quotient, Remainder); in IsMultiple()
811 APInt Quotient(C1->getBitWidth(), /*Val=*/0ULL, IsSigned); in commonIDivTransforms() local
814 if (IsMultiple(*C2, *C1, Quotient, IsSigned)) { in commonIDivTransforms()
816 I.getOpcode(), X, ConstantInt::get(X->getType(), Quotient)); in commonIDivTransforms()
822 if (IsMultiple(*C1, *C2, Quotient, IsSigned)) { in commonIDivTransforms()
824 Instruction::Mul, X, ConstantInt::get(X->getType(), Quotient)); in commonIDivTransforms()
837 APInt Quotient(C1->getBitWidth(), /*Val=*/0ULL, IsSigned); in commonIDivTransforms() local
842 if (IsMultiple(*C2, C1Shifted, Quotient, IsSigned)) { in commonIDivTransforms()
[all …]
DInstructionCombining.cpp994 APInt Quotient(Scale), Remainder(Scale); // Init ensures right bitwidth. in Descale() local
995 APInt::sdivrem(CI->getValue(), Scale, Quotient, Remainder); in Descale()
1000 Op = ConstantInt::get(CI->getType(), Quotient); in Descale()
/external/llvm/lib/Target/R600/
DAMDGPUInstrInfo.td158 // Special case divide FMA with scale and flags (src0 = Quotient,
163 // Special case divide fixup and flags(src0 = Quotient, src1 =
DAMDGPUISelLowering.cpp1771 SDValue Quotient = DAG.getNode(ISD::MULHU, DL, VT, Tmp0, Num); in LowerUDIVREM() local
1774 SDValue Num_S_Remainder = DAG.getNode(ISD::MUL, DL, VT, Quotient, Den); in LowerUDIVREM()
1797 SDValue Quotient_A_One = DAG.getNode(ISD::ADD, DL, VT, Quotient, in LowerUDIVREM()
1801 SDValue Quotient_S_One = DAG.getNode(ISD::SUB, DL, VT, Quotient, in LowerUDIVREM()
1806 Quotient, Quotient_A_One, ISD::SETEQ); in LowerUDIVREM()
/external/llvm/include/llvm/ADT/
DAPInt.h181 unsigned rhsWords, APInt *Quotient, APInt *Remainder);
942 static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
945 static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient,
/external/llvm/lib/Analysis/
DScalarEvolution.cpp709 const SCEV *Denominator, const SCEV **Quotient, in divide()
718 *Quotient = D.One; in divide()
724 *Quotient = D.Zero; in divide()
732 *Quotient = Numerator; in divide()
734 divide(SE, *Quotient, Op, &Q, &R); in divide()
735 *Quotient = Q; in divide()
740 *Quotient = D.Zero; in divide()
750 *Quotient = D.Quotient; in divide()
780 Quotient = SE.getConstant(QuotientVal); in visitConstant()
791 Quotient = SE.getAddRecExpr(StartQ, StepQ, Numerator->getLoop(), in visitAddRecExpr()
[all …]
/external/llvm/test/CodeGen/R600/
Dudivrem.ll39 ; SI: v_mul_hi_u32 [[Quotient:v[0-9]+]]
45 ; SI-DAG: v_add_i32_e32 [[Quotient_A_One:v[0-9]+]], 1, [[Quotient]]
/external/llvm/lib/Transforms/Scalar/
DLoopStrengthReduce.cpp3626 if (const SCEV *Quotient = getExactSDiv(AR, FactorS, SE, true)) { in GenerateScales() local
3629 F.ScaledReg = Quotient; in GenerateScales()