Home
last modified time | relevance | path

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

123

/external/llvm/lib/Transforms/Utils/
DIntegerDivision.cpp376 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder() argument
377 assert((Rem->getOpcode() == Instruction::SRem || in expandRemainder()
378 Rem->getOpcode() == Instruction::URem) && in expandRemainder()
381 IRBuilder<> Builder(Rem); in expandRemainder()
383 assert(!Rem->getType()->isVectorTy() && "Div over vectors not supported"); in expandRemainder()
384 assert((Rem->getType()->getIntegerBitWidth() == 32 || in expandRemainder()
385 Rem->getType()->getIntegerBitWidth() == 64) && in expandRemainder()
389 if (Rem->getOpcode() == Instruction::SRem) { in expandRemainder()
390 Value *Remainder = generateSignedRemainderCode(Rem->getOperand(0), in expandRemainder()
391 Rem->getOperand(1), Builder); in expandRemainder()
[all …]
DSimplifyIndVar.cpp76 void eliminateIVRemainder(BinaryOperator *Rem, Value *IVOperand,
270 void SimplifyIndvar::eliminateIVRemainder(BinaryOperator *Rem, in eliminateIVRemainder() argument
275 if (IVOperand != Rem->getOperand(0)) in eliminateIVRemainder()
279 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder()
280 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder()
283 const Loop *ICmpLoop = LI->getLoopFor(Rem->getParent()); in eliminateIVRemainder()
291 Rem->replaceAllUsesWith(Rem->getOperand(0)); in eliminateIVRemainder()
303 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ, in eliminateIVRemainder()
304 Rem->getOperand(0), Rem->getOperand(1)); in eliminateIVRemainder()
307 ConstantInt::get(Rem->getType(), 0), in eliminateIVRemainder()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DIntegerDivision.cpp376 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder() argument
377 assert((Rem->getOpcode() == Instruction::SRem || in expandRemainder()
378 Rem->getOpcode() == Instruction::URem) && in expandRemainder()
381 IRBuilder<> Builder(Rem); in expandRemainder()
383 assert(!Rem->getType()->isVectorTy() && "Div over vectors not supported"); in expandRemainder()
384 assert((Rem->getType()->getIntegerBitWidth() == 32 || in expandRemainder()
385 Rem->getType()->getIntegerBitWidth() == 64) && in expandRemainder()
389 if (Rem->getOpcode() == Instruction::SRem) { in expandRemainder()
390 Value *Remainder = generateSignedRemainderCode(Rem->getOperand(0), in expandRemainder()
391 Rem->getOperand(1), Builder); in expandRemainder()
[all …]
DSimplifyIndVar.cpp88 void simplifyIVRemainder(BinaryOperator *Rem, Value *IVOperand,
90 void replaceRemWithNumerator(BinaryOperator *Rem);
91 void replaceRemWithNumeratorOrZero(BinaryOperator *Rem);
92 void replaceSRemWithURem(BinaryOperator *Rem);
310 void SimplifyIndvar::replaceSRemWithURem(BinaryOperator *Rem) { in replaceSRemWithURem() argument
311 auto *N = Rem->getOperand(0), *D = Rem->getOperand(1); in replaceSRemWithURem()
313 Rem->getName() + ".urem", Rem); in replaceSRemWithURem()
314 Rem->replaceAllUsesWith(URem); in replaceSRemWithURem()
315 LLVM_DEBUG(dbgs() << "INDVARS: Simplified srem: " << *Rem << '\n'); in replaceSRemWithURem()
318 DeadInsts.emplace_back(Rem); in replaceSRemWithURem()
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/Utils/
DSimplifyIndVar.cpp80 void eliminateIVRemainder(BinaryOperator *Rem, Value *IVOperand,
189 void SimplifyIndvar::eliminateIVRemainder(BinaryOperator *Rem, in eliminateIVRemainder() argument
194 if (IVOperand != Rem->getOperand(0)) in eliminateIVRemainder()
198 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder()
199 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder()
202 const Loop *ICmpLoop = LI->getLoopFor(Rem->getParent()); in eliminateIVRemainder()
210 Rem->replaceAllUsesWith(Rem->getOperand(0)); in eliminateIVRemainder()
223 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ, in eliminateIVRemainder()
224 Rem->getOperand(0), Rem->getOperand(1)); in eliminateIVRemainder()
227 ConstantInt::get(Rem->getType(), 0), in eliminateIVRemainder()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Transforms/Utils/
DIntegerDivision.cpp101 Value *Rem = Builder.CreateSRem(A, B); in TEST() local
104 Value *Ret = Builder.CreateRet(Rem); in TEST()
106 expandRemainder(cast<BinaryOperator>(Rem)); in TEST()
131 Value *Rem = Builder.CreateURem(A, B); in TEST() local
134 Value *Ret = Builder.CreateRet(Rem); in TEST()
136 expandRemainder(cast<BinaryOperator>(Rem)); in TEST()
222 Value *Rem = Builder.CreateSRem(A, B); in TEST() local
225 Value *Ret = Builder.CreateRet(Rem); in TEST()
227 expandRemainder(cast<BinaryOperator>(Rem)); in TEST()
252 Value *Rem = Builder.CreateURem(A, B); in TEST() local
[all …]
/external/llvm/unittests/Transforms/Utils/
DIntegerDivision.cpp101 Value *Rem = Builder.CreateSRem(A, B); in TEST() local
104 Value *Ret = Builder.CreateRet(Rem); in TEST()
106 expandRemainder(cast<BinaryOperator>(Rem)); in TEST()
131 Value *Rem = Builder.CreateURem(A, B); in TEST() local
134 Value *Ret = Builder.CreateRet(Rem); in TEST()
136 expandRemainder(cast<BinaryOperator>(Rem)); in TEST()
222 Value *Rem = Builder.CreateSRem(A, B); in TEST() local
225 Value *Ret = Builder.CreateRet(Rem); in TEST()
227 expandRemainder(cast<BinaryOperator>(Rem)); in TEST()
252 Value *Rem = Builder.CreateURem(A, B); in TEST() local
[all …]
/external/llvm/lib/Support/
DBranchProbability.cpp93 uint64_t Rem = (uint64_t(Upper32) << 32) | Mid32; in scale() local
94 uint64_t UpperQ = Rem / D; in scale()
100 Rem = ((Rem % D) << 32) | Lower32; in scale()
101 uint64_t LowerQ = Rem / D; in scale()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/
DBranchProbability.cpp96 uint64_t Rem = (uint64_t(Upper32) << 32) | Mid32; in scale() local
97 uint64_t UpperQ = Rem / D; in scale()
103 Rem = ((Rem % D) << 32) | Lower32; in scale()
104 uint64_t LowerQ = Rem / D; in scale()
/external/llvm/include/llvm/Transforms/Utils/
DIntegerDivision.h33 bool expandRemainder(BinaryOperator *Rem);
50 bool expandRemainderUpTo32Bits(BinaryOperator *Rem);
56 bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Transforms/Utils/
DIntegerDivision.h33 bool expandRemainder(BinaryOperator *Rem);
50 bool expandRemainderUpTo32Bits(BinaryOperator *Rem);
56 bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
/external/llvm/lib/CodeGen/
DMachineScheduler.cpp1811 Rem = rem; in init()
1922 unsigned OtherCritCount = Rem->RemIssueCount in getOtherResourceCount()
1928 unsigned OtherCount = getResourceCount(PIdx) + Rem->RemainingCounts[PIdx]; in getOtherResourceCount()
2043 assert(Rem->RemainingCounts[PIdx] >= Count && "resource double counted"); in countResource()
2044 Rem->RemainingCounts[PIdx] -= Count; in countResource()
2111 assert(Rem->RemIssueCount >= DecRemIssue && "MOps double counted"); in bumpNode()
2112 Rem->RemIssueCount -= DecRemIssue; in bumpNode()
2359 if (IsPostRA || (RemLatency + CurrZone.getCurrCycle() > Rem.CriticalPath)) { in setPolicy()
2364 << Rem.CriticalPath << "\n"); in setPolicy()
2542 Rem.init(DAG, SchedModel); in initialize()
[all …]
DTargetSchedule.cpp41 unsigned Rem = Dividend % Divisor; in gcd() local
43 Divisor = Rem; in gcd()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DMachineScheduler.cpp1885 Rem = rem; in init()
2007 unsigned OtherCritCount = Rem->RemIssueCount in getOtherResourceCount()
2013 unsigned OtherCount = getResourceCount(PIdx) + Rem->RemainingCounts[PIdx]; in getOtherResourceCount()
2113 assert(Rem->RemainingCounts[PIdx] >= Count && "resource double counted"); in countResource()
2114 Rem->RemainingCounts[PIdx] -= Count; in countResource()
2182 assert(Rem->RemIssueCount >= DecRemIssue && "MOps double counted"); in bumpNode()
2183 Rem->RemIssueCount -= DecRemIssue; in bumpNode()
2442 if (IsPostRA || (RemLatency + CurrZone.getCurrCycle() > Rem.CriticalPath)) { in setPolicy()
2447 << Rem.CriticalPath << "\n"); in setPolicy()
2624 Rem.init(DAG, SchedModel); in initialize()
[all …]
DTargetSchedule.cpp51 unsigned Rem = Dividend % Divisor; in gcd() local
53 Divisor = Rem; in gcd()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dbinary_ops.cc157 auto trunc_mod = xla::Rem(x, y); in FloorModImpl()
158 return xla::Select(same_sign, trunc_mod, xla::Rem(xla::Add(trunc_mod, y), y)); in FloorModImpl()
175 XLA_MAKE_BINARY(Mod, xla::Rem(lhs, rhs, extend_dimensions));
194 XLA_MAKE_BINARY(TruncateMod, xla::Rem(lhs, rhs, extend_dimensions));
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombineMulDivRem.cpp205 Value *Rem; in visitMul() local
207 Rem = Builder->CreateURem(Op0BO, Op1BO); in visitMul()
209 Rem = Builder->CreateSRem(Op0BO, Op1BO); in visitMul()
210 Rem->takeName(BO); in visitMul()
213 return BinaryOperator::CreateSub(Op0BO, Rem); in visitMul()
214 return BinaryOperator::CreateSub(Rem, Op0BO); in visitMul()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dscalar_computations_test.cc258 Rem(ConstantR0<float>(&builder, 2.5f), ConstantR0<float>(&builder, 5.0f)); in XLA_TEST_F()
290 Rem(ConstantR0<int32>(&builder, p.dividend), in XLA_TEST_P()
320 Rem(dividend, divisor); in XLA_TEST_P()
412 Rem(dividend, divisor); in XLA_TEST_F()
442 Rem(x, ConstantR0<int32>(&builder, 80000)); in XLA_TEST_F()
461 Rem(ConstantR0<uint32>(&builder, 11), ConstantR0<uint32>(&builder, 3)); in XLA_TEST_F()
/external/deqp-deps/glslang/Test/
Dspv.specConstantOperations.vert36 // Mul, Div and Rem
86 // Mul, Div and Rem
/external/swiftshader/third_party/LLVM/lib/Target/SystemZ/
DSystemZISelDAGToDAG.cpp671 SDNode *Rem = CurDAG->getMachineNode(TargetOpcode::EXTRACT_SUBREG, in Select() local
677 ReplaceUses(SDValue(Node, 1), SDValue(Rem, 0)); in Select()
755 SDNode *Rem = CurDAG->getMachineNode(TargetOpcode::EXTRACT_SUBREG, in Select() local
760 ReplaceUses(SDValue(Node, 1), SDValue(Rem, 0)); in Select()
/external/llvm/include/llvm/CodeGen/
DMachineScheduler.h582 SchedRemainder *Rem; variable
651 DAG(nullptr), SchedModel(nullptr), Rem(nullptr), Available(ID, Name+".A"), in SchedBoundary()
863 SchedRemainder Rem; variable
/external/llvm/lib/Target/AMDGPU/
DAMDGPUISelLowering.cpp1316 SDValue Rem = DAG.getNode(ISD::MUL, DL, VT, Div, RHS); in LowerDIVREM24() local
1317 Rem = DAG.getNode(ISD::SUB, DL, VT, LHS, Rem); in LowerDIVREM24()
1324 Rem = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, Rem, InRegSize); in LowerDIVREM24()
1328 Rem = DAG.getNode(ISD::AND, DL, VT, Rem, TruncMask); in LowerDIVREM24()
1331 return DAG.getMergeValues({ Div, Rem }, DL); in LowerDIVREM24()
1514 SDValue Rem = DAG.getSelectCC(DL, Tmp1, DAG.getConstant(0, DL, VT), in LowerUDIVREM() local
1518 Rem = DAG.getSelectCC(DL, Remainder_GE_Zero, DAG.getConstant(0, DL, VT), in LowerUDIVREM()
1519 Remainder_A_Den, Rem, ISD::SETEQ); in LowerUDIVREM()
1522 Rem in LowerUDIVREM()
1572 SDValue Rem = Div.getValue(1); in LowerSDIVREM() local
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AMDGPU/
DAMDGPUCodeGenPrepare.cpp594 Value *Rem = Builder.CreateMul(Div, Den); in expandDivRem24() local
595 Res = Builder.CreateSub(Num, Rem); in expandDivRem24()
740 Value *Rem = Builder.CreateSelect(Tmp1_0_CC, Remainder, Remainder_S_Den); in expandDivRem32() local
743 Res = Builder.CreateSelect(Num_GE_Num_S_Rem_CC, Rem, Remainder_A_Den); in expandDivRem32()
DAMDGPUISelLowering.cpp1534 SDValue Rem = DAG.getNode(ISD::MUL, DL, VT, Div, RHS); in LowerDIVREM24() local
1535 Rem = DAG.getNode(ISD::SUB, DL, VT, LHS, Rem); in LowerDIVREM24()
1542 Rem = DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, Rem, InRegSize); in LowerDIVREM24()
1546 Rem = DAG.getNode(ISD::AND, DL, VT, Rem, TruncMask); in LowerDIVREM24()
1549 return DAG.getMergeValues({ Div, Rem }, DL); in LowerDIVREM24()
1711 SDValue Rem = DAG.getSelectCC(DL, C3, Zero, Sel2, Sub1, ISD::SETNE); in LowerUDIVREM64() local
1714 Results.push_back(Rem); in LowerUDIVREM64()
1864 SDValue Rem = DAG.getSelectCC(DL, Tmp1, DAG.getConstant(0, DL, VT), in LowerUDIVREM() local
1868 Rem = DAG.getSelectCC(DL, Remainder_GE_Zero, DAG.getConstant(0, DL, VT), in LowerUDIVREM()
1869 Remainder_A_Den, Rem, ISD::SETEQ); in LowerUDIVREM()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombineMulDivRem.cpp330 Value *Rem; in visitMul() local
332 Rem = Builder->CreateURem(Op0BO, Op1BO); in visitMul()
334 Rem = Builder->CreateSRem(Op0BO, Op1BO); in visitMul()
335 Rem->takeName(BO); in visitMul()
338 return BinaryOperator::CreateSub(Op0BO, Rem); in visitMul()
339 return BinaryOperator::CreateSub(Rem, Op0BO); in visitMul()

123