// Check to see if this store is to a constant offset from the start ptr.
int64_t Offset;
- if (!IsPointerOffset(StartPtr, NextStore->getPointerOperand(), Offset, *TD))
+ if (!IsPointerOffset(StartPtr, NextStore->getPointerOperand(),
+ Offset, *TD))
break;
Ranges.addStore(Offset, NextStore);
if (changed) {
MD->removeInstruction(SI);
SI->eraseFromParent();
+ MD->removeInstruction(LI);
LI->eraseFromParent();
++NumMemCpyInstr;
return true;
if (CallInst *C = dyn_cast<CallInst>(DepInfo.getInst())) {
if (performCallSlotOptzn(M, M->getDest(), M->getSource(),
CopySize->getZExtValue(), C)) {
+ MD->removeInstruction(M);
M->eraseFromParent();
return true;
}