| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | ScalarEvolutionDivision.cpp | 65 *Quotient = D.One; in divide() 71 *Quotient = D.Zero; in divide() 78 *Quotient = Numerator; in divide() 86 *Quotient = Numerator; in divide() 89 *Quotient = Q; in divide() 94 *Quotient = D.Zero; in divide() 104 *Quotient = D.Quotient; in divide() 163 Quotient = Qs[0]; in visitAddExpr() 206 Quotient = Qs[0]; in visitMulExpr() 236 Quotient = Q; in visitMulExpr() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/Transforms/Utils/ |
| H A D | IntegerDivisionTest.cpp | 48 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local 49 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub); in TEST() 78 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local 79 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI); in TEST() 169 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local 170 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub); in TEST() 199 Instruction* Quotient = dyn_cast<Instruction>(cast<User>(Ret)->getOperand(0)); in TEST() local 200 EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI); in TEST()
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | ScaledNumber.cpp | 69 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()
|
| H A D | APInt.cpp | 1551 if (Quotient) { in divide() 1606 return Quotient; in udiv() 1639 return Quotient; in udiv() 1805 Quotient.reallocate(BitWidth); in udivrem() 1812 Quotient = lhsValue / rhsValue; in udivrem() 1871 Quotient.reallocate(BitWidth); in udivrem() 1876 Quotient = lhsValue / RHS; in udivrem() 1895 Quotient.negate(); in sdivrem() 1900 Quotient.negate(); in sdivrem() 1914 Quotient.negate(); in sdivrem() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | BypassSlowDivision.cpp | 47 Value *Quotient; member 51 : Quotient(InQuotient), Remainder(InRemainder) {} in QuotRemPair() 59 Value *Quotient = nullptr; member 172 return isDivisionOp() ? Value.Quotient : Value.Remainder; in getReplacement() 272 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB() 275 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB() 302 DivRemPair.Quotient = in createFastBB() 318 QuoPhi->addIncoming(LHS.Quotient, LHS.BB); in createDivRemPhiNodes() 319 QuoPhi->addIncoming(RHS.Quotient, RHS.BB); in createDivRemPhiNodes() 423 Long.Quotient = ConstantInt::get(getSlowType(), 0); in insertFastDivAndRem() [all …]
|
| H A D | IntegerDivision.cpp | 87 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode() local 88 Value *Product = Builder.CreateMul(Divisor, Quotient); in generatedUnsignedRemainderCode() 91 if (Instruction *UDiv = dyn_cast<Instruction>(Quotient)) in generatedUnsignedRemainderCode() 447 Value *Quotient = generateSignedDivisionCode(Div->getOperand(0), in expandDivision() local 452 Div->replaceAllUsesWith(Quotient); in expandDivision() 467 Value *Quotient = generateUnsignedDivisionCode(Div->getOperand(0), in expandDivision() local 470 Div->replaceAllUsesWith(Quotient); in expandDivision()
|
| /llvm-project-15.0.7/llvm/include/llvm/Analysis/ |
| H A D | ScalarEvolutionDivision.h | 31 const SCEV *Denominator, const SCEV **Quotient, 66 const SCEV *Denominator, *Quotient, *Remainder, *Zero, *One; member
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineMulDivRem.cpp | 755 static bool isMultiple(const APInt &C1, const APInt &C2, APInt &Quotient, in isMultiple() argument 769 APInt::sdivrem(C1, C2, Quotient, Remainder); in isMultiple() 771 APInt::udivrem(C1, C2, Quotient, Remainder); in isMultiple() 823 APInt Quotient(C1->getBitWidth(), /*val=*/0ULL, IsSigned); in commonIDivTransforms() local 826 if (isMultiple(*C2, *C1, Quotient, IsSigned)) { in commonIDivTransforms() 834 if (isMultiple(*C1, *C2, Quotient, IsSigned)) { in commonIDivTransforms() 836 ConstantInt::get(Ty, Quotient)); in commonIDivTransforms() 848 APInt Quotient(C1->getBitWidth(), /*val=*/0ULL, IsSigned); in commonIDivTransforms() local 853 if (isMultiple(*C2, C1Shifted, Quotient, IsSigned)) { in commonIDivTransforms() 855 ConstantInt::get(Ty, Quotient)); in commonIDivTransforms() [all …]
|
| H A D | InstructionCombining.cpp | 1475 APInt Quotient(Scale), Remainder(Scale); // Init ensures right bitwidth. in Descale() local 1476 APInt::sdivrem(CI->getValue(), Scale, Quotient, Remainder); in Descale() 1481 Op = ConstantInt::get(CI->getType(), Quotient); in Descale()
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | APInt.h | 959 static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, 961 static void udivrem(const APInt &LHS, uint64_t RHS, APInt &Quotient, 964 static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, 966 static void sdivrem(const APInt &LHS, int64_t RHS, APInt &Quotient, 1913 const WordType *RHS, unsigned rhsWords, WordType *Quotient,
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUInstrInfo.td | 224 // Special case divide FMA with scale and flags (src0 = Quotient, 230 // Special case divide fixup and flags(src0 = Quotient, src1 =
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | LoopStrengthReduce.cpp | 4096 if (const SCEV *Quotient = getExactSDiv(AR, FactorS, SE, true)) in GenerateScales() local 4097 if (!Quotient->isZero()) { in GenerateScales() 4100 F.ScaledReg = Quotient; in GenerateScales()
|