reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
247 ICmpInst::Predicate Pred = ICmp->getPredicate(); 249 if (IVOperand != ICmp->getOperand(0)) { 251 assert(IVOperand == ICmp->getOperand(1) && "Can't find IVOperand"); 258 const Loop *ICmpLoop = LI->getLoopFor(ICmp->getParent()); 259 const SCEV *S = SE->getSCEVAtScope(ICmp->getOperand(IVOperIdx), ICmpLoop); 260 const SCEV *X = SE->getSCEVAtScope(ICmp->getOperand(1 - IVOperIdx), ICmpLoop); 265 ICmp->replaceAllUsesWith(ConstantInt::getTrue(ICmp->getContext())); 265 ICmp->replaceAllUsesWith(ConstantInt::getTrue(ICmp->getContext())); 266 DeadInsts.emplace_back(ICmp); 267 LLVM_DEBUG(dbgs() << "INDVARS: Eliminated comparison: " << *ICmp << '\n'); 269 ICmp->replaceAllUsesWith(ConstantInt::getFalse(ICmp->getContext())); 269 ICmp->replaceAllUsesWith(ConstantInt::getFalse(ICmp->getContext())); 270 DeadInsts.emplace_back(ICmp); 271 LLVM_DEBUG(dbgs() << "INDVARS: Eliminated comparison: " << *ICmp << '\n'); 272 } else if (makeIVComparisonInvariant(ICmp, IVOperand)) { 281 assert(ICmp->getPredicate() == OriginalPred && "Predicate changed?"); 282 LLVM_DEBUG(dbgs() << "INDVARS: Turn to unsigned comparison: " << *ICmp 284 ICmp->setPredicate(ICmpInst::getUnsignedPredicate(OriginalPred));