Lines Matching defs:ICmp
80 void eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand);
157 void SimplifyIndvar::eliminateIVComparison(ICmpInst *ICmp, Value *IVOperand) {
159 ICmpInst::Predicate Pred = ICmp->getPredicate();
160 if (IVOperand != ICmp->getOperand(0)) {
162 assert(IVOperand == ICmp->getOperand(1) && "Can't find IVOperand");
167 // Get the SCEVs for the ICmp operands.
168 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx));
169 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx));
172 const Loop *ICmpLoop = LI->getLoopFor(ICmp->getParent());
179 ICmp->replaceAllUsesWith(ConstantInt::getTrue(ICmp->getContext()));
181 ICmp->replaceAllUsesWith(ConstantInt::getFalse(ICmp->getContext()));
185 DEBUG(dbgs() << "INDVARS: Eliminated comparison: " << *ICmp << '\n');
188 DeadInsts.push_back(ICmp);
201 // Get the SCEVs for the ICmp operands.
227 ICmpInst *ICmp = new ICmpInst(Rem, ICmpInst::ICMP_EQ,
230 SelectInst::Create(ICmp,
247 if (ICmpInst *ICmp = dyn_cast<ICmpInst>(UseInst)) {
248 eliminateIVComparison(ICmp, IVOperand);