Home
last modified time | relevance | path

Searched refs:Rem (Results 1 – 25 of 40) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DIntegerDivision.cpp354 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder() argument
355 assert((Rem->getOpcode() == Instruction::SRem || in expandRemainder()
356 Rem->getOpcode() == Instruction::URem) && in expandRemainder()
359 IRBuilder<> Builder(Rem); in expandRemainder()
361 assert(!Rem->getType()->isVectorTy() && "Div over vectors not supported"); in expandRemainder()
364 if (Rem->getOpcode() == Instruction::SRem) { in expandRemainder()
365 Value *Remainder = generateSignedRemainderCode(Rem->getOperand(0), in expandRemainder()
366 Rem->getOperand(1), Builder); in expandRemainder()
369 bool IsInsertPoint = Rem->getIterator() == Builder.GetInsertPoint(); in expandRemainder()
370 Rem->replaceAllUsesWith(Remainder); in expandRemainder()
[all …]
H A DSimplifyIndVar.cpp100 void simplifyIVRemainder(BinaryOperator *Rem, Instruction *IVOperand,
102 void replaceRemWithNumerator(BinaryOperator *Rem);
103 void replaceRemWithNumeratorOrZero(BinaryOperator *Rem);
104 void replaceSRemWithURem(BinaryOperator *Rem);
327 void SimplifyIndvar::replaceSRemWithURem(BinaryOperator *Rem) { in replaceSRemWithURem() argument
328 auto *N = Rem->getOperand(0), *D = Rem->getOperand(1); in replaceSRemWithURem()
330 Rem->getName() + ".urem", Rem->getIterator()); in replaceSRemWithURem()
331 Rem->replaceAllUsesWith(URem); in replaceSRemWithURem()
332 URem->setDebugLoc(Rem->getDebugLoc()); in replaceSRemWithURem()
333 LLVM_DEBUG(dbgs() << "INDVARS: Simplified srem: " << *Rem << '\n'); in replaceSRemWithURem()
[all …]
H A DAMDGPUEmitPrintf.cpp348 int Rem = (Str.size() % 8); in processConstantStringArg() local
349 if (Rem > 0 && Rem <= 4) in processConstantStringArg()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DStackFrameLayoutAnalysisPass.cpp126 MachineOptimizationRemarkAnalysis Rem(DEBUG_TYPE, "StackLayout", in runOnMachineFunction() local
129 Rem << ("\nFunction: " + MF.getName()).str(); in runOnMachineFunction()
130 emitStackFrameLayoutRemarks(MF, Rem); in runOnMachineFunction()
131 getAnalysis<MachineOptimizationRemarkEmitterPass>().getORE().emit(Rem); in runOnMachineFunction()
153 MachineOptimizationRemarkAnalysis &Rem) { in emitStackSlotRemark()
184 Rem << Prefix << ore::NV("Offset", D.Offset.getFixed()); in emitStackSlotRemark()
187 Rem << ((D.Offset.getScalable() < 0) ? "" : "+") in emitStackSlotRemark()
191 Rem << "], Type: " << ore::NV("Type", getTypeString(D.SlotTy)) in emitStackSlotRemark()
197 MachineOptimizationRemarkAnalysis &Rem) { in emitSourceLocRemark()
201 Rem << "\n " << ore::NV("DataLoc", Loc); in emitSourceLocRemark()
[all …]
H A DMachineScheduler.cpp2308 Rem = rem; in init()
2532 unsigned OtherCritCount = Rem->RemIssueCount in getOtherResourceCount()
2538 unsigned OtherCount = getResourceCount(PIdx) + Rem->RemainingCounts[PIdx]; in getOtherResourceCount()
2652 assert(Rem->RemainingCounts[PIdx] >= Count && "resource double counted"); in countResource()
2653 Rem->RemainingCounts[PIdx] -= Count; in countResource()
2726 assert(Rem->RemIssueCount >= DecRemIssue && "MOps double counted"); in bumpNode()
2727 Rem->RemIssueCount -= DecRemIssue; in bumpNode()
3022 if (CurrZone.getCurrCycle() > Rem.CriticalPath) in shouldReduceLatency()
3032 return RemLatency + CurrZone.getCurrCycle() > Rem.CriticalPath; in shouldReduceLatency()
3069 << Rem.CriticalPath << "\n"); in setPolicy()
[all …]
H A DSelectOptimize.cpp847 DiagnosticInfoOptimizationBase &Rem) { in EmitAndPrintRemark() argument
848 LLVM_DEBUG(dbgs() << Rem.getMsg() << "\n"); in EmitAndPrintRemark()
849 ORE->emit(Rem); in EmitAndPrintRemark()
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DBranchProbability.cpp92 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 DAPInt.cpp2740 APInt Quo, Rem; in RoundingUDiv() local
2741 APInt::udivrem(A, B, Quo, Rem); in RoundingUDiv()
2742 if (Rem.isZero()) in RoundingUDiv()
2755 APInt Quo, Rem; in RoundingSDiv() local
2756 APInt::sdivrem(A, B, Quo, Rem); in RoundingSDiv()
2757 if (Rem.isZero()) in RoundingSDiv()
2765 if (Rem.isNegative() != B.isNegative()) in RoundingSDiv()
2769 if (Rem.isNegative() != B.isNegative()) in RoundingSDiv()
2921 APInt Rem; in SolveQuadraticEquationWrap() local
2930 APInt::sdivrem(-B - (SQ+InexactSQ), TwoA, X, Rem); in SolveQuadraticEquationWrap()
[all …]
H A DAPFixedPoint.cpp322 APInt Rem; in div() local
323 APInt::sdivrem(ThisVal, OtherVal, Result, Rem); in div()
326 if (ThisVal.isNegative() != OtherVal.isNegative() && !Rem.isZero()) in div()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DIntegerDivision.h32 bool expandRemainder(BinaryOperator *Rem);
49 bool expandRemainderUpTo32Bits(BinaryOperator *Rem);
55 bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
/freebsd/contrib/llvm-project/llvm/lib/BinaryFormat/
H A DCOFF.cpp33 unsigned Rem = Value % 64; in encodeBase64StringEntry() local
35 *(Ptr--) = Alphabet[Rem]; in encodeBase64StringEntry()
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCMachineScheduler.cpp87 if (Rem.IsAcyclicLatencyLimited && !Zone->getCurrMOps() && in tryCandidate()
138 !Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, *Zone)) in tryCandidate()
/freebsd/contrib/llvm-project/clang/include/clang/AST/
H A DStmtVisitor.h128 BINOP_FALLBACK(Mul) BINOP_FALLBACK(Div) BINOP_FALLBACK(Rem) in BINOP_FALLBACK()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DMachineScheduler.h843 SchedRemainder *Rem = nullptr; variable
1170 SchedRemainder Rem; variable
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLowerMatrixIntrinsics.cpp2581 OptimizationRemark Rem(DEBUG_TYPE, "matrix-lowered", Loc, in emitRemarks() local
2584 Rem << "Lowered with "; in emitRemarks()
2585 Rem << ore::NV("NumStores", Counts.NumStores) << " stores, " in emitRemarks()
2594 Rem << ",\nadditionally " in emitRemarks()
2602 Rem << ("\n" + linearize(L, Shared, ExprsInSubprogram, DL)); in emitRemarks()
2603 ORE.emit(Rem); in emitRemarks()
H A DConstraintElimination.cpp1864 OptimizationRemark Rem(DEBUG_TYPE, "Reproducer", &F); in eliminateConstraints() local
1865 Rem << ore::NV("module") << S; in eliminateConstraints()
1866 ORE.emit(Rem); in eliminateConstraints()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUPromoteAlloca.cpp425 uint64_t Rem; in GEPToVectorIndex() local
426 APInt::udivrem(ConstOffset, VecElemSize, Quot, Rem); in GEPToVectorIndex()
427 if (Rem != 0) in GEPToVectorIndex()
H A DAMDGPUISelLowering.cpp2002 SDValue Rem = DAG.getNode(ISD::MUL, DL, VT, Div, RHS); in LowerDIVREM24() local
2003 Rem = DAG.getNode(ISD::SUB, DL, VT, LHS, Rem); in LowerDIVREM24()
2010 Rem = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, Rem, InRegSize); in LowerDIVREM24()
2014 Rem = DAG.getNode(ISD::AND, DL, VT, Rem, TruncMask); in LowerDIVREM24()
2017 return DAG.getMergeValues({ Div, Rem }, DL); in LowerDIVREM24()
2183 SDValue Rem = DAG.getSelectCC(DL, C3, Zero, Sel2, Sub1, ISD::SETNE); in LowerUDIVREM64() local
2186 Results.push_back(Rem); in LowerUDIVREM64()
2334 SDValue Rem = Div.getValue(1); in LowerSDIVREM() local
2337 Rem = DAG.getNode(ISD::XOR, DL, VT, Rem, RSign); in LowerSDIVREM()
2340 Rem = DAG.getNode(ISD::SUB, DL, VT, Rem, RSign); in LowerSDIVREM()
[all …]
H A DAMDGPULowerModuleLDSPass.cpp1202 if (uint64_t Rem = CurrentOffset % DataAlignV) { in createLDSVariableReplacement() local
1203 uint64_t Padding = DataAlignV - Rem; in createLDSVariableReplacement()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DExpandVariadics.cpp716 if (uint64_t Rem = CurrentOffset % DataAlignV) { in expandCall() local
718 uint64_t Padding = DataAlignV - Rem; in expandCall()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineMulDivRem.cpp379 APInt Quot, Rem; in visitMul() local
380 APInt::sdivrem(C, *C1, Quot, Rem); in visitMul()
381 return Rem.isZero() && !Quot.isAllOnes(); in visitMul()
424 Value *Rem = Builder.CreateBinOp(RemOpc, XFreeze, DivOp1); in visitMul() local
426 return BinaryOperator::CreateSub(XFreeze, Rem); in visitMul()
427 return BinaryOperator::CreateSub(Rem, XFreeze); in visitMul()
H A DInstCombineSimplifyDemanded.cpp861 const APInt *Rem; in SimplifyDemandedUseBits() local
862 if (match(I->getOperand(1), m_APInt(Rem))) { in SimplifyDemandedUseBits()
865 if (Rem->isAllOnes()) in SimplifyDemandedUseBits()
867 APInt RA = Rem->abs(); in SimplifyDemandedUseBits()
H A DInstCombineAddSub.cpp1178 Value *Div, *Rem; in SimplifyAddWithRemainder() local
1182 if (!RHS->hasOneUse() || !MatchMul(RHS, Rem, C2)) in SimplifyAddWithRemainder()
1183 Rem = RHS, C2 = APInt(I.getType()->getScalarSizeInBits(), 1); in SimplifyAddWithRemainder()
1185 std::swap(Div, Rem); in SimplifyAddWithRemainder()
1190 if (MatchRem(Rem, X, C0, IsSigned) && in SimplifyAddWithRemainder()
1193 if (!NewC.isZero() && !Rem->hasOneUse()) in SimplifyAddWithRemainder()
H A DInstructionCombining.cpp2971 uint64_t Rem; in visitGetElementPtrInst() local
2972 APInt::udivrem(*C, TyAllocSize, Quot, Rem); in visitGetElementPtrInst()
2973 if (Rem == 0) in visitGetElementPtrInst()
2977 int64_t Rem; in visitGetElementPtrInst() local
2978 APInt::sdivrem(*C, TyAllocSize, Quot, Rem); in visitGetElementPtrInst()
2980 if (!Quot.isAllOnes() && Rem == 0) in visitGetElementPtrInst()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGStmt.cpp1644 uint64_t Weight = Total / NCases, Rem = Total % NCases; in EmitCaseStmtRange() local
1647 SwitchWeights->push_back(Weight + (Rem ? 1 : 0)); in EmitCaseStmtRange()
1651 if (Rem) in EmitCaseStmtRange()
1652 Rem--; in EmitCaseStmtRange()

12