| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | IntegerDivision.cpp | 379 IRBuilder<> Builder(Rem); in expandRemainder() 395 Rem->eraseFromParent(); in expandRemainder() 404 Rem = BO; in expandRemainder() 412 Rem->dropAllReferences(); in expandRemainder() 413 Rem->eraseFromParent(); in expandRemainder() 502 IRBuilder<> Builder(Rem); in expandRemainderUpTo32Bits() 522 Rem->dropAllReferences(); in expandRemainderUpTo32Bits() 523 Rem->eraseFromParent(); in expandRemainderUpTo32Bits() 550 IRBuilder<> Builder(Rem); in expandRemainderUpTo64Bits() 570 Rem->dropAllReferences(); in expandRemainderUpTo64Bits() [all …]
|
| H A D | SimplifyIndVar.cpp | 343 auto *N = Rem->getOperand(0), *D = Rem->getOperand(1); in replaceSRemWithURem() 345 Rem->getName() + ".urem", Rem); in replaceSRemWithURem() 350 DeadInsts.emplace_back(Rem); in replaceSRemWithURem() 355 Rem->replaceAllUsesWith(Rem->getOperand(0)); in replaceRemWithNumerator() 359 DeadInsts.emplace_back(Rem); in replaceRemWithNumerator() 364 auto *T = Rem->getType(); in replaceRemWithNumeratorOrZero() 365 auto *N = Rem->getOperand(0), *D = Rem->getOperand(1); in replaceRemWithNumeratorOrZero() 369 Rem->replaceAllUsesWith(Sel); in replaceRemWithNumeratorOrZero() 373 DeadInsts.emplace_back(Rem); in replaceRemWithNumeratorOrZero() 412 auto *T = Rem->getType(); in simplifyIVRemainder() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | BranchProbability.cpp | 92 uint64_t Rem = (uint64_t(Upper32) << 32) | Mid32; in scale() local 93 uint64_t UpperQ = Rem / D; in scale() 99 Rem = ((Rem % D) << 32) | Lower32; in scale() 100 uint64_t LowerQ = Rem / D; in scale()
|
| H A D | APInt.cpp | 2733 APInt Quo, Rem; in RoundingUDiv() local 2734 APInt::udivrem(A, B, Quo, Rem); in RoundingUDiv() 2735 if (Rem.isZero()) in RoundingUDiv() 2748 APInt Quo, Rem; in RoundingSDiv() local 2749 APInt::sdivrem(A, B, Quo, Rem); in RoundingSDiv() 2750 if (Rem.isZero()) in RoundingSDiv() 2758 if (Rem.isNegative() != B.isNegative()) in RoundingSDiv() 2762 if (Rem.isNegative() != B.isNegative()) in RoundingSDiv() 2914 APInt Rem; in SolveQuadraticEquationWrap() local 2925 APInt::sdivrem(-B + SQ, TwoA, X, Rem); in SolveQuadraticEquationWrap() [all …]
|
| H A D | APFixedPoint.cpp | 305 APInt Rem; in div() local 306 APInt::sdivrem(ThisVal, OtherVal, Result, Rem); in div() 309 if (ThisVal.isNegative() != OtherVal.isNegative() && !Rem.isZero()) in div()
|
| /llvm-project-15.0.7/llvm/unittests/Transforms/Utils/ |
| H A D | IntegerDivisionTest.cpp | 100 Value *Rem = Builder.CreateSRem(A, B); in TEST() local 103 Value *Ret = Builder.CreateRet(Rem); in TEST() 105 expandRemainder(cast<BinaryOperator>(Rem)); in TEST() 130 Value *Rem = Builder.CreateURem(A, B); in TEST() local 133 Value *Ret = Builder.CreateRet(Rem); in TEST() 135 expandRemainder(cast<BinaryOperator>(Rem)); in TEST() 221 Value *Rem = Builder.CreateSRem(A, B); in TEST() local 224 Value *Ret = Builder.CreateRet(Rem); in TEST() 226 expandRemainder(cast<BinaryOperator>(Rem)); in TEST() 251 Value *Rem = Builder.CreateURem(A, B); in TEST() local [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/ |
| H A D | IntegerDivision.h | 32 bool expandRemainder(BinaryOperator *Rem); 49 bool expandRemainderUpTo32Bits(BinaryOperator *Rem); 55 bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
|
| /llvm-project-15.0.7/llvm/lib/BinaryFormat/ |
| H A D | COFF.cpp | 33 unsigned Rem = Value % 64; in encodeBase64StringEntry() local 35 *(Ptr--) = Alphabet[Rem]; in encodeBase64StringEntry()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | MachineScheduler.cpp | 2043 Rem = rem; in init() 2353 Rem->RemainingCounts[PIdx] -= Count; in countResource() 2426 Rem->RemIssueCount -= DecRemIssue; in bumpNode() 2907 Rem.init(DAG, SchedModel); in initialize() 2908 Top.init(DAG, SchedModel, &Rem); in initialize() 2909 Bot.init(DAG, SchedModel, &Rem); in initialize() 3000 if (Rem.CyclicCritPath == 0 || Rem.CyclicCritPath >= Rem.CriticalPath) in checkAcyclicLatency() 3006 Rem.RemIssueCount); in checkAcyclicLatency() 3033 Rem.CriticalPath = SU->getDepth(); in registerRoots() 3517 Rem.init(DAG, SchedModel); in initialize() [all …]
|
| H A D | TargetSchedule.cpp | 49 unsigned Rem = Dividend % Divisor; in gcd() local 51 Divisor = Rem; in gcd()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUPrintfRuntimeBinding.cpp | 259 size_t Rem = SizeStr % DWORD_ALIGN; in lowerPrintfForGpu() local 263 if (Rem) { in lowerPrintfForGpu() 264 NSizeStr = SizeStr + (DWORD_ALIGN - Rem); in lowerPrintfForGpu() 434 size_t Rem = SizeStr % DWORD_ALIGN; in lowerPrintfForGpu() local 436 if (Rem) { in lowerPrintfForGpu() 437 NSizeStr = SizeStr + (DWORD_ALIGN - Rem); in lowerPrintfForGpu()
|
| H A D | AMDGPULowerModuleLDSPass.cpp | 331 if (uint64_t Rem = CurrentOffset % DataAlignV) { in createLDSVariableReplacement() local 332 uint64_t Padding = DataAlignV - Rem; in createLDSVariableReplacement()
|
| H A D | AMDGPUPromoteAlloca.cpp | 374 uint64_t Rem; in GEPToVectorIndex() local 375 APInt::udivrem(ConstOffset, VecElemSize, Quot, Rem); in GEPToVectorIndex() 376 if (Rem != 0) in GEPToVectorIndex()
|
| H A D | AMDGPUISelLowering.cpp | 1665 SDValue Rem = DAG.getNode(ISD::MUL, DL, VT, Div, RHS); in LowerDIVREM24() local 1666 Rem = DAG.getNode(ISD::SUB, DL, VT, LHS, Rem); in LowerDIVREM24() 1673 Rem = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, Rem, InRegSize); in LowerDIVREM24() 1677 Rem = DAG.getNode(ISD::AND, DL, VT, Rem, TruncMask); in LowerDIVREM24() 1680 return DAG.getMergeValues({ Div, Rem }, DL); in LowerDIVREM24() 1848 SDValue Rem = DAG.getSelectCC(DL, C3, Zero, Sel2, Sub1, ISD::SETNE); in LowerUDIVREM64() local 1851 Results.push_back(Rem); in LowerUDIVREM64() 1999 SDValue Rem = Div.getValue(1); in LowerSDIVREM() local 2002 Rem = DAG.getNode(ISD::XOR, DL, VT, Rem, RSign); in LowerSDIVREM() 2005 Rem = DAG.getNode(ISD::SUB, DL, VT, Rem, RSign); in LowerSDIVREM() [all …]
|
| H A D | AMDGPUCodeGenPrepare.cpp | 993 Value *Rem = Builder.CreateMul(Div, Den); in expandDivRem24Impl() local 994 Res = Builder.CreateSub(Num, Rem); in expandDivRem24Impl()
|
| /llvm-project-15.0.7/llvm/lib/Target/PowerPC/ |
| H A D | PPCMachineScheduler.cpp | 87 if (Rem.IsAcyclicLatencyLimited && !Zone->getCurrMOps() && in tryCandidate() 138 !Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, *Zone)) in tryCandidate()
|
| /llvm-project-15.0.7/clang/include/clang/AST/ |
| H A D | StmtVisitor.h | 127 BINOP_FALLBACK(Mul) BINOP_FALLBACK(Div) BINOP_FALLBACK(Rem) in BINOP_FALLBACK()
|
| H A D | OperationKinds.def | 374 BINARY_OPERATION(Rem, "%")
|
| /llvm-project-15.0.7/llvm/include/llvm/CodeGen/ |
| H A D | MachineScheduler.h | 622 SchedRemainder *Rem = nullptr; variable 914 SchedRemainder Rem; variable
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSimplifyDemanded.cpp | 770 const APInt *Rem; in SimplifyDemandedUseBits() local 771 if (match(I->getOperand(1), m_APInt(Rem))) { in SimplifyDemandedUseBits() 774 if (Rem->isAllOnes()) in SimplifyDemandedUseBits() 776 APInt RA = Rem->abs(); in SimplifyDemandedUseBits()
|
| H A D | InstCombineMulDivRem.cpp | 297 Value *Rem = Builder.CreateBinOp(RemOpc, XFreeze, DivOp1); in visitMul() local 299 return BinaryOperator::CreateSub(XFreeze, Rem); in visitMul() 300 return BinaryOperator::CreateSub(Rem, XFreeze); in visitMul()
|
| H A D | InstCombineShifts.cpp | 462 Value *Rem = Builder.CreateAnd(A, Mask, Op1->getName()); in commonShiftTransforms() local 463 return replaceOperand(I, 1, Rem); in commonShiftTransforms()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Scalar/ |
| H A D | LowerMatrixIntrinsics.cpp | 2205 OptimizationRemark Rem(DEBUG_TYPE, "matrix-lowered", Loc, in emitRemarks() local 2208 Rem << "Lowered with "; in emitRemarks() 2209 Rem << ore::NV("NumStores", Counts.NumStores) << " stores, " in emitRemarks() 2218 Rem << ",\nadditionally " in emitRemarks() 2226 Rem << ("\n" + linearize(L, Shared, ExprsInSubprogram, DL)); in emitRemarks() 2227 ORE.emit(Rem); in emitRemarks()
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | rem.ll | 835 ; Rem-by-0 is immediate UB, so select is simplified. 882 ; Rem-by-0 element is immediate UB, so select is simplified. 941 ; Rem-by-0 is immediate UB, so select is simplified. 988 ; Rem-by-0 element is immediate UB, so select is simplified.
|
| /llvm-project-15.0.7/clang/lib/CodeGen/ |
| H A D | CGStmt.cpp | 1436 uint64_t Weight = Total / NCases, Rem = Total % NCases; in EmitCaseStmtRange() local 1439 SwitchWeights->push_back(Weight + (Rem ? 1 : 0)); in EmitCaseStmtRange() 1443 if (Rem) in EmitCaseStmtRange() 1444 Rem--; in EmitCaseStmtRange()
|