Lines Matching refs:Rem
74 void eliminateIVRemainder(BinaryOperator *Rem, Value *IVOperand,
187 void SimplifyIndvar::eliminateIVRemainder(BinaryOperator *Rem, in eliminateIVRemainder() argument
192 if (IVOperand != Rem->getOperand(0)) in eliminateIVRemainder()
196 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder()
197 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder()
200 const Loop *ICmpLoop = LI->getLoopFor(Rem->getParent()); in eliminateIVRemainder()
208 Rem->replaceAllUsesWith(Rem->getOperand(0)); in eliminateIVRemainder()
221 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ, in eliminateIVRemainder()
222 Rem->getOperand(0), Rem->getOperand(1)); in eliminateIVRemainder()
225 ConstantInt::get(Rem->getType(), 0), in eliminateIVRemainder()
226 Rem->getOperand(0), "tmp", Rem); in eliminateIVRemainder()
227 Rem->replaceAllUsesWith(Sel); in eliminateIVRemainder()
230 DEBUG(dbgs() << "INDVARS: Simplified rem: " << *Rem << '\n'); in eliminateIVRemainder()
233 DeadInsts.push_back(Rem); in eliminateIVRemainder()
245 if (BinaryOperator *Rem = dyn_cast<BinaryOperator>(UseInst)) { in eliminateIVUser() local
246 bool IsSigned = Rem->getOpcode() == Instruction::SRem; in eliminateIVUser()
247 if (IsSigned || Rem->getOpcode() == Instruction::URem) { in eliminateIVUser()
248 eliminateIVRemainder(Rem, IVOperand, IsSigned); in eliminateIVUser()